/* ═══════════════════════════════════════════════════════════════
   KPSS Zamanı Web Panel — Main Stylesheet
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* Brand Colors — landing paletiyle senkron (mavi yok, AI-gradient yok) */
    --primary: #58CC02;
    --primary-dark: #46A302;
    --primary-light: #68E310;
    --primary-bg: rgba(88, 204, 2, 0.10);

    --accent: #FFC800;
    --accent-dark: #E0A800;
    --accent-light: #FFD63D;

    --danger: #FF4B4B;
    --danger-dark: #D93030;
    --danger-bg: rgba(255, 75, 75, 0.10);

    --warning: #FFA726;
    --warning-dark: #E0881C;
    --warning-bg: rgba(255, 167, 38, 0.10);

    --success: #58CC02;
    --success-bg: rgba(88, 204, 2, 0.10);

    --info: #1B1B1B;
    --info-bg: rgba(27, 27, 27, 0.06);

    /* Light Theme (Default) */
    --bg-primary: #F7F7F7;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F0F0F0;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FAFAFA;
    --bg-input: #F5F5F5;
    --card-bg: var(--bg-card);
    --surface: var(--bg-card);
    --surface-alt: var(--bg-tertiary);

    --text-primary: #1B1B1B;
    --text-secondary: #4B4B4B;
    --text-muted: #6B6B6B;
    --text-inverse: #FFFFFF;

    --border: rgba(27, 27, 27, 0.08);
    --border-light: rgba(27, 27, 27, 0.14);
    --border-focus: var(--primary);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.14);
    --shadow-glow: 0 0 20px rgba(88, 204, 2, 0.28);

    /* Course Colors */
    --course-history: #FFA726;
    --course-history-bg: rgba(255, 167, 38, 0.15);
    --course-geography: #66BB6A;
    --course-geography-bg: rgba(102, 187, 106, 0.15);
    --course-math: #42A5F5;
    --course-math-bg: rgba(66, 165, 245, 0.15);
    --course-citizenship: #AB47BC;
    --course-citizenship-bg: rgba(171, 71, 188, 0.15);

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 68px;
    --topnav-height: 60px;
    --content-max-width: 1400px;

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

    --transition-fast: 0.15s ease;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    --z-sidebar: 100;
    --z-topnav: 110;
    --z-modal: 200;
    --z-toast: 300;

    /* Safe-area insets (iPhone notch / Dynamic Island) */
    --safe-top:    env(safe-area-inset-top,    0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left:   env(safe-area-inset-left,   0px);
    --safe-right:  env(safe-area-inset-right,  0px);
}

/* ─── Dark Theme Override ────────────────────────────────────── */
[data-theme="dark"] {
    --bg-primary: #0E0E0E;
    --bg-secondary: #161616;
    --bg-tertiary: #1F1F1F;
    --bg-card: #1A1A1A;
    --bg-card-hover: #222222;
    --bg-input: #1F1F1F;
    --card-bg: var(--bg-card);
    --surface: var(--bg-card);
    --surface-alt: var(--bg-tertiary);

    --text-primary: #F5F5F5;
    --text-secondary: #BDBDBD;
    --text-muted: #8A8A8A;
    --text-inverse: #0E0E0E;

    --border: rgba(255, 255, 255, 0.07);
    --border-light: rgba(255, 255, 255, 0.12);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 22px rgba(88, 204, 2, 0.32);

    /* Light-mode --info is near-black; remap to a readable sky tone for dark surfaces. */
    --info: #7DD3FC;
    --info-bg: rgba(125, 211, 252, 0.14);
}

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

html {
    scroll-behavior: smooth;
    font-size: 14px;
    background: var(--bg-primary);
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

body.no-scroll {
    overflow: hidden;
    padding-bottom: var(--safe-bottom);
}

/* ─── Sidebar Backdrop ───────────────────────────────────────── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: calc(var(--z-sidebar) - 1);
    transition: background 0.25s ease;
}
.sidebar-backdrop.visible {
    display: block;
    background: rgba(0, 0, 0, 0.45);
}

/* ─── Public Landing ────────────────────────────────────────── */
.landing-screen {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(160deg, #EFF3FF 0%, #FFFFFF 55%, #F0FAFB 100%);
}

.landing-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.landing-bg::before {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    top: -200px;
    left: -150px;
    background: radial-gradient(circle, rgba(88, 204, 2, 0.12), transparent 70%);
    animation: float 12s ease-in-out infinite;
}

.landing-bg::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(88, 204, 2, 0.1), transparent 70%);
    animation: float 10s ease-in-out infinite reverse, blob-drift 18s ease-in-out infinite;
}

[data-theme="dark"] .landing-screen {
    background: radial-gradient(circle at 15% 15%, rgba(25, 166, 214, 0.25), transparent 40%),
                radial-gradient(circle at 85% 30%, rgba(88, 204, 2, 0.18), transparent 38%),
                radial-gradient(circle at 90% 90%, rgba(0, 203, 169, 0.15), transparent 35%),
                linear-gradient(130deg, #030d1c 0%, #061e3d 45%, #030d1c 100%);
}

[data-theme="dark"] .landing-bg::before {
    background: rgba(0, 212, 255, 0.38);
    filter: blur(40px);
    opacity: 0.55;
}

[data-theme="dark"] .landing-bg::after {
    background: rgba(255, 154, 87, 0.32);
    filter: blur(40px);
    opacity: 0.5;
}

.landing-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 38px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    gap: 12px;
}

[data-theme="dark"] .landing-header {
    background: rgba(7, 15, 40, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.landing-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    color: var(--text-primary);
}
.landing-brand i { color: var(--primary); }

.landing-content {
    position: relative;
    z-index: 1;
    max-width: 1540px;
    margin: 0 auto;
    padding: 36px 40px 20px;
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - 60px);
}

.landing-grid {
    display: grid;
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr) minmax(310px, 420px);
    gap: 36px;
    align-items: center;
    flex: 1;
}

.landing-owl {
    display: flex;
    justify-content: center;
    align-items: center;
}

.landing-owl img {
    width: 100%;
    min-width: 230px;
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 14px 28px rgba(88, 204, 2, 0.25));
    animation: float 6s ease-in-out infinite;
    transform: translateX(-20px) scale(1.12);
}

[data-theme="dark"] .landing-owl img {
    filter: drop-shadow(0 14px 28px rgba(0, 212, 255, 0.2));
}

@media (max-width: 1280px) {
    .landing-grid {
        grid-template-columns: minmax(200px, 280px) minmax(0, 1fr) minmax(300px, 400px);
        gap: 28px;
    }
    .landing-owl img {
        max-width: 320px;
        min-width: 200px;
    }
    .landing-hero h1 {
        font-size: clamp(28px, 3.5vw, 48px);
    }
}

@media (max-width: 1024px) {
    .landing-grid {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
        gap: 28px;
    }
    .landing-owl {
        display: none;
    }
    .landing-content {
        padding: 32px 28px 16px;
    }
}

.hero-eyebrow #kpss-year {
    margin-right: 4px;
}

.hero-eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
    border: 1px solid rgba(88, 204, 2, 0.3);
    background: rgba(88, 204, 2, 0.08);
    animation: fadeSlideDown 0.55s ease;
}

[data-theme="dark"] .hero-eyebrow {
    color: #8beaff;
    border-color: rgba(139, 234, 255, 0.35);
    background: rgba(7, 45, 82, 0.8);
}

.landing-hero h1 {
    font-family: 'Sora', sans-serif;
    font-size: clamp(30px, 4.2vw, 56px);
    line-height: 1.08;
    font-weight: 800;
    max-width: 840px;
    margin-bottom: 16px;
    color: var(--text-primary);
    animation: fadeSlideUp 0.65s ease;
    letter-spacing: -0.5px;
}

