/* ═══════════════════════════════════════════════════════════════════════
   Al Nokhba Al Masiya — Developer API Documentation Portal
   Premium dark-mode SPA stylesheet
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ───────────────────────────────────────────────────── */
:root {
    --bg-primary: #0a0b10;
    --bg-secondary: #11131a;
    --bg-tertiary: #181b25;
    --bg-card: #14161f;
    --bg-input: #1a1d28;
    --bg-hover: #1e2130;
    --bg-code: #0d0f17;

    --border-subtle: rgba(255,255,255,0.06);
    --border-medium: rgba(255,255,255,0.1);
    --border-strong: rgba(255,255,255,0.15);

    --text-primary: #f1f3f9;
    --text-secondary: #a1a8bf;
    --text-muted: #636b82;
    --text-disabled: #3d4255;

    --accent-primary: #8b5cf6; /* Nova theme is default */
    --accent-secondary: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.15);
    --accent-hover: #c084fc;

    --success: #10b981;
    --success-glow: rgba(16,185,129,0.15);
    --warning: #f59e0b;
    --error: #ef4444;
    --error-glow: rgba(239,68,68,0.15);

    --font-sans: 'Inter', 'Noto Kufi Arabic', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);

    --transition-fast: 150ms cubic-bezier(0.4,0,0.2,1);
    --transition-base: 250ms cubic-bezier(0.4,0,0.2,1);
    --transition-slow: 400ms cubic-bezier(0.4,0,0.2,1);
}

/* ─── Color Themes ────────────────────────────────────────────────────── */
[data-theme="default"] {
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --accent-hover: #2563eb;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-input: #0f172a;
}
[data-theme="ocean"] {
    --accent-primary: #0284c7;
    --accent-secondary: #38bdf8;
    --accent-glow: rgba(2, 132, 199, 0.15);
    --accent-hover: #0ea5e9;
    --bg-primary: #082f49;
    --bg-secondary: #0c4a6e;
    --bg-card: #0c4a6e;
    --bg-input: #082f49;
}
[data-theme="forest"] {
    --accent-primary: #15803d;
    --accent-secondary: #22c55e;
    --accent-glow: rgba(21, 128, 61, 0.15);
    --accent-hover: #16a34a;
    --bg-primary: #052e16;
    --bg-secondary: #14532d;
    --bg-card: #14532d;
    --bg-input: #052e16;
}
[data-theme="crimson"] {
    --accent-primary: #dc2626;
    --accent-secondary: #f87171;
    --accent-glow: rgba(220, 38, 38, 0.15);
    --accent-hover: #b91c1c;
    --bg-primary: #450a0a;
    --bg-secondary: #7f1d1d;
    --bg-card: #7f1d1d;
    --bg-input: #450a0a;
}
[data-theme="midnight"] {
    --accent-primary: #312e81;
    --accent-secondary: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-hover: #4338ca;
    --bg-primary: #030712;
    --bg-secondary: #111827;
    --bg-card: #1f2937;
    --bg-input: #111827;
}
[data-theme="amber"] {
    --accent-primary: #d97706;
    --accent-secondary: #fbbf24;
    --accent-glow: rgba(217, 119, 6, 0.15);
    --accent-hover: #b45309;
    --bg-primary: #451a03;
    --bg-secondary: #78350f;
    --bg-card: #78350f;
    --bg-input: #451a03;
}
[data-theme="teal"] {
    --accent-primary: #0d9488;
    --accent-secondary: #2dd4bf;
    --accent-glow: rgba(13, 148, 136, 0.15);
    --accent-hover: #0f766e;
    --bg-primary: #042f2e;
    --bg-secondary: #115e59;
    --bg-card: #115e59;
    --bg-input: #042f2e;
}
[data-theme="nova"] {
    --accent-primary: #8b5cf6;
    --accent-secondary: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.15);
    --accent-hover: #c084fc;
    --bg-primary: #05020c;
    --bg-secondary: #0c0817;
    --bg-card: #0f0b1f;
    --bg-input: #140e28;
}
[data-theme="demon"] {
    --accent-primary: #ef4444;
    --accent-secondary: #f87171;
    --accent-glow: rgba(239, 68, 68, 0.15);
    --accent-hover: #fca5a5;
    --bg-primary: #0c0202;
    --bg-secondary: #140505;
    --bg-card: #1c0808;
    --bg-input: #240b0b;
}
[data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;
    --bg-hover: #f1f5f9;
    --bg-code: #0f172a; /* Keep code blocks dark for readability */

    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-medium: rgba(0, 0, 0, 0.1);
    --border-strong: rgba(0, 0, 0, 0.15);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-disabled: #94a3b8;
}


