/* Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* CSS Variables - shadcn/Mintlify inspired */
:root {
    --background: #ffffff;
    --foreground: #0f172a;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --primary: #0f172a;
    --primary-foreground: #f8fafc;
    --secondary: #f1f5f9;
    --secondary-foreground: #0f172a;
    --accent: #f1f5f9;
    --accent-foreground: #0f172a;
    --ring: #94a3b8;
    --radius: 0.5rem;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
}

/* Layout */
.min-h-screen {
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-3 {
    gap: 0.75rem;
}

.space-x-2 > * + * {
    margin-left: 0.5rem;
}

.shrink-0 {
    flex-shrink: 0;
}

/* Header */
.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.top-14 {
    top: 3.5rem;
}

.z-50 {
    z-index: 50;
}

.w-full {
    width: 100%;
}

.h-14 {
    height: 3.5rem;
}

.h-9 {
    height: 2.25rem;
}

.h-6 {
    height: 1.5rem;
}

.w-6 {
    width: 1.5rem;
}

.w-64 {
    width: 16rem;
}

header {
    border-bottom: 1px solid var(--border);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

header .container {
    display: flex;
    align-items: center;
    height: 3.5rem;
    padding: 0 1.5rem;
}

header a {
    text-decoration: none;
    color: inherit;
}

.mr-6 {
    margin-right: 1.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Logo area */
header .font-bold {
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
}

header .rounded {
    border-radius: var(--radius);
}

.bg-gray-900 {
    background-color: var(--primary);
}

.bg-white {
    background-color: var(--background);
}

/* Sidebar */
aside {
    width: 16rem;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    min-height: calc(100vh - 3.5rem);
    background-color: var(--background);
}

aside nav {
    position: sticky;
    top: 3.5rem;
    padding: 1.5rem;
    max-height: calc(100vh - 3.5rem);
    overflow-y: auto;
}

aside nav > div {
    margin-bottom: 1.5rem;
}

aside nav > div:last-child {
    margin-bottom: 0;
}

aside h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

aside li {
    margin: 0;
}

aside li a {
    display: block;
    padding: 0.375rem 0;
    font-size: 1rem;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.15s ease;
    border-radius: 0.25rem;
}

aside li a:hover {
    color: var(--foreground);
}

aside li a.font-medium {
    color: var(--foreground);
    font-weight: 500;
}

.space-y-1 > * + * {
    margin-top: 0.125rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

/* Main Content */
main {
    flex: 1;
    min-width: 0;
    padding: 2.5rem 3rem;
    max-width: 52rem;
}

main.flex-1 {
    flex: 1;
}

.max-w-4xl {
    max-width: 52rem;
}

.max-w-none {
    max-width: none;
}

.p-4 {
    padding: 1rem;
}

.p-8 {
    padding: 2rem;
}

/* Typography - Prose */
.prose {
    color: var(--foreground);
    line-height: 1.75;
}

.prose h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    color: var(--foreground);
    line-height: 1.2;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--foreground);
    line-height: 1.3;
}

.prose h3 {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--foreground);
    line-height: 1.4;
}

.prose p {
    margin-bottom: 1.25rem;
    color: var(--foreground);
}

.prose .lead,
.prose p.lead {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.prose strong {
    font-weight: 600;
    color: var(--foreground);
}

.prose a {
    color: var(--foreground);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--muted-foreground);
    transition: text-decoration-color 0.15s ease;
}

.prose a:hover {
    text-decoration-color: var(--foreground);
}

.prose ul,
.prose ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.prose li::marker {
    color: var(--muted-foreground);
}

/* Inline code */
.prose code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-size: 0.875em;
    background-color: var(--muted);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    color: var(--foreground);
    font-weight: 500;
}

/* Code blocks */
.prose pre {
    background-color: #1e293b;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    border: 1px solid #334155;
}

.prose pre code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
    color: #e2e8f0;
    font-weight: 400;
    line-height: 1.7;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

.prose th,
.prose td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--border);
}

.prose th {
    background-color: var(--muted);
    font-weight: 500;
    color: var(--foreground);
}

.prose td {
    color: var(--foreground);
}

.prose tr:nth-child(even) td {
    background-color: var(--muted);
}

/* Blockquote */
.prose blockquote {
    border-left: 3px solid var(--border);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--muted-foreground);
    font-style: italic;
}

.prose hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

/* Callout boxes - Mintlify style */
.callout {
    display: flex;
    padding: 1rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    font-size: 0.9375rem;
    border: 1px solid;
}

.callout p {
    margin: 0;
}

.callout strong {
    display: block;
    margin-bottom: 0.25rem;
}

.callout-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.callout-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.callout-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.callout-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

/* User info & buttons */
.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-gray-500 {
    color: var(--muted-foreground);
}

.text-gray-600 {
    color: #475569;
}

.text-gray-700 {
    color: #334155;
}

.text-gray-900 {
    color: var(--foreground);
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-center {
    text-align: center;
}

/* Buttons */
.inline-flex {
    display: inline-flex;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: var(--radius);
}

.hover\:bg-gray-100:hover {
    background-color: var(--muted);
}

/* Borders */
.border {
    border: 1px solid var(--border);
}

.border-b {
    border-bottom: 1px solid var(--border);
}

.border-r {
    border-right: 1px solid var(--border);
}

.border-t {
    border-top: 1px solid var(--border);
}

.border-gray-200 {
    border-color: var(--border);
}

.border-gray-300 {
    border-color: #cbd5e1;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: auto;
}

footer .container {
    padding: 0 1.5rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Login page specific */
.bg-gray-50 {
    background-color: #f8fafc;
}

/* Responsive */
.hidden {
    display: none;
}

.block {
    display: block;
}

@media (min-width: 768px) {
    .md\:block {
        display: block;
    }

    .md\:inline {
        display: inline;
    }
}

/* Override Prism.js theme to match */
code[class*="language-"],
pre[class*="language-"] {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #e2e8f0;
    background: none;
    text-shadow: none;
}

pre[class*="language-"] {
    background-color: #1e293b;
    border: 1px solid #334155;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #64748b;
}

.token.punctuation {
    color: #94a3b8;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #f472b6;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #a5f3fc;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #fde68a;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #c4b5fd;
}

.token.function,
.token.class-name {
    color: #7dd3fc;
}

.token.regex,
.token.important,
.token.variable {
    color: #fca5a5;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted-foreground);
}

/* Selection */
::selection {
    background-color: #c7d2fe;
    color: var(--foreground);
}