[data-theme="dark"] .landing-hero h1 { color: #e8fbff; }

.landing-hero p {
    font-size: clamp(14px, 1.6vw, 17px);
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 22px;
    animation: fadeSlideUp 0.75s ease;
    line-height: 1.7;
}

[data-theme="dark"] .landing-hero p { color: #c8e9f4; }

.store-grid {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    animation: fadeSlideUp 0.85s ease;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    border-radius: 14px;
    border: 1.5px solid rgba(88, 204, 2, 0.18);
    background: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
    min-width: 200px;
    text-align: left;
    transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.store-btn:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(88, 204, 2, 0.18);
}

[data-theme="dark"] .store-btn {
    background: rgba(9, 29, 51, 0.78);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

[data-theme="dark"] .store-btn:hover {
    background: rgba(16, 53, 90, 0.9);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.32);
}

.store-btn svg { width: 26px; height: 26px; flex-shrink: 0; color: var(--primary); }
[data-theme="dark"] .store-btn svg { color: #f4fbff; }
.store-btn span { display: block; color: var(--text-muted); font-size: 11px; line-height: 1.1; }
.store-btn strong { display: block; font-size: 17px; line-height: 1.2; font-family: 'Sora', sans-serif; color: var(--text-primary); }
[data-theme="dark"] .store-btn span { color: #b8d5e2; }
[data-theme="dark"] .store-btn strong { color: #fff; }

.landing-cta-row { margin-top: 4px; animation: fadeSlideUp 0.95s ease; }

.landing-side { display: grid; gap: 10px; animation: fadeSlideLeft 0.9s ease; }

.landing-side > .showcase-card {
    width: 100%;
}

.showcase-card {
    border: 1px solid rgba(88, 204, 2, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    padding: 14px 16px;
    backdrop-filter: blur(8px);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(88, 204, 2, 0.1);
    border-color: rgba(88, 204, 2, 0.4);
}

.showcase-card h3 { font-family: 'Sora', sans-serif; font-size: 14px; margin-bottom: 6px; color: var(--text-primary); }
.showcase-card p { margin: 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }
.showcase-metric { font-size: 26px; line-height: 1.1; font-family: 'Sora', sans-serif; margin-bottom: 6px; color: var(--primary); font-weight: 700; }

.showcase-bar { height: 6px; border-radius: 99px; background: var(--bg-tertiary); overflow: hidden; margin-bottom: 6px; }
.showcase-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; transition: width 0.8s cubic-bezier(0.16,1,0.3,1); }

.showcase-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.showcase-card li { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-secondary); border-bottom: 1px dashed var(--border); padding-bottom: 5px; }
.showcase-card li:last-child { border-bottom: none; padding-bottom: 0; }
.showcase-card li strong { font-family: 'Sora', sans-serif; color: var(--primary); min-width: 34px; text-align: right; font-size: 12px; }

/* Distribution list with mini progress bars */
.ldg-dist-list li { display: grid; grid-template-columns: 80px 1fr 36px; align-items: center; gap: 8px; }
.ldg-dist-label { font-size: 11.5px; color: var(--text-secondary); white-space: nowrap; }
.ldg-dist-bar-track { height: 5px; border-radius: 99px; background: var(--bg-tertiary); overflow: hidden; }
.ldg-dist-bar-fill  { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--accent)); width: 0; transition: width 0.8s cubic-bezier(0.16,1,0.3,1); }

[data-theme="dark"] .showcase-card { background: linear-gradient(180deg, rgba(8,33,59,0.88), rgba(7,25,46,0.82)); border-color: rgba(255,255,255,0.12); box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
[data-theme="dark"] .showcase-card:hover { border-color: rgba(127,227,255,0.45); box-shadow: 0 8px 28px rgba(0,0,0,0.35); }
[data-theme="dark"] .showcase-card h3 { color: #e8f9ff; }
[data-theme="dark"] .showcase-card p { color: #b7d7e3; }
[data-theme="dark"] .showcase-metric { color: #ecfbff; }
[data-theme="dark"] .showcase-card li { color: #c4e4ee; border-bottom-color: rgba(255,255,255,0.12); }
[data-theme="dark"] .showcase-card li strong { color: #eaffff; }

.floating-a,
.floating-b,
.floating-c {
    animation: none;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    vertical-align: middle;
    color: #fff;
    background: linear-gradient(90deg, #4285f4, #9b72cb, #d96570, #f4b400, #0f9d58, #4285f4);
    background-size: 300% 100%;
    border: none;
    animation: aiBadgeShimmer 4s linear infinite;
    box-shadow: 0 0 8px rgba(66, 133, 244, 0.5), 0 0 16px rgba(155, 114, 203, 0.3);
}

@keyframes aiBadgeShimmer {
    0%   { background-position: 0% 0; }
    100% { background-position: 300% 0; }
}

.ai-badge i {
    font-size: 10px;
    filter: drop-shadow(0 0 3px rgba(255,255,255,0.8));
}

[data-theme="dark"] .ai-badge {
    box-shadow: 0 0 10px rgba(66, 133, 244, 0.6), 0 0 20px rgba(155, 114, 203, 0.4);
}

.landing-hero .btn-secondary {
    background: rgba(88, 204, 2, 0.08);
    border: 1px solid rgba(88, 204, 2, 0.2);
    color: var(--primary);
}

.landing-hero .btn-secondary:hover {
    background: rgba(88, 204, 2, 0.14);
    border-color: var(--primary);
}

[data-theme="dark"] .landing-hero .btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

[data-theme="dark"] .landing-hero .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--primary); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

::selection {
    background: var(--primary);
    color: white;
}

/* ─── Auth Screen — Landing aligned (neobrutalism) ─────────────
 * Chunky 2px ink border + 4px solid shadow kartlar.
 * Renkler landing paletiyle senkron: green/ink/warm/alert/orange.
 * AI-gradient, glass morphism, radial blur YASAK.
 */
.auth-screen {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 32px 20px;
    background: #E8F7DC; /* landing --ld-bg-mint */
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

[data-theme="dark"] .auth-screen {
    background: #1A2816; /* landing dark --ld-bg-mint */
}

.auth-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Dekoratif konfeti — solid renkli chunky şekiller (blur YOK) */
.floating-shape {
    position: absolute;
    background: none;
    filter: none;
    opacity: 1;
    border: 2.5px solid #1B1B1B;
    pointer-events: none;
    will-change: transform;
}
[data-theme="dark"] .floating-shape { border-color: #F5F5F5; }

.shape-1 {
    --rot: -8deg;
    width: 56px; height: 56px;
    background: #58CC02;
    border-radius: 50%;
    top: 12%; left: 8%;
    box-shadow: 0 4px 0 #46A302;
    animation: auth-bob 6s ease-in-out infinite alternate;
    animation-delay: 0s;
}
.shape-2 {
    --rot: 12deg;
    width: 64px; height: 64px;
    background: #FFC800;
    border-radius: 16px;
    bottom: 14%; right: 10%;
    box-shadow: 0 4px 0 #E0A800;
    animation: auth-bob 5.2s ease-in-out infinite alternate-reverse;
    animation-delay: 1s;
}
.shape-3 {
    --rot: 6deg;
    width: 42px; height: 42px;
    background: #FF4B4B;
    border-radius: 50%;
    top: 18%; right: 12%;
    box-shadow: 0 4px 0 #D93030;
    animation: auth-bob 7s ease-in-out infinite alternate;
    animation-delay: 2s;
}
.shape-4 {
    --rot: -14deg;
    width: 58px; height: 58px;
    background: #FFA726;
    border-radius: 14px;
    bottom: 20%; left: 9%;
    box-shadow: 0 4px 0 #E0881C;
    animation: auth-bob 6.4s ease-in-out infinite alternate-reverse;
    animation-delay: 0.5s;
}

@keyframes auth-bob {
    from { transform: translateY(-10px) rotate(var(--rot, 0deg)); }
    to   { transform: translateY(12px)  rotate(calc(var(--rot, 0deg) + 10deg)); }
}

@media (max-width: 560px) {
    .shape-1 { width: 42px; height: 42px; top: 6%; left: 6%; }
    .shape-2 { width: 48px; height: 48px; bottom: 6%; right: 6%; }
    .shape-3 { display: none; }
    .shape-4 { display: none; }
}

.auth-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    padding: 36px 32px 32px;
    background: #FFFFFF;
    backdrop-filter: none;
    border: 2.5px solid #1B1B1B;
    border-radius: 24px;
    box-shadow: 0 6px 0 #1B1B1B;
}

[data-theme="dark"] .auth-container {
    background: #1A1A1A;
    border-color: #F5F5F5;
    box-shadow: 0 6px 0 #F5F5F5;
}

/* ── Üst köşedeki "Ana Sayfaya Dön" tuşu ─────────────────────── */
.auth-toprow {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 14px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo .logo-icon {
    width: 72px;
    height: 72px;
    background: #58CC02;
    border: 2.5px solid #1B1B1B;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 30px;
    color: #FFFFFF;
    box-shadow: 0 4px 0 #1B1B1B;
    animation: auth-logo-bob 3.6s ease-in-out infinite alternate;
}
[data-theme="dark"] .auth-logo .logo-icon {
    border-color: #F5F5F5;
    box-shadow: 0 4px 0 #F5F5F5;
}

@keyframes auth-logo-bob {
    from { transform: translateY(-3px) rotate(-3deg); }
    to   { transform: translateY(3px)  rotate(3deg); }
}

.auth-logo h1 {
    font-family: 'Sora', 'Manrope', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1B1B1B;
    background: none;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    background-clip: border-box;
    margin: 0;
    line-height: 1.15;
}
[data-theme="dark"] .auth-logo h1 { color: #F5F5F5; }

.auth-logo p,
.auth-subtitle {
    color: #6B6B6B;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    line-height: 1.5;
}
[data-theme="dark"] .auth-logo p,
[data-theme="dark"] .auth-subtitle { color: #9A9A9A; }

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form__intro {
    color: #6B6B6B;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    margin: 0 0 4px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.auth-form__intro i { color: #46A302; font-size: 14px; flex-shrink: 0; }
[data-theme="dark"] .auth-form__intro { color: #9A9A9A; }
[data-theme="dark"] .auth-form__intro i { color: #68E310; }

.auth-form__title {
    font-family: 'Sora', 'Manrope', system-ui, sans-serif;
    color: #1B1B1B;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-align: center;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    line-height: 1.2;
}
.auth-form__title i { color: #46A302; font-size: 18px; flex-shrink: 0; }
[data-theme="dark"] .auth-form__title { color: #F5F5F5; }
[data-theme="dark"] .auth-form__title i { color: #68E310; }

.auth-form__footer {
    text-align: center;
    margin-top: 2px;
}

.auth-form__hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 6px;
    padding: 12px 14px;
    border: 1px solid rgba(70, 163, 2, 0.28);
    background: rgba(70, 163, 2, 0.07);
    border-radius: 12px;
    color: #3A3A3A;
    font-size: 12.5px;
    line-height: 1.55;
    text-align: left;
}
.auth-form__hint-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(70, 163, 2, 0.14);
    color: #46A302;
    font-size: 13px;
    margin-top: 1px;
}
.auth-form__hint-body { flex: 1; min-width: 0; }
.auth-form__hint-body strong {
    display: block;
    font-weight: 700;
    color: #1B1B1B;
    margin-bottom: 2px;
    font-size: 13px;
}
.auth-form__hint-body b { font-weight: 700; color: #1B1B1B; }

[data-theme="dark"] .auth-form__hint {
    color: #C8C8C8;
    background: rgba(104, 227, 16, 0.08);
    border-color: rgba(104, 227, 16, 0.28);
}
[data-theme="dark"] .auth-form__hint-icon {
    background: rgba(104, 227, 16, 0.16);
    color: #68E310;
}
[data-theme="dark"] .auth-form__hint-body strong,
[data-theme="dark"] .auth-form__hint-body b { color: #F5F5F5; }

.auth-form__turnstile {
    display: flex;
    justify-content: center;
    margin: 2px 0 6px;
}

/* ── Input group — auth scoped ───────────────────────────────── */
.auth-screen .input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-screen .input-group i {
    position: absolute;
    left: 18px;
    color: #1B1B1B;
    font-size: 15px;
    transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    opacity: 0.75;
}
[data-theme="dark"] .auth-screen .input-group i { color: #F5F5F5; }

.auth-screen .input-group input,
.auth-screen .input-group select,
.auth-screen .input-group textarea {
    width: 100%;
    padding: 14px 16px 14px 46px;
    background: #FAFAFA;
    border: 2px solid #1B1B1B;
    border-radius: 14px;
    color: #1B1B1B;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    transition: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1),
                background 150ms cubic-bezier(0.4, 0, 0.2, 1),
                transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 0 0 transparent;
}

[data-theme="dark"] .auth-screen .input-group input,
[data-theme="dark"] .auth-screen .input-group select,
[data-theme="dark"] .auth-screen .input-group textarea {
    background: #222222;
    border-color: #F5F5F5;
    color: #F5F5F5;
}

.auth-screen .input-group input::placeholder,
.auth-screen .input-group textarea::placeholder {
    color: #9A9A9A;
    font-weight: 500;
}

.auth-screen .input-group input:focus,
.auth-screen .input-group select:focus,
.auth-screen .input-group textarea:focus {
    background: #FFFFFF;
    border-color: #46A302;
    box-shadow: 0 4px 0 #46A302;
}
[data-theme="dark"] .auth-screen .input-group input:focus,
[data-theme="dark"] .auth-screen .input-group select:focus,
[data-theme="dark"] .auth-screen .input-group textarea:focus {
    background: #2A2A2A;
}

.auth-screen .input-group:focus-within i {
    color: #46A302;
    opacity: 1;
}

/* ─── OTP Inputs — chunky 3D ─────────────────────────────────── */
.auth-screen .otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 8px 0 6px;
}

.auth-screen .otp-input {
    width: 46px;
    height: 56px;
    border-radius: 14px;
    border: 2px solid #1B1B1B;
    background: #FAFAFA;
    color: #1B1B1B;
    font-family: 'Sora', 'Manrope', system-ui, sans-serif;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    outline: none;
    caret-color: #58CC02;
    letter-spacing: 0;
    box-shadow: 0 3px 0 #1B1B1B;
    transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1),
                background 150ms cubic-bezier(0.4, 0, 0.2, 1),
                color 150ms cubic-bezier(0.4, 0, 0.2, 1);
    -moz-appearance: textfield;
}
[data-theme="dark"] .auth-screen .otp-input {
    background: #222222;
    border-color: #F5F5F5;
    color: #F5F5F5;
    box-shadow: 0 3px 0 #F5F5F5;
}

.auth-screen .otp-input::-webkit-outer-spin-button,
.auth-screen .otp-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.auth-screen .otp-input:focus {
    background: #FFFFFF;
    border-color: #46A302;
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #46A302;
}
[data-theme="dark"] .auth-screen .otp-input:focus {
    background: #2A2A2A;
    border-color: #6FE00B;
    box-shadow: 0 5px 0 #3A8A00;
}

.auth-screen .otp-input.filled {
    background: #58CC02;
    color: #FFFFFF;
    border-color: #46A302;
    box-shadow: 0 3px 0 #46A302;
}

/* ─── Auth buttons — chunky 3D (scoped) ──────────────────────── */
.auth-screen .btn {
    font-family: 'Sora', 'Manrope', system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: 0.04em;
    border-radius: 14px;
    transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1),
                background 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-screen .btn::after { display: none; }
.auth-screen .btn:active { transform: translateY(2px); }

.auth-screen .btn-primary,
.auth-screen .btn-primary.btn-full {
    background: #58CC02;
    color: #FFFFFF;
    border: 2px solid #46A302;
    box-shadow: 0 4px 0 #46A302;
    text-transform: uppercase;
    font-size: 14px;
    padding: 14px 24px;
}
.auth-screen .btn-primary:hover {
    background: #68E310;
    box-shadow: 0 4px 0 #46A302;
}
.auth-screen .btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #46A302;
}
[data-theme="dark"] .auth-screen .btn-primary {
    background: #58CC02;
    border-color: #3A8A00;
    box-shadow: 0 4px 0 #3A8A00;
}
[data-theme="dark"] .auth-screen .btn-primary:hover { background: #6FE00B; }
[data-theme="dark"] .auth-screen .btn-primary:active { box-shadow: 0 2px 0 #3A8A00; }

.auth-screen .btn-ghost {
    background: transparent;
    color: #1B1B1B;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0;
    text-transform: none;
}
.auth-screen .btn-ghost:hover { background: rgba(27, 27, 27, 0.08); color: #1B1B1B; }
[data-theme="dark"] .auth-screen .btn-ghost { color: #F5F5F5; }
[data-theme="dark"] .auth-screen .btn-ghost:hover { background: rgba(245, 245, 245, 0.08); color: #F5F5F5; }

/* "Ana Sayfaya Dön" — daha belirgin ama chunky pill */
.auth-screen #btn-back-landing {
    background: #FFFFFF;
    color: #1B1B1B;
    border: 2px solid #1B1B1B;
    box-shadow: 0 3px 0 #1B1B1B;
    padding: 8px 14px 8px 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    border-radius: 999px;
}
.auth-screen #btn-back-landing:hover { background: #FAFAFA; }
.auth-screen #btn-back-landing:active { transform: translateY(2px); box-shadow: 0 1px 0 #1B1B1B; }
[data-theme="dark"] .auth-screen #btn-back-landing {
    background: #1A1A1A;
    color: #F5F5F5;
    border-color: #F5F5F5;
    box-shadow: 0 3px 0 #F5F5F5;
}
[data-theme="dark"] .auth-screen #btn-back-landing:hover { background: #222222; }
[data-theme="dark"] .auth-screen #btn-back-landing:active { box-shadow: 0 1px 0 #F5F5F5; }

/* ── Şifremi unuttum / Kodu tekrar gönder / Giriş ekranına dön
      gibi küçük text-link'ler */
.auth-screen #btn-forgot-password,
.auth-screen #verify-email-resend-btn,
.auth-screen #verify-email-back-btn,
.auth-screen #btn-back-to-login-from-step1,
.auth-screen #btn-back-to-forgot-step1 {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #46A302;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    padding: 6px 10px;
    border-radius: 10px;
}
.auth-screen #btn-forgot-password:hover,
.auth-screen #verify-email-resend-btn:hover,
.auth-screen #btn-back-to-login-from-step1:hover,
.auth-screen #btn-back-to-forgot-step1:hover {
    background: rgba(88, 204, 2, 0.10);
    color: #46A302;
}
[data-theme="dark"] .auth-screen #btn-forgot-password,
[data-theme="dark"] .auth-screen #verify-email-resend-btn,
[data-theme="dark"] .auth-screen #verify-email-back-btn,
[data-theme="dark"] .auth-screen #btn-back-to-login-from-step1,
[data-theme="dark"] .auth-screen #btn-back-to-forgot-step1 {
    color: #68E310;
}

.auth-screen #verify-email-back-btn,
.auth-screen #btn-back-to-login-from-step1,
.auth-screen #btn-back-to-forgot-step1 { color: #6B6B6B; }
[data-theme="dark"] .auth-screen #verify-email-back-btn,
[data-theme="dark"] .auth-screen #btn-back-to-login-from-step1,
[data-theme="dark"] .auth-screen #btn-back-to-forgot-step1 { color: #9A9A9A; }
.auth-screen #verify-email-back-btn:hover,
.auth-screen #btn-back-to-login-from-step1:hover,
.auth-screen #btn-back-to-forgot-step1:hover { color: #1B1B1B; background: rgba(27,27,27,0.06); }
[data-theme="dark"] .auth-screen #verify-email-back-btn:hover,
[data-theme="dark"] .auth-screen #btn-back-to-login-from-step1:hover,
[data-theme="dark"] .auth-screen #btn-back-to-forgot-step1:hover { color: #F5F5F5; background: rgba(245,245,245,0.08); }

/* ── Error mesaj — chunky ruh ─────────────────────────────────── */
.auth-screen .error-message {
    background: #FFE5E5;
    color: #B31818;
    border: 2px solid #D93030;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 13.5px;
    box-shadow: 0 3px 0 #D93030;
    text-align: center;
}
[data-theme="dark"] .auth-screen .error-message {
    background: #2C1A1A;
    color: #FFB3B3;
    border-color: #C92A2A;
    box-shadow: 0 3px 0 #C92A2A;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(88, 204, 2, 0.3);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(88, 204, 2, 0.5); }

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), var(--accent-dark));
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-dark));
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), var(--warning-dark));
    color: var(--text-inverse);
}
.btn-warning:hover { box-shadow: 0 6px 20px rgba(255, 167, 38, 0.45); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-tertiary); }

.btn-outline { background: var(--bg-primary); border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline.active, [data-gc-tool].active { background: var(--primary); color: #fff; border-color: var(--primary); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-full { width: 100%; }

.btn-icon {
    width: 36px; height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
}
.btn-icon.btn-sm { width: 28px; height: 28px; font-size: 12px; }

.btn .btn-loader { display: none; }
.btn.loading .btn-text { display: none; }
.btn.loading .btn-loader { display: inline-flex; }

/* ─── Top Navigation ────────────────────────────────────────── */
.top-nav {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topnav-height);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: var(--z-topnav);
    transition: left var(--transition);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
}

.nav-brand {
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
}

.nav-brand i {
    color: var(--primary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.breadcrumb-item { display: flex; align-items: center; gap: 8px; }
.breadcrumb-item:not(:last-child)::after { content: '/'; color: var(--text-muted); }
.breadcrumb-item.active { color: var(--text-primary); font-weight: 600; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

#nav-portal-entry {
    background: linear-gradient(135deg, #1f8df5, #00b8b8);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

#nav-portal-entry:hover {
    filter: brightness(1.07);
}

.portal-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 30;
    overflow: hidden;
}

.portal-item {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 13px;
}

.portal-item:hover {
    background: var(--bg-tertiary);
}

.portal-item i {
    width: 16px;
    color: var(--text-muted);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast), border-color var(--transition-fast);
    position: relative;
    border: 1px solid transparent;
}

.nav-user:hover { background-color: var(--bg-tertiary); border-color: var(--border-light); }

.nav-user.has-cover-photo {
    border-color: rgba(255, 255, 255, 0.28);
}

.nav-user.has-cover-photo .user-name,
.nav-user.has-cover-photo .user-role {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.nav-user.has-cover-photo .user-role {
    color: rgba(255, 255, 255, 0.82);
}

.nav-user.has-cover-photo .verified-badge {
    color: #93c5fd;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 14px;
    border: 2px solid var(--primary);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name { font-weight: 600; font-size: 13px; }
.user-role { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.verified-badge {
    color: var(--info);
    font-size: 12px;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 180px;
    display: none;
    z-index: 150;
    overflow: hidden;
}

.nav-user.open .user-dropdown { display: block; }

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.dropdown-item:hover { background: var(--bg-tertiary); }
.dropdown-item i { width: 16px; color: var(--text-muted); }

/* ─── Sidebar ────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: var(--z-sidebar);
    transition: transform var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
}

.sidebar-brand i {
    font-size: 24px;
    color: var(--primary);
}

/* ─── Panel Switcher ─────────────────────────────────────────── */
.panel-switcher {
    padding: 10px 10px 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}

.panel-switcher-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0 2px 5px;
}

.panel-switcher-btns {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.panel-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.panel-btn i {
    width: 16px;
    text-align: center;
    font-size: 13px;
    flex-shrink: 0;
}

.panel-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.panel-btn.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 700;
}

.panel-btn.active i {
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-section-title:hover { background: var(--bg-tertiary); color: var(--text-secondary); }

.nav-section-title .section-chevron {
    margin-left: auto;
    font-size: 10px;
    transition: transform var(--transition);
}

.nav-section.collapsed .section-chevron { transform: rotate(-90deg); }
.nav-section.collapsed .nav-items { display: none; }

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0%;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
    transition: height var(--transition);
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-bg);
    color: var(--primary-light);
}

.nav-item.active::before { height: 60%; }

.nav-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.server-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.server-status i {
    font-size: 8px;
    color: var(--success);
    animation: pulse 2s infinite;
}

/* ─── Main Content ───────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topnav-height);
    min-height: calc(100vh - var(--topnav-height));
    padding: 28px;
    background: var(--bg-primary);
    transition: margin-left var(--transition);
}

.main-content.route-pending {
    background: var(--bg-primary);
}

.main-content.route-pending::after {
    content: '';
    position: fixed;
    top: var(--topnav-height);
    right: 0;
    left: var(--sidebar-width);
    height: 2px;
    z-index: 120;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: routePendingBar 1s ease-in-out infinite;
    pointer-events: none;
}

@keyframes routePendingBar {
    0% { transform: translateX(-100%); opacity: 0.35; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0.35; }
}

@media (max-width: 768px) {
    .main-content.route-pending::after {
        left: 0;
    }
}

.page {
    max-width: var(--content-max-width);
    margin: 0 auto;
    animation: fadeSlideUp 0.4s ease;
    position: relative;
}

/* Admin-only page visibility note (bottom-right) */
.page-access-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    width: fit-content;
    margin-left: auto;
    opacity: 0.7;
    user-select: none;
}
.page-access-note i {
    font-size: 0.7rem;
    color: var(--primary);
    opacity: 0.8;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-title h1 {
    font-size: 24px;
    font-weight: 700;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 13px;
}

.page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.page-has-fixed-save {
    padding-bottom: 108px;
}

.fixed-save-wrap {
    position: fixed;
    right: 26px;
    bottom: 22px;
    z-index: 950;
    pointer-events: none;
}

.fixed-save-btn {
    pointer-events: auto;
    min-width: 150px;
    justify-content: center;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.fixed-save-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.fixed-save-btn:disabled:hover {
    box-shadow: none;
}

/* ─── Tablet breakpoint (900px) ─────────────────────────────── */
@media (max-width: 900px) {
    .content-area {
        padding: 16px;
    }
}

/* ─── Touch devices: disable ghost hover effects ────────────── */
@media (hover: none) {
    .nav-item:hover {
        background: transparent;
        color: inherit;
    }
    .stat-card:hover {
        transform: none;
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    .fixed-save-wrap {
        right: 16px;
        bottom: 16px;
        left: 16px;
    }

    .fixed-save-btn {
        width: 100%;
    }
}

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition);
    overflow: visible;
}

.card:hover {
    border-color: var(--border-light);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--stat-color, var(--primary));
    opacity: 0;
    transition: opacity var(--transition);
}

.stat-card:hover::before { opacity: 1; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.purple { background: var(--primary-bg); color: var(--primary); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-icon.yellow { background: var(--warning-bg); color: var(--warning); }

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.stat-info .stat-change {
    font-size: 11px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ─── Tables ─────────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: var(--bg-tertiary);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: var(--bg-card-hover);
}

.data-table tr:last-child td { border-bottom: none; }

/* ─── Badges & Tags ──────────────────────────────────────────── */
.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-tag.primary { background: var(--primary-bg); color: var(--primary-light); }
.badge-tag.success { background: var(--success-bg); color: var(--success); }
.badge-tag.danger { background: var(--danger-bg); color: var(--danger); }
.badge-tag.warning { background: var(--warning-bg); color: var(--warning-dark); }
.badge-tag.info { background: var(--info-bg); color: var(--info); }
.badge-tag.muted { background: rgba(107, 107, 141, 0.15); color: var(--text-muted); }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
    outline: none;
    position: relative;
    z-index: 5;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235B5C78' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
}

/* ─── Checkbox & Toggle ──────────────────────────────────────── */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    display: none;
}

.check-box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.form-check input:checked ~ .check-box {
    background: var(--primary);
    border-color: var(--primary);
}

.check-box i {
    font-size: 11px;
    color: white;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.form-check input:checked ~ .check-box i { opacity: 1; }

.check-label { font-size: 13px; }

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: 24px;
}

.modal-box {
    background: var(--bg-card, var(--card-bg, #fff));
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

/* Backward compatibility: some pages still render modal content with this class. */
.modal-content {
    background: var(--bg-card, var(--card-bg, #fff));
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

/* Keep global Dialog overlays above dynamically opened page modals. */
#confirm-dialog,
#input-dialog,
#otp-dialog {
    z-index: calc(var(--z-modal) + 20);
}

.modal-box.modal-lg { max-width: 800px; }
.modal-box.modal-xl { max-width: 1100px; }

.confirm-box {
    text-align: center;
    max-width: 400px;
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
    background: var(--primary-bg);
    color: var(--primary);
}

.modal-icon.danger { background: var(--danger-bg); color: var(--danger); }
.modal-icon.success { background: var(--success-bg); color: var(--success); }
.modal-icon.warning { background: var(--warning-bg); color: var(--warning); }

.confirm-box h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.confirm-box p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover { color: var(--text-primary); }

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    max-width: 400px;
    margin: 0 auto;
}

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination button:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.pagination button.active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

.pagination .page-goto {
    width: 50px;
    height: 36px;
    text-align: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    margin: 0 4px;
}

/* ─── Filter Bar ─────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
}

.filter-bar .form-control {
    min-width: 180px;
    max-width: 240px;
}

.search-input {
    position: relative;
    flex: 1;
    min-width: 260px;
    max-width: 420px;
}

.search-input i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-input input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    transition: all var(--transition-fast);
    outline: none;
}

.search-input input:focus { border-color: var(--primary); }

/* ─── Tabs ───────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--primary-light); border-bottom-color: var(--primary); }

/* ─── Settings Tabs ──────────────────────────────────────────── */
.settings-tab {
    flex: 1;
    padding: 9px 16px;
    border: none;
    background: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.settings-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.settings-tab.active {
    background: var(--bg-primary);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

[data-theme="dark"] .settings-tab.active {
    background: var(--bg-card);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

@media (max-width: 480px) {
    .settings-tabs {
        flex-wrap: wrap;
    }
    .settings-tab {
        flex: none;
        font-size: 0.78rem;
        padding: 7px 10px;
    }
}

/* ─── Skeleton Loader ────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-card-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 70%; }
.skeleton-title { height: 24px; width: 50%; margin-bottom: 16px; }
.skeleton-card { height: 120px; border-radius: var(--radius-lg); }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }

/* ─── Utility ────────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.w-full { width: 100%; }

.error-message {
    color: var(--danger);
    font-size: 13px;
    padding: 8px 12px;
    background: var(--danger-bg);
    border-radius: var(--radius-sm);
    text-align: center;
}

/* ─── Dark Nav / Sidebar Overrides ──────────────────────────── */
[data-theme="dark"] .top-nav {
    background: rgba(15, 15, 26, 0.88);
}

[data-theme="dark"] .sidebar {
    background: var(--bg-secondary);
}

/* ─── Theme Toggle Button ────────────────────────────────────── */
.theme-toggle-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 15px;
}

.theme-toggle-btn:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

/* ─── Notification Bell & Panel ──────────────────────────────── */
.notif-bell-wrapper {
    position: relative;
}

.notif-bell-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 15px;
    position: relative;
}

.notif-bell-btn:hover,
.notif-bell-btn.active {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border: 2px solid var(--bg-secondary);
    pointer-events: none;
    animation: pulse 2s infinite;
}

.notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 400px;
    max-height: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 160;
    display: none;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.notif-panel.open {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: notifPanelIn 0.22s ease forwards;
}

@keyframes notifPanelIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
}

.notif-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.notif-panel-title i {
    color: var(--primary);
    font-size: 16px;
}

.notif-unread-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.notif-panel-actions {
    display: flex;
    gap: 4px;
}

.notif-action-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.notif-action-btn:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.notif-action-btn.notif-action-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    max-height: 400px;
}

.notif-list::-webkit-scrollbar {
    width: 5px;
}
.notif-list::-webkit-scrollbar-track {
    background: transparent;
}
.notif-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* ─── Notification Item ──────────────────────────────────────── */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    position: relative;
    cursor: default;
}

.notif-item:hover {
    background: var(--bg-tertiary);
}

.notif-item--unread {
    background: rgba(88, 204, 2, 0.06);
}

.notif-item--unread:hover {
    background: rgba(88, 204, 2, 0.10);
}

.notif-item--danger.notif-item--unread {
    background: rgba(255, 75, 75, 0.06);
}

.notif-item--danger.notif-item--unread:hover {
    background: rgba(255, 75, 75, 0.10);
}

.notif-item-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-tertiary);
}

.notif-item--unread .notif-item-icon {
    background: rgba(88, 204, 2, 0.12);
}
.notif-item--danger .notif-item-icon {
    background: rgba(255, 75, 75, 0.12);
}

.notif-item-body {
    flex: 1;
    min-width: 0;
}

.notif-item-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item--unread .notif-item-title {
    font-weight: 800;
}

.notif-item-dot {
    width: 7px;
    height: 7px;
    min-width: 7px;
    border-radius: 50%;
    background: var(--primary);
}

.notif-item--danger .notif-item-dot {
    background: var(--danger);
}

.notif-item-message {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
    margin-top: 2px;
    white-space: pre-wrap;
    word-break: break-word;
}

.notif-read-more {
    color: #1CB0F6;
    font-weight: 700;
    cursor: pointer;
}

.notif-read-more:hover {
    text-decoration: underline;
}

.notif-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.notif-item-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notif-points {
    font-size: 11px;
    font-weight: 700;
    color: var(--success);
    background: var(--success-bg);
    padding: 1px 6px;
    border-radius: 6px;
}

.notif-item-delete {
    position: absolute;
    top: 8px;
    right: 6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    opacity: 0;
    transition: all var(--transition-fast);
}

.notif-item:hover .notif-item-delete {
    opacity: 1;
}

.notif-item-delete:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ─── Notification Empty & Loading States ────────────────────── */
.notif-empty,
.notif-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    gap: 8px;
}

.notif-empty i,
.notif-loading i {
    font-size: 36px;
    color: var(--border);
    margin-bottom: 4px;
}

.notif-empty span,
.notif-loading span {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

.notif-empty small {
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ─── Load More Footer ───────────────────────────────────────── */
.notif-panel-footer {
    padding: 8px;
    border-top: 1px solid var(--border);
}

.notif-load-more-btn {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.notif-load-more-btn:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

/* ─── Dark Theme Overrides for Notif Panel ───────────────────── */
[data-theme="dark"] .notif-bell-btn {
    background: var(--bg-tertiary);
    border-color: var(--border);
    color: var(--text-secondary);
}

[data-theme="dark"] .notif-bell-btn:hover,
[data-theme="dark"] .notif-bell-btn.active {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="dark"] .notif-badge {
    border-color: var(--bg-card);
}

[data-theme="dark"] .notif-panel {
    background: var(--bg-card);
    border-color: var(--border-light);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .notif-item--unread {
    background: rgba(88, 204, 2, 0.08);
}

[data-theme="dark"] .notif-item:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .notif-item--unread:hover {
    background: rgba(88, 204, 2, 0.14);
}

[data-theme="dark"] .notif-item-icon {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .notif-item--unread .notif-item-icon {
    background: rgba(88, 204, 2, 0.18);
}

/* ─── Feature Sections ───────────────────────────────────────── */
.features-section {
    position: relative;
    background: #FFFFFF;
    padding: 80px 0 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .features-section {
    background: rgba(10, 10, 26, 0.98);
    border-top-color: rgba(255, 255, 255, 0.06);
}

.features-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
}

.features-header {
    text-align: center;
    margin-bottom: 64px;
}

.features-header h2 {
    font-family: 'Sora', sans-serif;
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.features-header p {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 52px;
    align-items: center;
    margin-bottom: 88px;
}

.feature-row.visible {
    opacity: 1;
}

.feature-row.reversed .feature-copy { order: 1; }
.feature-row.reversed .feature-visual { order: 0; }

.feature-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--primary-bg);
    color: var(--primary);
    margin-bottom: 12px;
}

.feature-copy h2 {
    font-family: 'Sora', sans-serif;
    font-size: clamp(22px, 2.5vw, 34px);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.22;
}

.feature-copy p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 22px;
}

.feature-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.feature-checklist li i {
    color: var(--accent);
    font-size: 14px;
    flex-shrink: 0;
}

.feature-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-mockup {
    width: 100%;
    max-width: 380px;
    border-radius: 20px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-mockup:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.feature-mockup.color-purple { background: linear-gradient(135deg, #EEF0FF 0%, #F8F0FF 100%); border: 1px solid rgba(88, 204, 2,0.18); }
.feature-mockup.color-teal { background: linear-gradient(135deg, #E8FFFE 0%, #F0FFF8 100%); border: 1px solid rgba(88, 204, 2,0.18); }
.feature-mockup.color-amber { background: linear-gradient(135deg, #FFF9EA 0%, #FFFAEE 100%); border: 1px solid rgba(255, 167, 38,0.28); }
.feature-mockup.color-blue { background: linear-gradient(135deg, #EFF4FF 0%, #EEF6FF 100%); border: 1px solid rgba(27, 27, 27,0.18); }

[data-theme="dark"] .feature-mockup.color-purple { background: linear-gradient(135deg, rgba(88, 204, 2,0.15) 0%, rgba(139,133,255,0.07) 100%); border-color: rgba(88, 204, 2,0.3); }
[data-theme="dark"] .feature-mockup.color-teal { background: linear-gradient(135deg, rgba(88, 204, 2,0.12) 0%, rgba(0,185,148,0.07) 100%); border-color: rgba(88, 204, 2,0.25); }
[data-theme="dark"] .feature-mockup.color-amber { background: linear-gradient(135deg, rgba(255, 167, 38,0.12) 0%, rgba(240,180,41,0.07) 100%); border-color: rgba(255, 167, 38,0.25); }
[data-theme="dark"] .feature-mockup.color-blue { background: linear-gradient(135deg, rgba(27, 27, 27,0.12) 0%, rgba(61,142,240,0.07) 100%); border-color: rgba(27, 27, 27,0.25); }

.feature-mockup .mock-icon { font-size: 38px; margin-bottom: 4px; }
.feature-mockup.color-purple .mock-icon { color: var(--primary); }
.feature-mockup.color-teal .mock-icon { color: var(--accent); }
.feature-mockup.color-amber .mock-icon { color: var(--warning-dark); }
.feature-mockup.color-blue .mock-icon { color: var(--info); }

.mock-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .mock-card { background: rgba(30,30,54,0.72); border-color: rgba(255,255,255,0.08); }

.mock-q-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--primary); margin-bottom: 6px; }
.mock-q-text { font-size: 13px; color: var(--text-primary); font-weight: 500; margin-bottom: 8px; line-height: 1.4; }
.mock-options { display: flex; flex-direction: column; gap: 4px; }
.mock-opt { font-size: 12px; padding: 4px 8px; border-radius: 6px; color: var(--text-secondary); background: var(--bg-tertiary); }
[data-theme="dark"] .mock-opt { background: rgba(255,255,255,0.06); }
.mock-opt.correct { color: var(--accent); background: var(--success-bg); font-weight: 600; }

.mock-bar-group { display: flex; flex-direction: column; gap: 8px; }

/* ─── Img Animations ───────────────────────────────────────── */
@keyframes simAnimX {
    0% { transform: translateX(0); }
    50% { transform: translateX(8px); }
    100% { transform: translateX(0); }
}
@keyframes simAnimY {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}
.tc-anim-x { animation: simAnimX 3s ease-in-out infinite; }
.tc-anim-y { animation: simAnimY 3s ease-in-out infinite; }

@keyframes simFadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.mock-bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-secondary); }
.mock-bar-row .bar-label { min-width: 64px; font-size: 11px; }
.mock-bar-track { flex: 1; height: 6px; border-radius: 99px; background: var(--bg-tertiary); overflow: hidden; }
[data-theme="dark"] .mock-bar-track { background: rgba(255,255,255,0.1); }
.mock-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--accent)); }

.mock-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.mock-stat-box { background: rgba(255,255,255,0.9); border-radius: 10px; padding: 10px 12px; border: 1px solid rgba(0,0,0,0.06); text-align: center; }
[data-theme="dark"] .mock-stat-box { background: rgba(30,30,54,0.72); border-color: rgba(255,255,255,0.08); }
.mock-stat-box .stat-num { font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 700; color: var(--primary); }
.mock-stat-box .stat-lbl { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.mock-support-list { display: flex; flex-direction: column; gap: 8px; }
.mock-support-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(255,255,255,0.88); border-radius: 10px; border: 1px solid rgba(0,0,0,0.05); }
[data-theme="dark"] .mock-support-item { background: rgba(30,30,54,0.7); border-color: rgba(255,255,255,0.07); }
.mock-support-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mock-support-dot.green { background: var(--accent); }
.mock-support-dot.amber { background: var(--warning-dark); }
.mock-support-dot.blue { background: var(--info); }
.mock-support-text { font-size: 12px; color: var(--text-secondary); flex: 1; }
.mock-support-tag { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--primary-bg); color: var(--primary); }

/* ─── Landing CTA Section ────────────────────────────────────── */
.landing-cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #5A4BD0 50%, #4A3FC0 100%);
    padding: 72px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.landing-cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='20' r='1' fill='rgba(255,255,255,0.1)'/%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.cta-inner { position: relative; max-width: 580px; margin: 0 auto; }

.cta-inner h2 {
    font-family: 'Sora', sans-serif;
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
}

.cta-inner > p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 28px;
    line-height: 1.7;
}

.cta-store-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.cta-store-row .store-btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    backdrop-filter: blur(4px);
}

.cta-store-row .store-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta-store-row .store-btn svg { color: #fff; }
.cta-store-row .store-btn span { color: rgba(255,255,255,0.7); }
.cta-store-row .store-btn strong { color: #fff; }

.support-hint { font-size: 14px; color: rgba(255, 255, 255, 0.75); }

.support-hint button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.support-hint button:hover { color: #fff; }

/* ─── Landing Footer ─────────────────────────────────────────── */
.landing-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 0;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 38px 28px;
}

.footer-contact-section {
    margin-bottom: 32px;
}

.footer-contact-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-contact-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-contact-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: box-shadow 0.2s, transform 0.2s;
    min-width: 200px;
}

.footer-contact-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.footer-contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.footer-contact-label {
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 2px;
}

.footer-contact-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--text-primary); }
.footer-brand i { color: var(--primary); }
.footer-copy { font-size: 12px; color: var(--text-muted); }

.footer-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 0 0;
    margin-bottom: 20px;
}
.footer-legal-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.footer-legal-link i { font-size: 11px; }
.footer-legal-link:hover {
    color: var(--primary);
    background: var(--primary-bg, rgba(88, 204, 2,0.08));
    border-color: var(--primary);
}
.footer-legal-sep {
    color: var(--border);
    font-size: 18px;
    line-height: 1;
    user-select: none;
}

/* ─── Portal Group (Categorized dropdown) ────────────────────── */
.portal-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-top: 4px;
}

.portal-group-header i { width: 14px; font-size: 11px; }

.portal-group + .portal-group { border-top: 1px solid var(--border); }

.portal-group:first-child .portal-group-header { margin-top: 0; }

/* ─── Markdown Preview Styles ────────────────────────────────── */
.preview-question {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 14px;
    line-height: 1.65;
    min-height: 80px;
}

.pq-content strong { font-weight: 700; }
.pq-content em { font-style: italic; }
.pq-content del { text-decoration: line-through; color: var(--text-muted); }
.pq-content code { background: var(--bg-input); padding: 1px 5px; border-radius: 4px; font-family: 'Courier New', monospace; font-size: 12px; }
.pq-content br + br { margin-top: 6px; }

.pq-content .katex-display,
.pq-option .katex-display,
.question-full-content .katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0.45em 0;
    padding-bottom: 2px;
}

.pq-content .math-fallback,
.pq-option .math-fallback,
.question-full-content .math-fallback {
    font-family: "Cambria Math", "Times New Roman", serif;
    font-size: 1em;
    opacity: 0.95;
    color: inherit;
    line-height: 1.15;
    overflow-wrap: anywhere;
    vertical-align: middle;
}

.pq-content .math-fallback[data-display="1"],
.pq-option .math-fallback[data-display="1"],
.question-full-content .math-fallback[data-display="1"] {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    text-align: center;
    margin: 0.45em 0;
    padding-bottom: 2px;
}

.math-fallback .mf-frac {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    max-width: 100%;
    min-width: 1.1em;
    margin: 0 0.08em;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
}

.math-fallback .mf-num,
.math-fallback .mf-den {
    display: block;
    max-width: 100%;
    min-width: 1.1em;
    padding: 0 0.22em;
    overflow-wrap: anywhere;
}

.math-fallback .mf-den {
    border-top: 1px solid currentColor;
    margin-top: 0.08em;
    padding-top: 0.08em;
}

.math-fallback .mf-sqrt {
    display: inline-flex;
    align-items: flex-start;
    max-width: 100%;
    vertical-align: middle;
}

.math-fallback .mf-root {
    font-size: 1.12em;
    line-height: 1;
}

.math-fallback .mf-root-body {
    display: inline-block;
    border-top: 1px solid currentColor;
    padding: 0.04em 0.12em 0;
    line-height: 1.05;
}

.math-fallback .mf-root-index {
    align-self: flex-start;
    font-size: 0.62em;
    line-height: 1;
    margin-right: -0.1em;
}

.math-fallback .mf-upright {
    font-family: inherit;
    font-style: normal;
}

.fill-blank { display: inline-block; }
.fill-underline { letter-spacing: 3px; color: var(--primary); font-weight: 700; border-bottom: 2px solid var(--primary); padding-bottom: 1px; }
.fill-hint { font-size: 11px; color: var(--text-muted); margin-left: 3px; }

.attach-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--info-bg); color: var(--info); font-size: 12px; font-weight: 600; }

/* Genel markdown kod biçimleri (markdown.js: `satır içi` → <code>, ```blok``` → <pre><code>).
   Düşük özgüllük: .pq-content code gibi bağlama özel kurallar bunu ezmeye devam eder. */
code {
    background: var(--bg-input);
    color: var(--text-primary);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace;
    font-size: 0.88em;
}
pre {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 0;
    max-width: 100%;
    overflow-x: auto;
}
pre > code {
    display: block;
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 12.5px;
    line-height: 1.5;
    white-space: pre;
}

/* Başlık ve liste blokları (markdown.js: "# ## ###" ve "- " satırları).
   Mobil render bunları zaten basıyordu; web'de eksikti ve ham "## Başlık" /
   "- madde" olarak görünüyordu. Panel başlık hiyerarşisiyle çakışmasın diye
   <h1>/<h2> yerine kendi sınıfları kullanılıyor. */
.md-heading {
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.35;
    margin: 12px 0 6px;
}
.md-heading:first-child { margin-top: 0; }
.md-h1 { font-size: 1.28em; }
.md-h2 { font-size: 1.14em; }
.md-h3 { font-size: 1.02em; }

.md-list {
    margin: 6px 0;
    padding-left: 20px;
    list-style: disc outside;
}
.md-list > li {
    margin: 3px 0;
    line-height: 1.55;
}

.md-link {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}
.md-link:hover { text-decoration-thickness: 2px; }

.md-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 7px;
    padding: 3px 10px;
    font-size: 0.86em;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
    background: var(--md-badge-color, #475569);
    vertical-align: baseline;
}
.md-badge-has-explanation {
    border-bottom: 1.5px dashed rgba(255,255,255,0.4);
    cursor: help;
    position: relative;
}
.md-badge-has-explanation:hover::after {
    content: attr(data-badge-explanation);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.88);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    white-space: pre-wrap;
    max-width: 260px;
    z-index: 9999;
    pointer-events: none;
    line-height: 1.5;
}

/* ── [:need_scroll] page break divider ─────────────────── */
.tc-needscroll {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px 0;
    padding: 7px 16px;
    background: rgba(59, 130, 246, 0.07);
    border: 2px dashed rgba(59, 130, 246, 0.35);
    border-radius: 10px;
    color: #3b82f6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    user-select: none;
    cursor: default;
}
[data-theme="dark"] .tc-needscroll {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.30);
    color: #7cb9ff;
}
/* ─────────────────────────────────────────────────────────── */

/* ── Markdown table ─────────────────────────────────────── */
.md-table-wrap {
    overflow-x: auto;
    margin: 6px 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.md-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.md-table thead tr {
    background: var(--bg-card-hover);
}

.md-table th,
.md-table td {
    padding: 8px 12px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    line-height: 1.5;
}

.md-table th {
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.md-table tbody tr:nth-child(even) {
    background: var(--bg-hover);
}

.md-table tbody tr:hover {
    background: var(--bg-card-hover);
}
/* ───────────────────────────────────────────────────────── */

.pq-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-top: 6px;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.pq-option.correct {
    background: var(--success-bg);
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; }

    .landing-header {
        padding: 12px 16px;
    }

    .landing-content {
        padding: 24px 16px 12px;
        min-height: calc(100svh - 52px);
    }

    .landing-brand {
        font-size: 18px;
    }

    .landing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .landing-hero h1 {
        font-size: clamp(26px, 7vw, 36px);
        line-height: 1.12;
    }

    .landing-hero p {
        font-size: 14px;
        margin-bottom: 18px;
    }

    .store-grid {
        margin-bottom: 12px;
    }

    .store-btn {
        min-width: 170px;
        padding: 10px 14px;
    }

    .store-btn strong {
        font-size: 15px;
    }

    .showcase-card {
        padding: 12px 14px;
    }

    .showcase-card h3 {
        font-size: 13px;
    }

    .showcase-metric {
        font-size: 22px;
    }

    .ldg-dist-list li {
        grid-template-columns: 72px 1fr 34px;
    }

    .landing-scroll-indicator {
        padding: 10px 0 6px;
    }

    .landing-scroll-indicator span {
        font-size: 11px;
    }

    .feature-row {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-bottom: 56px;
    }

    .feature-row.reversed .feature-copy { order: 0; }
    .feature-row.reversed .feature-visual { order: 1; }

    .feature-mockup {
        max-width: 100%;
    }

    .features-section {
        padding: 56px 0 16px;
    }

    .features-header { margin-bottom: 40px; }
    .features-inner { padding: 0 16px; }

    .landing-cta-section {
        padding: 56px 20px;
    }

    .landing-footer { padding: 0; }
    .footer-inner { padding: 24px 16px 20px; }
    .footer-contact-cards { flex-direction: column; }
    .footer-contact-card { min-width: unset; }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .top-nav {
        left: 0;
        padding: 0 12px;
    }

    /* Mobilde sidebar kapalı: top-nav'daki KPSS Zamanı logosu görünür olsun */
    .nav-toggle { display: flex; }
    .nav-brand { display: inline-flex; }

    /* Breadcrumb kırpılma */
    .nav-center {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    .breadcrumb {
        flex-wrap: nowrap;
        overflow: hidden;
        max-width: 100%;
    }
    .breadcrumb-item {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    .breadcrumb-item:not(:last-child) {
        flex-shrink: 1;
    }

    .main-content {
        margin-left: 0;
        overflow-x: hidden;
    }

    /* Page header: butonlar alta sıralansın */
    .page-header {
        flex-wrap: wrap;
        gap: 10px;
        align-items: flex-start;
    }
    .page-header > .page-title {
        flex: 1 1 200px;
        min-width: 0;
    }
    .page-actions {
        flex-wrap: wrap;
    }

    /* Card header wrapping */
    .card-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .form-control,
    .search-input {
        max-width: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .user-info { display: none; }

    /* Topic creator: iç içe kart girintileri mobilde daralt */
    .tc-topic-card[data-depth="1"] { margin-left: 12px; }
    .tc-topic-card[data-depth="2"] { margin-left: 24px; }
    .tc-topic-card[data-depth="3"] { margin-left: 36px; }

    /* Topic creator başlık satırları: wrap */
    .tc-topic-header { flex-wrap: wrap; }
    .tc-block-header { flex-wrap: wrap; }
    .tc-actions     { flex-wrap: wrap; }
    .tc-edit-bar    { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .main-content { padding: 12px; }
    .card { padding: 14px; }

    .landing-content {
        padding: 16px 12px 8px;
    }

    .landing-hero h1 {
        font-size: clamp(24px, 6.5vw, 32px);
    }

    .hero-eyebrow {
        font-size: 10px;
        padding: 5px 10px;
        margin-bottom: 10px;
    }

    .store-grid {
        flex-direction: column;
        gap: 8px;
    }

    .store-btn {
        min-width: unset;
        width: 100%;
        justify-content: center;
    }

    .ldg-dist-list li {
        grid-template-columns: 66px 1fr 32px;
        gap: 6px;
    }

    .ldg-dist-label {
        font-size: 10.5px;
    }

    .kpss-countdown-timer {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Sayfa başlığı font küçült */
    .page-title h1 { font-size: 19px; }

    /* TopNav sıkıştır */
    .top-nav { padding: 0 8px; }
    .nav-right { gap: 8px; }

    /* Notification panel responsive */
    .notif-panel {
        width: calc(100vw - 24px);
        right: -60px;
    }

    /* Tablolar yatay scroll */
    .card > table,
    .card-body > table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Küçük butonlar */
    .btn-sm { padding: 5px 10px; font-size: 11px; }

    /* Sayfa başlığı butonları tam genişlik */
    .page-header > .btn,
    .page-header > button {
        flex: 1 1 auto;
    }
}