/* ─── Reset & Base ────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}
[dir="rtl"] { font-family: 'Noto Kufi Arabic', 'Inter', system-ui, sans-serif; }
#app { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

a { color: var(--accent-secondary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-hover); }
code { font-family: var(--font-mono); font-size: 0.88em; }

::selection { background: var(--accent-glow); color: var(--accent-secondary); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ─── Login Screen ────────────────────────────────────────────────────── */
/* ─── Login Screen (Split Cover Design) ───────────────────────────────── */
.login-screen {
    display: flex;
    height: 100vh;
    width: 100%;
    background: var(--bg-primary);
    overflow: hidden;
    position: relative;
}

/* Left side cover */
.login-cover {
    display: none;
    width: 50%;
    position: relative;
    background: #020617;
    overflow: hidden;
}
@media (min-width: 1024px) {
    .login-cover {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
.login-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    user-select: none;
}
.login-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.4) 0%, rgba(30, 27, 75, 0.2) 100%);
    pointer-events: none;
}

/* Right side form container */
.login-form-side {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
    background: #090a0f;
    position: relative;
    overflow-y: auto;
}
@media (min-width: 1024px) {
    .login-form-side {
        width: 50%;
        padding: 50px 70px;
    }
}

/* Top row */
.login-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 24px;
}
.login-logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.login-logo-box {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.login-logo-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-secondary);
}

/* Center form area */
.login-form-container {
    width: 100%;
    max-width: 420px;
    margin: auto;
    padding: 20px 0;
}
.login-welcome-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.login-welcome-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.login-form-card {
    background: rgba(17, 19, 26, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.login-field {
    margin-bottom: 20px;
}
.login-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Input with icon container */
.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.login-input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 16px;
    display: flex;
    align-items: center;
}
[dir="rtl"] .login-input-icon {
    left: auto;
    right: 14px;
}
.login-input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-fast);
}
[dir="rtl"] .login-input-wrap input {
    padding: 12px 42px 12px 14px;
}
.login-input-wrap input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Password visibility toggle */
.login-password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: color var(--transition-fast);
}
[dir="rtl"] .login-password-toggle {
    right: auto;
    left: 14px;
}
.login-password-toggle:hover {
    color: var(--text-primary);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}
.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.login-error {
    background: var(--error-glow); border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5; padding: 10px 14px;
    border-radius: var(--radius-md); font-size: 0.82rem;
    margin-bottom: 16px; font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── Main Layout ─────────────────────────────────────────────────────── */
.app-header {
    height: 52px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0; user-select: none; z-index: 30;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-logo {
    display: flex; align-items: center; gap: 8px;
    font-weight: 800; font-size: 0.82rem; letter-spacing: -0.01em;
}
.header-logo-icon {
    width: 30px; height: 30px; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: white;
}
.header-divider { width: 1px; height: 20px; background: var(--border-subtle); }
.header-badge {
    font-size: 0.65rem; font-weight: 800;
    padding: 3px 10px; border-radius: var(--radius-full);
    background: var(--accent-glow); color: var(--accent-secondary);
    border: 1px solid rgba(99,102,241,0.2);
    letter-spacing: 0.05em;
}
.header-right { display: flex; align-items: center; gap: 8px; }

.header-nav { display: flex; gap: 2px; background: rgba(255,255,255,0.03); padding: 3px; border-radius: var(--radius-md); }
.header-nav-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: var(--radius-sm);
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    background: transparent; border: none; color: var(--text-muted);
    transition: all var(--transition-fast); font-family: var(--font-sans);
}
.header-nav-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.header-nav-btn.active {
    background: var(--accent-glow); color: var(--accent-secondary);
    border: 1px solid rgba(99,102,241,0.2); font-weight: 700;
}

.icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    background: transparent; border: 1px solid transparent;
    color: var(--text-muted); cursor: pointer;
    transition: all var(--transition-fast); font-family: var(--font-sans); font-size: 0.78rem;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-subtle); }

.text-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: var(--radius-sm);
    background: transparent; border: 1px solid var(--border-subtle);
    color: var(--text-secondary); cursor: pointer; font-size: 0.78rem;
    font-weight: 600; transition: all var(--transition-fast); font-family: var(--font-sans);
}
.text-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.text-btn.danger { color: var(--error); border-color: rgba(239,68,68,0.2); }
.text-btn.danger:hover { background: var(--error-glow); }

.primary-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
    border: none; color: white; cursor: pointer; font-size: 0.78rem;
    font-weight: 700; transition: all var(--transition-fast); font-family: var(--font-sans);
    box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,0.35); }

/* ─── Body Layout ─────────────────────────────────────────────────────── */
.app-body { display: flex; flex: 1; overflow: hidden; }

/* ─── Docs Sidebar ────────────────────────────────────────────────────── */
.sidebar {
    width: 280px; flex-shrink: 0; display: flex; flex-direction: column;
    background: var(--bg-secondary); border-right: 1px solid var(--border-subtle);
    overflow: hidden;
}
[dir="rtl"] .sidebar { border-right: none; border-left: 1px solid var(--border-subtle); }
.sidebar-search {
    padding: 14px; border-bottom: 1px solid var(--border-subtle);
}
.sidebar-search input {
    width: 100%; padding: 9px 12px 9px 34px;
    background: var(--bg-input); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 0.82rem; outline: none; font-family: var(--font-sans);
    transition: border-color var(--transition-fast);
}
.sidebar-search input:focus { border-color: var(--accent-primary); }
.sidebar-search-wrap { position: relative; }
.sidebar-search-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: var(--text-disabled); font-size: 14px; pointer-events: none;
}
[dir="rtl"] .sidebar-search-icon { left: auto; right: 10px; }
[dir="rtl"] .sidebar-search input { padding: 9px 34px 9px 12px; }

.sidebar-label {
    font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--text-disabled);
    padding: 12px 14px 6px;
}
.sidebar-topics { flex: 1; overflow-y: auto; padding: 4px 8px; }
.sidebar-topic-btn {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 10px 12px; border-radius: var(--radius-sm);
    background: transparent; border: none; cursor: pointer;
    color: var(--text-secondary); font-size: 0.82rem; font-weight: 500;
    text-align: left; transition: all var(--transition-fast);
    font-family: var(--font-sans);
}
[dir="rtl"] .sidebar-topic-btn { text-align: right; }
.sidebar-topic-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-topic-btn.active {
    background: var(--accent-glow); color: var(--accent-secondary);
    font-weight: 700; border: 1px solid rgba(99,102,241,0.15);
}
.sidebar-topic-icon { width: 18px; text-align: center; font-size: 13px; flex-shrink: 0; }

.sidebar-endpoints { padding: 4px 8px 12px; }
.sidebar-endpoint-btn {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 6px 10px; border-radius: var(--radius-sm);
    background: transparent; border: none; cursor: pointer;
    font-family: var(--font-mono); font-size: 0.72rem;
    color: var(--text-muted); transition: all var(--transition-fast); text-align: left;
}
[dir="rtl"] .sidebar-endpoint-btn { text-align: right; }
.sidebar-endpoint-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.method-badge {
    font-size: 0.62rem; font-weight: 800; padding: 1px 6px;
    border-radius: 4px; letter-spacing: 0.03em;
}
.method-badge.get { color: var(--success); background: var(--success-glow); }
.method-badge.post { color: var(--warning); background: rgba(245,158,11,0.12); }
.method-badge.delete { color: var(--error); background: var(--error-glow); }

/* ─── Main Content ────────────────────────────────────────────────────── */
.main-content {
    flex: 1; overflow-y: auto; padding: 32px 48px; position: relative;
}
.main-content-inner { max-width: 860px; margin: 0 auto; padding-bottom: 80px; }

.doc-category-tag {
    font-size: 0.65rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--accent-secondary); margin-bottom: 6px;
}
.doc-h1 {
    font-size: 2rem; font-weight: 900; letter-spacing: -0.03em;
    color: var(--text-primary); margin-bottom: 8px;
    padding-bottom: 16px; border-bottom: 1px solid var(--border-subtle);
}
.doc-h2 {
    font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em;
    color: var(--text-primary); margin-top: 40px; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.doc-h2::before {
    content: ''; width: 4px; height: 18px;
    border-radius: var(--radius-full);
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    flex-shrink: 0;
}
.doc-h3 {
    font-size: 1rem; font-weight: 700;
    color: var(--text-secondary); margin-top: 28px; margin-bottom: 8px;
}
.doc-p {
    font-size: 0.92rem; color: var(--text-secondary);
    line-height: 1.8; margin-bottom: 16px;
}
.doc-p code {
    background: rgba(99,102,241,0.1); color: var(--accent-secondary);
    padding: 2px 6px; border-radius: 4px; font-weight: 500;
}

/* Callout boxes */
.doc-callout {
    padding: 16px 18px; border-radius: var(--radius-md);
    margin: 16px 0; border: 1px solid;
}
.doc-callout.info {
    background: var(--accent-glow); border-color: rgba(99,102,241,0.2);
    color: var(--accent-secondary);
}
.doc-callout.warning {
    background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.2);
    color: #fbbf24;
}
.doc-callout-title {
    font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.06em; margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
}
.doc-callout-text { font-size: 0.82rem; line-height: 1.7; }
.doc-callout-text code {
    background: rgba(0,0,0,0.2); padding: 1px 5px; border-radius: 3px;
    font-family: var(--font-mono);
}

/* Code blocks */
.code-block {
    border-radius: var(--radius-md); overflow: hidden;
    background: var(--bg-code); border: 1px solid var(--border-subtle);
    margin: 16px 0; box-shadow: var(--shadow-sm);
}
.code-block-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px; background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-subtle);
}
.code-block-dots { display: flex; gap: 5px; }
.code-block-dot { width: 8px; height: 8px; border-radius: 50%; }
.code-block-dot.red { background: rgba(239,68,68,0.7); }
.code-block-dot.yellow { background: rgba(245,158,11,0.7); }
.code-block-dot.green { background: rgba(16,185,129,0.7); }
.code-block-lang {
    font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-disabled);
}
.code-block-copy {
    display: flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 4px;
    background: transparent; border: none;
    color: var(--text-muted); cursor: pointer; font-size: 0.68rem;
    font-weight: 600; font-family: var(--font-sans);
    transition: all var(--transition-fast);
}
.code-block-copy:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.code-block pre {
    padding: 16px; overflow-x: auto;
    font-family: var(--font-mono); font-size: 0.82rem;
    line-height: 1.7; color: #e2e8f0;
}

/* Tables */
.doc-table-wrap {
    overflow-x: auto; border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle); margin: 16px 0;
}
.doc-table {
    width: 100%; border-collapse: collapse; font-size: 0.82rem;
}
.doc-table thead { background: rgba(255,255,255,0.03); }
.doc-table th {
    padding: 10px 14px; font-weight: 700; text-align: left;
    font-size: 0.72rem; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-muted);
    border-bottom: 1px solid var(--border-medium);
}
[dir="rtl"] .doc-table th { text-align: right; }
.doc-table td {
    padding: 10px 14px; border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary); font-family: var(--font-mono);
}
.doc-table tr:last-child td { border-bottom: none; }
.doc-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Lists */
.doc-list { padding-left: 20px; margin: 12px 0; }
[dir="rtl"] .doc-list { padding-left: 0; padding-right: 20px; }
.doc-list li {
    font-size: 0.88rem; color: var(--text-secondary);
    line-height: 1.8; margin-bottom: 6px;
}
.doc-list li code {
    background: rgba(99,102,241,0.1); color: var(--accent-secondary);
    padding: 1px 5px; border-radius: 3px;
}

/* Navigation arrows */
.doc-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 48px; padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}
.doc-nav-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: var(--radius-md);
    background: transparent; border: 1px solid var(--border-subtle);
    color: var(--text-muted); font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: all var(--transition-fast); font-family: var(--font-sans);
}
.doc-nav-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-medium); }

/* ─── API Playground ──────────────────────────────────────────────────── */
.playground-card {
    background: var(--bg-card); border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg); padding: 24px;
    margin-top: 40px; box-shadow: var(--shadow-md);
}
.playground-header {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 14px; margin-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.playground-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.92rem; font-weight: 800; color: var(--text-primary);
}
.playground-live-badge {
    font-size: 0.6rem; font-weight: 800; padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--success-glow); color: var(--success);
    border: 1px solid rgba(16,185,129,0.2);
}
.playground-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    margin-bottom: 16px;
}
@media (max-width: 768px) { .playground-grid { grid-template-columns: 1fr; } }
.playground-field label {
    display: block; font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-disabled); margin-bottom: 4px;
}
.playground-field input, .playground-field select {
    width: 100%; padding: 10px 12px;
    background: var(--bg-input); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-family: var(--font-mono); font-size: 0.82rem;
    outline: none; transition: border-color var(--transition-fast);
}
.playground-field input:focus, .playground-field select:focus { border-color: var(--accent-primary); }
.playground-field select { cursor: pointer; appearance: none; }
.playground-send-btn {
    width: 100%; padding: 12px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, #059669, #10b981);
    border: none; color: white; font-weight: 700; font-size: 0.88rem;
    cursor: pointer; transition: all var(--transition-fast);
    box-shadow: 0 2px 12px rgba(16,185,129,0.25); font-family: var(--font-sans);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.playground-send-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(16,185,129,0.35); }
.playground-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.playground-result {
    margin-top: 16px; border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle); overflow: hidden;
    background: var(--bg-code);
}
.playground-result-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px; background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-subtle);
}
.status-badge {
    font-size: 0.68rem; font-weight: 800; padding: 2px 8px;
    border-radius: 4px;
}
.status-badge.success { color: var(--success); background: var(--success-glow); border: 1px solid rgba(16,185,129,0.2); }
.status-badge.error { color: var(--error); background: var(--error-glow); border: 1px solid rgba(239,68,68,0.2); }
.latency-badge { font-size: 0.68rem; color: var(--text-muted); font-family: var(--font-mono); }
.playground-result pre {
    padding: 14px; overflow-x: auto; max-height: 300px;
    font-family: var(--font-mono); font-size: 0.78rem;
    line-height: 1.6; color: #e2e8f0;
}

/* ─── API Keys View ───────────────────────────────────────────────────── */
.keys-view { padding: 32px 48px; overflow-y: auto; flex: 1; }
.keys-inner { max-width: 960px; margin: 0 auto; }
.keys-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.keys-title h2 {
    font-size: 1.35rem; font-weight: 900; letter-spacing: -0.02em;
    display: flex; align-items: center; gap: 8px;
}
.keys-title p { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

.keys-table-wrap {
    border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
    overflow: hidden; background: var(--bg-card);
}
.keys-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.keys-table thead { background: rgba(255,255,255,0.03); }
.keys-table th {
    padding: 12px 16px; font-weight: 700; text-align: left;
    font-size: 0.68rem; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-disabled);
    border-bottom: 1px solid var(--border-medium);
}
.keys-table td {
    padding: 12px 16px; border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
.keys-table tr:last-child td { border-bottom: none; }
.keys-table tr:hover td { background: rgba(255,255,255,0.02); }
.key-preview {
    font-family: var(--font-mono); font-size: 0.78rem;
    background: rgba(0,0,0,0.3); padding: 4px 8px;
    border-radius: 4px; color: var(--text-muted);
}
.key-status {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.68rem; font-weight: 800; padding: 3px 10px;
    border-radius: var(--radius-full);
}
.key-status.active {
    background: var(--success-glow); color: var(--success);
    border: 1px solid rgba(16,185,129,0.2);
}
.key-status.revoked {
    background: var(--error-glow); color: var(--error);
    border: 1px solid rgba(239,68,68,0.2);
}
.key-status-dot { width: 5px; height: 5px; border-radius: 50%; }
.key-status.active .key-status-dot { background: var(--success); }
.key-status.revoked .key-status-dot { background: var(--error); }

.keys-empty {
    text-align: center; padding: 48px 24px;
    color: var(--text-muted);
}
.keys-empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.keys-empty h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text-secondary); }
.keys-empty p { font-size: 0.82rem; }

/* Generated key banner */
.key-generated-banner {
    padding: 20px; border-radius: var(--radius-lg); margin-bottom: 20px;
    background: var(--success-glow); border: 2px solid rgba(16,185,129,0.3);
}
.key-generated-banner h3 {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.92rem; font-weight: 800; color: var(--success); margin-bottom: 8px;
}
.key-generated-banner p { font-size: 0.78rem; color: rgba(16,185,129,0.8); margin-bottom: 12px; }
.key-generated-display {
    display: flex; align-items: center; gap: 8px;
    background: rgba(0,0,0,0.3); border: 1px solid rgba(16,185,129,0.15);
    border-radius: var(--radius-md); padding: 12px;
}
.key-generated-display code {
    flex: 1; font-family: var(--font-mono); font-size: 0.88rem;
    color: #6ee7b7; word-break: break-all;
}

/* ─── Modals / Dialogs ────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
    background: var(--bg-secondary); border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl); padding: 28px;
    width: 100%; max-width: 440px;
    box-shadow: var(--shadow-lg);
    animation: cardIn 0.3s cubic-bezier(0.16,1,0.3,1);
}
.modal-card h3 {
    font-size: 1.1rem; font-weight: 800;
    margin-bottom: 16px; color: var(--text-primary);
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ─── Loading spinner ─────────────────────────────────────────────────── */
.spinner {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* User menu */
.user-menu-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 5px; border-radius: var(--radius-full);
    background: var(--bg-hover); border: 1px solid var(--border-subtle);
    cursor: pointer; transition: all var(--transition-fast); font-family: var(--font-sans);
    color: var(--text-primary);
}
.user-menu-btn:hover { border-color: var(--border-medium); }
.user-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.68rem; font-weight: 800; color: white;
}
.user-name { font-size: 0.78rem; font-weight: 600; }

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sidebar { width: 240px; }
    .main-content { padding: 24px; }
    .keys-view { padding: 24px; }
}
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { padding: 16px; }
    .keys-view { padding: 16px; }
    .header-nav-btn span { display: none; }
    .playground-grid { grid-template-columns: 1fr; }
}

/* ─── JSON Syntax Highlighting ────────────────────────────────────────── */
.json-key { color: #93c5fd; font-weight: 600; }
.json-string { color: #6ee7b7; }
.json-number { color: #c4b5fd; font-family: var(--font-mono); }
.json-boolean { color: #fbbf24; font-weight: 700; }
.json-null { color: var(--text-disabled); font-style: italic; }

/* ─── Theme Dropdown Settings ────────────────────────────────────────── */
.theme-dropdown-menu {
    position: absolute;
    top: 45px;
    right: 0;
    width: 190px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    padding: 8px 0;
    animation: fadeIn var(--transition-fast);
}
[dir="rtl"] .theme-dropdown-menu {
    right: auto;
    left: 0;
}
.theme-dropdown-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 6px 14px 10px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 6px;
}
.theme-dropdown-list {
    display: flex;
    flex-direction: column;
    max-height: 240px;
    overflow-y: auto;
}
.theme-opt-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
}
[dir="rtl"] .theme-opt-btn {
    text-align: right;
}
.theme-opt-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.theme-opt-btn.active {
    font-weight: 700;
    color: var(--accent-secondary);
    background: var(--accent-glow);
}
.theme-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}