/* =============================================
   Tedkik AI - JudgeAI Tema (Birebir)
   ============================================= */

/* ========================================
   CSS CUSTOM PROPERTIES (JudgeAI globals.css)
   ======================================== */
:root {
    /* PRIMARY (Natural Green) */
    --color-primary: #2E7223;
    --color-primary-50:  #F7FDF3;
    --color-primary-100: #D5EECC;
    --color-primary-200: #A9D6A0;
    --color-primary-300: #84A67D;
    --color-primary-400: #5F8E55;
    --color-primary-500: #426D3B;
    --color-primary-600: #2E7223;
    --color-primary-700: #255D1C;
    --color-primary-800: #1F4C18;
    --color-primary-900: #173912;
    --color-primary-hover: #255D1C;
    --color-primary-light: #84A67D;
    --color-primary-lighter: #D5EECC;

    /* SECONDARY (Deep Forest) */
    --color-secondary: #426D3B;
    --color-secondary-50:  #F7FDF3;
    --color-secondary-100: #E3EA7D;
    --color-secondary-200: #C6D312;
    --color-secondary-300: #9FBF4A;
    --color-secondary-400: #6F8F45;
    --color-secondary-500: #426D3B;
    --color-secondary-600: #355C30;
    --color-secondary-700: #2E4E29;
    --color-secondary-800: #223A1F;
    --color-secondary-900: #172813;

    /* ACCENT (Soft Yellow / Highlight) */
    --color-accent: #CFD94D;
    --color-accent-50:  #F7FDF3;
    --color-accent-100: #F6FAB7;
    --color-accent-200: #E3EA7D;
    --color-accent-300: #CFD94D;
    --color-accent-400: #C6D312;
    --color-accent-500: #B6C215;
    --color-accent-600: #9FA90F;
    --color-accent-700: #7F870C;

    /* TEXT */
    --color-text-primary: #173912;
    --color-text-secondary: #2E4E29;
    --color-text-muted: #6F8F45;
    --color-text-light: #9FBF4A;
    --color-text-inverse: #FFFFFF;

    /* BACKGROUND */
    --color-background: #F7FDF3;
    --color-background-secondary: #F0F8EC;
    --color-background-secondary-50: #F8FAF7;
    --color-background-tertiary: #F6FAB7;
    --color-background-light-gray: #FBFFF8;

    /* BORDER & SHADOW */
    --color-border: #C6D312;
    --color-border-dark: #84A67D;
    --shadow-sm: 0 1px 2px rgba(46,114,35,0.08);
    --shadow: 0 4px 6px -1px rgba(46,114,35,0.15);
    --shadow-lg: 0 10px 15px -3px rgba(46,114,35,0.2);

    /* SIDEBAR */
    --sidebar-width: 256px;

    /* STATUS */
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* GRADIENTS */
    --gradient-primary: linear-gradient(to right, #255D1C, #84A67D);
    --gradient-info: linear-gradient(135deg, #84A67D 0%, #2E7223 100%);
}

/* ========================================
   DARK MODE (JudgeAI globals.css birebir)
   ======================================== */
.dark {
    --color-primary: #2E7223;
    --color-primary-50: #1a2e17;
    --color-primary-100: #223A1F;
    --color-primary-200: #A9D6A0;
    --color-primary-300: #84A67D;
    --color-primary-400: #5F8E55;
    --color-primary-500: #426D3B;
    --color-primary-600: #2E7223;
    --color-primary-700: #255D1C;
    --color-primary-800: #1F4C18;
    --color-primary-900: #173912;

    --color-text-primary: #E8F5E2;
    --color-text-secondary: #C5DFC0;
    --color-text-muted: #8BAF85;
    --color-text-light: #6F8F45;
    --color-text-inverse: #173912;

    --color-background: #0f1a0d;
    --color-background-secondary: #162213;
    --color-background-secondary-50: #1a2e17;
    --color-background-tertiary: #223A1F;
    --color-background-light-gray: #121e10;

    --color-border: #2E4E29;
    --color-border-dark: #426D3B;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);

    --gradient-primary: linear-gradient(to right, #255D1C, #84A67D);
    --gradient-info: linear-gradient(135deg, #84A67D 0%, #2E7223 100%);
}

/* ========================================
   BASE STYLES
   ======================================== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* ========================================
   ANIMATION KEYFRAMES (JudgeAI globals.css)
   ======================================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(46, 114, 35, 0.4); }
    50% { box-shadow: 0 0 40px rgba(46, 114, 35, 0.6); }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* ========================================
   ANIMATION CLASSES
   ======================================== */
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 0.6s ease-out; }
.animate-fade-in-left { animation: fadeInLeft 0.6s ease-out; }
.animate-fade-in-right { animation: fadeInRight 0.6s ease-out; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.slide-in-left { animation: slideInLeft 0.2s ease-out; }
.fade-in { animation: fadeIn 0.3s ease-in; }
.fade-in-up { animation: fadeInUp 0.5s ease-out; }

/* Animation Delays */
.delay-100 { animation-delay: 100ms; }
.delay-150 { animation-delay: 150ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ========================================
   HOVER EFFECTS
   ======================================== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ========================================
   GRADIENT UTILITIES
   ======================================== */
.bg-primary-gradient {
    background: var(--gradient-primary);
}
.text-primary-gradient {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* ========================================
   TOAST BILDIRIMLERI
   ======================================== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
    font-weight: 500;
    max-width: 24rem;
    animation: toastSlideIn 0.3s ease-out;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes shakeAnim {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.shake-anim { animation: shakeAnim 0.5s ease; }

.toast-success { background-color: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
.toast-error { background-color: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.toast-warning { background-color: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.toast-info { background-color: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }

/* ========================================
   FORM STILLERI
   ======================================== */
input:focus, textarea:focus, select:focus { outline: none; }
input[type="checkbox"] { cursor: pointer; }

/* ========================================
   SCROLL BAR
   ======================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background-color: #9ca3af; }

/* No scrollbar utility */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ========================================
   BUTON YUKLEME DURUMU
   ======================================== */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: -0.625rem;
    margin-left: -0.625rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
}

/* ========================================
   TOP BAR (AdminPanel birebir)
   ======================================== */
:root {
    --top-bar-height: 56px;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-bar-height);
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1001;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-bar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-bar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    max-width: 180px;
}
.top-bar-user span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.top-bar-user svg { flex-shrink: 0; color: #94a3b8; }

.top-bar-logout {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #94a3b8;
    transition: all 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
}
.top-bar-logout:hover {
    background: #fef2f2;
    color: #ef4444;
}

@media (max-width: 768px) {
    .top-bar-logo span { display: none; }
}

/* ========================================
   SIDEBAR PANEL (AdminPanel Style)
   ======================================== */
:root {
    --sb-width: 280px;
    --sb-collapsed-width: 76px;
    --sb-bg: #ffffff;
    --sb-bg-hover: rgba(46, 114, 35, 0.06);
    --sb-bg-active: rgba(46, 114, 35, 0.08);
    --sb-text: #334155;
    --sb-text-hover: #1e293b;
    --sb-text-active: #2E7223;
    --sb-accent: #2E7223;
    --sb-accent-soft: rgba(46, 114, 35, 0.08);
    --sb-divider: #f1f5f9;
    --sb-radius: 10px;
}

.sidebar-active {
    background: linear-gradient(to right, #2E7223, #255D1C);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(46, 114, 35, 0.3);
}

/* ── Sidebar Container (AdminPanel birebir) ── */
.sidebar {
    position: fixed;
    top: var(--top-bar-height);
    left: 0;
    bottom: 0;
    width: var(--sb-width);
    background: var(--sb-bg);
    border-right: 1px solid #f1f5f9;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 50;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Panel wrapper */
.panel-wrapper {
    position: relative;
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* Panel content: topbar altından başlar */
.panel-content {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    margin-top: var(--top-bar-height);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Panel main area */
.panel-main {
    flex: 1;
    padding: 24px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}
@media (min-width: 640px) { .panel-main { padding: 28px; } }
@media (min-width: 1024px) { .panel-main { padding: 32px; } }

/* ── Library page utility classes ──────── */
.loading-box {
    padding: 4rem 2rem; text-align: center;
}
.loading-spinner {
    width: 40px; height: 40px; margin: 0 auto 12px;
    color: var(--color-primary); animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-icon { width: 48px; height: 48px; margin: 0 auto 12px; color: #ef4444; }
.error-title { font-size: 1.125rem; font-weight: 600; color: #dc2626; margin-bottom: 8px; }
.text-muted-sm { font-size: .875rem; color: #6b7280; }

.stat-mini { padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.stat-mini-label { font-size: .75rem; color: #6b7280; font-weight: 600; }
.stat-mini-value { font-size: 1.25rem; font-weight: 800; color: #111827; }
.stat-mini-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(46,114,35,0.08); display: flex;
    align-items: center; justify-content: center; color: var(--color-primary);
}

.empty-state-box { padding: 4rem 2rem; text-align: center; }
.empty-state-icon {
    width: 64px; height: 64px; border-radius: 50%; background: #f0f8ec;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.empty-state-icon svg { width: 32px; height: 32px; color: #9ca3af; }
.empty-state-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.empty-state-desc { font-size: .875rem; color: #6b7280; margin-bottom: 16px; }

.filter-span-2 { grid-column: span 2; }

.dropdown-menu {
    display: none; position: fixed;
    background: #fff; border-radius: 8px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    z-index: 60; width: 160px; padding: 4px;
}
.dropdown-item {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 8px 12px; border-radius: 6px;
    font-size: .875rem; border: none; background: none;
    cursor: pointer; color: #374151;
}
.dropdown-item:hover { background: var(--bg-light); }
.dropdown-item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Desktop: sidebar açık, content sola kayık */
@media (min-width: 1024px) {
    .sidebar { transform: translateX(0); }
    .panel-content {
        margin-left: var(--sb-width) !important;
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Collapsed: sadece ikonlar görünür */
    .sidebar.collapsed {
        width: var(--sb-collapsed-width) !important;
    }
    body.sidebar-collapsed .panel-content {
        margin-left: var(--sb-collapsed-width) !important;
    }

    /* Collapsed: metinleri, label'ları, alt menüleri gizle */
    .sidebar.collapsed .sb-item span,
    .sidebar.collapsed .sb-arrow,
    .sidebar.collapsed .sb-section-label,
    .sidebar.collapsed .sb-divider,
    .sidebar.collapsed .sb-sub,
    .sidebar.collapsed .sb-user-details,
    .sidebar.collapsed .sb-user-logout,
    .sidebar.collapsed .sidebar-credits-card {
        display: none !important;
    }

    /* Collapsed: item'ları ortala, tıklama alanı geniş */
    .sidebar.collapsed .sb-item {
        justify-content: center;
        padding: 14px;
        gap: 0;
        min-height: 50px;
        border-radius: 12px;
        margin: 4px 0;
    }
    .sidebar.collapsed .sb-item svg {
        width: 26px;
        height: 26px;
    }

    /* Collapsed: primary item tam genişlik */
    .sidebar.collapsed .sb-item-primary {
        margin: 4px 0;
        width: 100%;
        border-radius: 12px;
    }

    /* Collapsed: back-home ikonunu ortala */
    .sidebar.collapsed .sb-back-home {
        justify-content: center;
        padding: 14px;
    }

    /* Collapsed: group'lar görünsün */
    .sidebar.collapsed .sb-group {
        display: block;
    }

    /* Collapsed: nav padding */
    .sidebar.collapsed .sidebar-nav {
        padding: 8px 8px;
    }

    /* Collapsed: user info sadece avatar */
    .sidebar.collapsed .sb-user-info {
        justify-content: center;
        padding: 12px 8px;
    }

    /* Collapsed: hover tooltip */
    .sidebar.collapsed .sb-item {
        position: relative;
    }
    .sidebar.collapsed .sb-item span {
        display: none !important;
    }
    .sidebar.collapsed .sb-item:hover span {
        display: block !important;
        position: absolute;
        left: calc(var(--sb-collapsed-width) - 8px);
        top: 50%;
        transform: translateY(-50%);
        background: #1e293b;
        color: #fff;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 12.5px;
        font-weight: 500;
        white-space: nowrap;
        z-index: 100;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        pointer-events: none;
    }
}

/* Mobile: sidebar gizli, mobile-open ile açılır */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
    }
    .sidebar.mobile-open { transform: translateX(0); }
    .panel-content { margin-left: 0 !important; }
}

/* ── Sidebar Toggle Button (AdminPanel birebir) ───── */
.sidebar-toggle {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    font-size: 18px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}
.sidebar-toggle:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

/* ── Menu Items ─────────────────────────── */
.sb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 2px 0;
    color: var(--sb-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    border-radius: var(--sb-radius);
    line-height: 1.4;
}
.sb-item svg { flex-shrink: 0; width: 20px; height: 20px; color: #64748b; transition: all 0.2s ease; }
.sb-item:hover { color: var(--sb-text-hover); background: var(--sb-bg-hover); }
.sb-item:hover svg { color: var(--sb-text-hover); }
.sb-item.active { color: var(--sb-text-active); background: var(--sb-bg-active); font-weight: 600; }
.sb-item.active svg { color: var(--sb-accent); }

/* ── Back to Home ───────────────────────── */
.sb-back-home {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 16px;
    margin: 4px 0 2px;
    opacity: 0.85;
}
.sb-back-home svg { color: #94a3b8; width: 15px; height: 15px; }
.sb-back-home:hover { color: #475569; background: var(--sb-bg-hover); opacity: 1; }
.sb-back-home:hover svg { color: #475569; }

/* ── Primary Action Item (Yeni Analiz) ──── */
.sb-item-primary {
    color: #fff !important;
    background: var(--sb-accent) !important;
    font-weight: 600;
    margin: 4px 8px 6px;
    width: calc(100% - 16px);
    border-radius: 8px;
}
.sb-item-primary svg { color: #fff !important; }
.sb-item-primary:hover { background: #255f1a !important; color: #fff !important; }
.sb-item-primary.active { background: #1e4d15 !important; color: #fff !important; }

/* ── Toggle Arrow ───────────────────────── */
.sb-arrow { margin-left: auto; opacity: 0.6; transition: transform 0.25s ease, opacity 0.2s; color: #94a3b8; }
.sb-toggle:hover .sb-arrow { opacity: 1; }
.sb-group.open > .sb-toggle .sb-arrow { transform: rotate(180deg); opacity: 0.8; }

/* ── Sub Menu ───────────────────────────── */
.sb-sub { display: none; padding: 2px 0 6px; }
.sb-group.open > .sb-sub { display: block; }

.sb-sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 52px;
    color: #475569;
    font-size: 13.5px;
    font-weight: 450;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-radius: var(--sb-radius);
    margin: 1px 0;
    position: relative;
    line-height: 1.4;
}
.sb-sub-item::before {
    content: '';
    position: absolute;
    left: 30px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #94a3b8;
    transition: all 0.2s ease;
}
.sb-sub-item:hover { color: #1e293b; background: var(--sb-bg-hover); }
.sb-sub-item:hover::before { background: #475569; }
.sb-sub-item.active { color: var(--sb-accent); font-weight: 650; background: var(--sb-accent-soft); }
.sb-sub-item.active::before { background: var(--sb-accent); box-shadow: 0 0 0 2px var(--sb-accent-soft); }

/* ── Section Label ──────────────────────── */
.sb-section-label {
    padding: 18px 16px 6px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Divider ────────────────────────────── */
.sb-divider { height: 1px; background: var(--sb-divider); margin: 10px 14px; }

/* ── User Info Panel ────────────────────── */
.sb-user-info {
    flex-shrink: 0;
    padding: 12px 14px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sb-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-100), var(--color-primary-200));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; flex-shrink: 0;
    color: var(--sb-accent);
}
.sb-user-details { flex: 1; min-width: 0; }
.sb-user-name { display: block; font-weight: 700; font-size: .82rem; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { display: block; font-size: .68rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-logout {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; color: #94a3b8; transition: all 0.2s ease; flex-shrink: 0; cursor: pointer;
    background: none; border: none;
}
.sb-user-logout:hover { background: #fef2f2; color: #ef4444; }

/* ── Sidebar Nav Scroll ─────────────────── */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 14px;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }
.sidebar-nav:hover::-webkit-scrollbar-thumb { background: #cbd5e1; }

/* ========================================
   COMPONENT SYSTEM (AdminPanel / HirasMuhasebe)
   ======================================== */

/* ── CSS Variables ─────────────────────── */
:root {
    --border: #e2e8f0;
    --border-dark: #cbd5e1;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --success: #10b981;
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(46,114,35,0.06);
    --shadow: 0 4px 6px -1px rgba(46,114,35,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(46,114,35,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    /* Soft green tones — subtle, not overwhelming */
    --bg-white: #ffffff;
    --bg-light: #f8faf7;
    --bg-page: #f5f9f3;
    --border: #dce8d8;
    --border-light: #e8f0e5;
    --text-dark: #1e293b;
    --text-muted: #64748b;
}

/* ── Page Header ───────────────────────── */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
    padding: 20px 0; margin-bottom: 20px;
}
.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.page-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    letter-spacing: -0.02em;
}
.page-title svg { color: var(--color-primary); width: 22px; height: 22px; }
.page-subtitle {
    color: #475569;
    font-size: 13px;
    margin: 2px 0 0 0;
    font-weight: 450;
}
@media (max-width: 768px) {
    .page-header { padding: 16px; }
    .page-header-content { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ── Card ──────────────────────────────── */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}
.card-header {
    padding: 1.25rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3, .card-header h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card-header h3 svg, .card-header h4 svg { color: var(--color-primary); }
.card-body { padding: 1.25rem; }
.card-body.no-padding { padding: 0; }
.card-footer {
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ── Table Card ────────────────────────── */
.table-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: clip;
    border: 1px solid var(--border-light);
}
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}
.table-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.table-title svg { color: var(--color-primary); }
.table-responsive { overflow-x: auto; }
.table-actions { display: flex; align-items: center; gap: 10px; }

/* ── Data Table ────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--text-dark);
}
.data-table > thead { background: var(--bg-light); border-bottom: 2px solid var(--border); }
.data-table > thead th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 12px 16px;
    white-space: nowrap;
    text-align: left;
}
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { background: #f3f4f6; }
.data-table > tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: #4b5563;
}
.data-table > tbody tr:hover { background: rgba(46, 114, 35, 0.03); }
.data-table > tbody tr:last-child td { border-bottom: none; }
.loading-cell, .empty-cell {
    text-align: center !important;
    padding: 60px !important;
    color: var(--text-muted);
}

/* ── Action Buttons ────────────────────── */
.action-buttons {
    display: flex; align-items: center; gap: 6px; justify-content: flex-end;
}
.action-btn {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; border: none; cursor: pointer;
    font-size: 14px; transition: all 0.2s;
}
.action-btn.edit    { background: rgba(16,185,129,0.1); color: #10b981; }
.action-btn.edit:hover    { background: #10b981; color: white; }
.action-btn.view    { background: rgba(59,130,246,0.1); color: #3b82f6; }
.action-btn.view:hover    { background: #3b82f6; color: white; }
.action-btn.delete  { background: rgba(220,38,38,0.1); color: #dc2626; }
.action-btn.delete:hover  { background: #dc2626; color: white; }
.action-btn.download { background: rgba(46,114,35,0.1); color: #2E7223; }
.action-btn.download:hover { background: #2E7223; color: white; }
.action-btn.toggle  { background: rgba(59,130,246,0.1); color: #3b82f6; }
.action-btn.toggle:hover  { background: #3b82f6; color: white; }
.action-btn.history { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.action-btn.history:hover { background: #8b5cf6; color: white; }
.action-btn.warning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.action-btn.warning:hover { background: #f59e0b; color: white; }
.action-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Badges ────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.3rem 0.7rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; line-height: 1;
}
.badge-primary { background: rgba(46,114,35,0.1); color: #2E7223; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: #f1f5f9; color: #64748b; }

.status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
}
.status-badge.pending    { background: #fef3c7; color: #d97706; }
.status-badge.processing { background: #dbeafe; color: #2563eb; }
.status-badge.completed  { background: #d1fae5; color: #059669; }
.status-badge.failed     { background: #fee2e2; color: #dc2626; }

/* ── Pagination ────────────────────────── */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}
.pagination-info { color: var(--text-muted); font-size: 14px; }
.pagination-buttons { display: flex; gap: 4px; align-items: center; }
.pagination {
    display: flex; gap: 4px; align-items: center;
    justify-content: center; flex-wrap: wrap;
    list-style: none; margin: 0; padding: 0;
}
.page-btn {
    min-width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--bg-white); cursor: pointer;
    font-size: 13px; font-weight: 500; color: #475569;
    transition: all 0.2s ease; text-decoration: none;
}
.page-btn:hover:not(:disabled) {
    background: #f1f5f9; border-color: #cbd5e1; color: #1e293b;
}
.page-btn.active {
    background: #3b82f6; border-color: #3b82f6;
    color: white; box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.page-ellipsis { padding: 8px 4px; color: var(--text-muted); }

/* ── Modal ─────────────────────────────── */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex !important; }

.modal-container {
    background: white; border-radius: 16px; padding: 0;
    max-width: 680px; width: 95%; max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
    display: flex; flex-direction: column;
}
.modal-container.modal-xs  { max-width: 420px; }
.modal-container.modal-sm  { max-width: 520px; }
.modal-container.modal-md  { max-width: 680px; }
.modal-container.modal-lg  { max-width: 860px; }
.modal-container.modal-xl  { max-width: 1100px; }
.modal-container.modal-xxl { max-width: 1360px; }

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-light);
}
.modal-title {
    margin: 0; font-size: 18px; font-weight: 600; color: #0f172a;
    display: flex; align-items: center; gap: 10px;
}
.modal-title svg { color: var(--color-primary); }
.modal-close {
    background: none; border: none; font-size: 24px;
    cursor: pointer; color: var(--text-muted);
    padding: 5px; border-radius: 8px; transition: all 0.2s; line-height: 1;
}
.modal-close:hover { background: var(--bg-light); color: var(--danger); }
.modal-body {
    padding: 24px; overflow-y: auto;
    max-height: calc(85vh - 140px); flex: 1;
}
.modal-footer {
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
}
.dt-footer-left { display: flex; flex-direction: column; gap: 4px; }
.dt-footer-right { display: flex; gap: 8px; align-items: center; }
.dt-checkbox-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: #64748b; cursor: pointer;
}
.dt-checkbox-label input[type="checkbox"] {
    width: 14px; height: 14px; accent-color: var(--color-primary-600, #7c3aed);
}
.modal-section {
    margin-bottom: 1.5rem; padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}
.modal-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.modal-section-title {
    font-size: 0.875rem; font-weight: 600; color: var(--color-primary);
    margin-bottom: 1rem; padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}

/* Modal Detail Table */
.modal-detail-table { width: 100%; border-collapse: collapse; }
.modal-detail-table tr { border-bottom: 1px solid var(--border); }
.modal-detail-table tr:last-child { border-bottom: none; }
.modal-detail-table td { padding: 12px 0; vertical-align: top; }
.modal-detail-table td:first-child {
    font-weight: 600; color: var(--text-muted); width: 140px; padding-right: 20px;
}
.modal-detail-table td:last-child { color: var(--text-dark); }

@media (max-width: 768px) {
    .modal-container { width: 95% !important; max-width: 95% !important; margin: 1rem; }
    .modal-body { padding: 1rem; }
    .modal-body .form-row { grid-template-columns: 1fr !important; }
}
@media (max-width: 576px) {
    .modal-container {
        width: 100% !important; max-width: 100% !important;
        max-height: 100vh; border-radius: 0; margin: 0;
    }
}

/* ── Filter Card ───────────────────────── */
.filter-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}
.filter-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 24px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}
.filter-header h3 {
    margin: 0; font-size: 14px; font-weight: 600;
    display: flex; align-items: center; gap: 8px; color: var(--text-dark);
}
.filter-header h3 svg { color: var(--color-primary); }
.filter-title {
    font-size: 16px; font-weight: 600;
    display: flex; align-items: center; gap: 10px; margin: 0;
}
.filter-title svg { color: var(--color-primary); }
.filter-body { padding: 20px 24px; }
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-label {
    font-size: 13px; font-weight: 600; color: var(--text-dark);
    display: flex; align-items: center; gap: 8px;
}
.filter-control {
    display: flex; flex-direction: column; gap: 6px;
}
.filter-control label {
    font-size: 12px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.03em;
}
.filter-control .form-input {
    font-size: 13px; padding: 8px 12px; height: 38px;
}
.filter-actions {
    margin-top: 24px; padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex; gap: 12px;
}

/* ── Form Controls ─────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block; margin-bottom: 0.5rem;
    font-size: 0.875rem; font-weight: 600; color: #334155;
}
.form-group label.required::after { content: " *"; color: #dc2626; }

.form-input,
input.form-input,
textarea.form-input,
select.form-input {
    width: 100%; padding: 0.75rem 1rem;
    font-size: 0.9375rem; line-height: 1.5;
    color: #1e293b; background-color: #ffffff;
    border: 1.5px solid var(--border); border-radius: 8px;
    transition: all 0.2s ease; font-family: inherit;
    box-sizing: border-box;
}
.form-input:focus {
    outline: 0;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 114, 35, 0.1);
}
.form-input::placeholder { color: #94a3b8; }
.form-input:disabled { background-color: #f8fafc; color: #94a3b8; cursor: not-allowed; opacity: 0.6; }
.form-input.error, .form-input.is-invalid { border-color: #dc2626; }
.form-input.error:focus, .form-input.is-invalid:focus {
    border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input {
    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 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.form-error { display: block; margin-top: 0.375rem; font-size: 0.8rem; color: #dc2626; }
.form-help  { display: block; margin-top: 0.375rem; font-size: 0.8rem; color: #64748b; }

/* ── Buttons ───────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.5rem; height: 43.5px; padding: 0 1.25rem;
    font-size: 0.875rem; font-weight: 600; border-radius: 8px;
    border: none; cursor: pointer; transition: all 0.2s ease;
    text-decoration: none; line-height: 1; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}
.btn-secondary {
    background: #ffffff; color: #1e293b;
    border: 1px solid #cbd5e1; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-secondary:hover:not(:disabled) { background: #f1f5f9; border-color: #94a3b8; }
.btn-danger  { background: #dc2626; color: white; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-warning { background: #f59e0b; color: white; }
.btn-warning:hover:not(:disabled) { background: #d97706; }
.btn-success { background: #10b981; color: white; }
.btn-success:hover:not(:disabled) { background: #059669; }
.btn-outline {
    background: transparent; border: 1.5px solid var(--border); color: #475569;
}
.btn-outline:hover:not(:disabled) {
    border-color: var(--color-primary); color: var(--color-primary);
    background: rgba(46, 114, 35, 0.05);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; height: auto; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-icon {
    width: 38px; height: 38px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #e5e7eb; background: white;
    border-radius: 6px; cursor: pointer; transition: all 0.2s; color: #6b7280;
}
.btn-icon:hover:not(:disabled) {
    border-color: var(--color-primary); color: var(--color-primary);
    background: rgba(46, 114, 35, 0.05);
}

/* ── File Upload ───────────────────────── */
.dosya-yukle-drop {
    border: 2px dashed #d1d5db; border-radius: 8px;
    padding: 1.5rem; text-align: center;
    transition: all 0.2s; cursor: pointer; background: #f9fafb;
}
.dosya-yukle-drop:hover, .dosya-yukle-drop.drag-over {
    border-color: var(--color-primary); background: rgba(46, 114, 35, 0.04);
}

.dosya-kuyruk {
    margin-top: 0.5rem; border: 1px solid #e2e8f0;
    border-radius: 6px; overflow: hidden;
}
.dosya-kuyruk-baslik {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; background: #f1f5f9;
    font-size: 0.8rem; font-weight: 600; color: #475569;
    border-bottom: 1px solid #e2e8f0;
}
.dosya-kuyruk-satir {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; font-size: 0.8rem;
    border-bottom: 1px solid #f1f5f9; color: #374151;
}
.dosya-kuyruk-satir:last-child { border-bottom: none; }
.dosya-kuyruk-ad { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dosya-kuyruk-boyut { color: #9ca3af; font-size: 0.72rem; flex-shrink: 0; }
.dosya-kuyruk-durum { flex-shrink: 0; font-size: 0.85rem; }
.dosya-kuyruk-durum.spin { color: #3b82f6; animation: dosyaSpin 1s linear infinite; }
.dosya-kuyruk-durum.ok { color: #22c55e; }
.dosya-kuyruk-durum.hata { color: #ef4444; }
@keyframes dosyaSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.dosya-liste { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.dosya-satir {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.6rem; background: #f3f4f6;
    border-radius: 6px; font-size: 0.85rem; transition: background 0.15s;
}
.dosya-satir:hover { background: #e5e7eb; }
.dosya-icon { color: #6b7280; flex-shrink: 0; font-size: 1rem; }
.dosya-ad { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #374151; }
.dosya-boyut { color: #9ca3af; font-size: 0.75rem; flex-shrink: 0; }
.dosya-btn { border: none; background: none; cursor: pointer; padding: 0.2rem 0.4rem; border-radius: 4px; font-size: 0.9rem; transition: background 0.15s; text-decoration: none; }
.dosya-btn.indir { color: #3b82f6; }
.dosya-btn.indir:hover { background: #dbeafe; }
.dosya-btn.sil { color: #ef4444; }
.dosya-btn.sil:hover { background: #fee2e2; }

.dosya-progress-bar { height: 6px; background: #e5e7eb; border-radius: 3px; margin-top: 0.5rem; overflow: hidden; }
.dosya-progress-fill { height: 100%; background: var(--color-primary); border-radius: 3px; transition: width 0.2s; width: 0; }

/* ── Form Grid ─────────────────────────── */
.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 768px) {
    .form-grid-2, .form-grid-3, .form-grid-4, .form-row { grid-template-columns: 1fr !important; }
}

/* ========================================
   GLASS MORPHISM
   ======================================== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* =============================================
   DARK MODE - GLOBAL CSS OVERRIDES
   Overrides hardcoded Tailwind utility classes
   when .dark is active on <html>.
   Uses !important to beat Tailwind specificity.
   Colors aligned with JudgeAI dark palette.
   ============================================= */

/* --- Color Scheme --- */
.dark {
    color-scheme: dark;
}

/* --- Background Overrides --- */
.dark .bg-white {
    background-color: #111827 !important; /* gray-900 */
}
.dark .bg-gray-50 {
    background-color: #0d1117 !important;
}
.dark .bg-gray-100 {
    background-color: #162213 !important;
}
.dark .bg-slate-50 {
    background-color: #0f172a !important;
}
.dark .bg-slate-100 {
    background-color: #1e293b !important;
}

/* Opacity-modified backgrounds */
.dark .bg-slate-50\/50,
.dark [class*="bg-slate-50/50"] {
    background-color: rgba(30, 41, 59, 0.5) !important;
}
.dark .bg-slate-100\/50,
.dark [class*="bg-slate-100/50"] {
    background-color: rgba(30, 41, 59, 0.5) !important;
}

/* Gradient backgrounds (cards) */
.dark .bg-gradient-to-br.from-white,
.dark [class*="from-white"] {
    --tw-gradient-from: #111827 !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
.dark [class*="to-slate-50"] {
    --tw-gradient-to: rgba(30, 41, 59, 0.3) !important;
}
.dark .from-white {
    --tw-gradient-from: #111827 !important;
}
.dark [class*="from-slate-200"] {
    --tw-gradient-from: #1e293b !important;
}
.dark [class*="to-slate-100"] {
    --tw-gradient-to: #162213 !important;
}

/* --- Text Color Overrides --- */
.dark .text-gray-900,
.dark .text-slate-900 {
    color: #f1f5f9 !important; /* slate-100 */
}
.dark .text-gray-800,
.dark .text-slate-800 {
    color: #e2e8f0 !important; /* slate-200 */
}
.dark .text-gray-700,
.dark .text-slate-700 {
    color: #cbd5e1 !important; /* slate-300 */
}
.dark .text-gray-600,
.dark .text-slate-600 {
    color: #94a3b8 !important; /* slate-400 */
}
.dark .text-gray-500,
.dark .text-slate-500 {
    color: #64748b !important; /* slate-500 */
}
.dark .text-gray-400,
.dark .text-slate-400 {
    color: #94a3b8 !important; /* slate-400 */
}
.dark .text-gray-300,
.dark .text-slate-300 {
    color: #94a3b8 !important;
}

/* Very light text used as watermark/decoration */
.dark [class*="text-gray-900/[0.04]"],
.dark [class*="text-gray-900\\/\\[0\\.04\\]"] {
    color: rgba(241, 245, 249, 0.06) !important;
}

/* --- Border Overrides --- */
.dark .border-gray-100,
.dark .border-slate-100 {
    border-color: #1e293b !important; /* slate-800 */
}
.dark .border-gray-200,
.dark .border-slate-200 {
    border-color: #334155 !important; /* slate-700 */
}
.dark .border-gray-300,
.dark .border-slate-300 {
    border-color: #475569 !important; /* slate-600 */
}
.dark [class*="border-slate-200/60"] {
    border-color: rgba(51, 65, 85, 0.6) !important;
}
.dark [class*="border-slate-100/50"] {
    border-color: rgba(30, 41, 59, 0.5) !important;
}
.dark [class*="border-slate-300/80"] {
    border-color: rgba(71, 85, 105, 0.8) !important;
}

/* --- Shadow Overrides --- */
.dark .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3) !important;
}
.dark .shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}
.dark .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2) !important;
}
.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3) !important;
}
.dark [class*="shadow-slate-300/50"] {
    --tw-shadow-color: rgba(0, 0, 0, 0.3) !important;
}

/* --- Hover State Overrides --- */
.dark .hover\:bg-white:hover,
.dark [class*="hover:bg-white"]:hover {
    background-color: #1e293b !important;
}
.dark .hover\:border-gray-100:hover,
.dark [class*="hover:border-gray-100"]:hover {
    border-color: #334155 !important;
}
.dark .hover\:border-slate-200:hover,
.dark [class*="hover:border-slate-200"]:hover {
    border-color: #475569 !important;
}
.dark .hover\:shadow-md:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3) !important;
}

/* --- Input / Form Overrides --- */
.dark input,
.dark textarea,
.dark select {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
.dark input::placeholder,
.dark textarea::placeholder {
    color: #64748b !important;
}
.dark input:focus,
.dark textarea:focus,
.dark select:focus {
    border-color: #2E7223 !important;
}
.dark .placeholder-gray-400::placeholder,
.dark .placeholder\:text-gray-400::placeholder {
    color: #64748b !important;
}

/* --- Primary Color Adjustments for Dark Mode --- */
.dark .bg-primary-50 {
    background-color: rgba(46, 114, 35, 0.15) !important;
}
.dark .bg-primary-100 {
    background-color: rgba(46, 114, 35, 0.25) !important;
}

/* --- Divider / Separator Lines --- */
.dark .bg-gray-200 {
    background-color: #334155 !important;
}
.dark .bg-gray-300 {
    background-color: #475569 !important;
}
.dark .bg-slate-200 {
    background-color: #334155 !important;
}

/* --- Ring Overrides --- */
.dark .ring-gray-100,
.dark .ring-slate-100 {
    --tw-ring-color: #1e293b !important;
}
.dark .ring-gray-200,
.dark .ring-slate-200 {
    --tw-ring-color: #334155 !important;
}

/* --- Scrollbar Dark Mode --- */
.dark ::-webkit-scrollbar-track {
    background: #111827;
}
.dark ::-webkit-scrollbar-thumb {
    background-color: #334155;
}
.dark ::-webkit-scrollbar-thumb:hover {
    background-color: #475569;
}

/* --- Toast Dark Mode --- */
.dark .toast-success {
    background-color: #064e3b !important;
    border-color: #065f46 !important;
    color: #a7f3d0 !important;
}
.dark .toast-error {
    background-color: #450a0a !important;
    border-color: #7f1d1d !important;
    color: #fecaca !important;
}
.dark .toast-warning {
    background-color: #451a03 !important;
    border-color: #78350f !important;
    color: #fde68a !important;
}
.dark .toast-info {
    background-color: #0c1e3a !important;
    border-color: #1e3a5f !important;
    color: #bfdbfe !important;
}

/* --- Footer Dark Mode --- */
.dark footer {
    background-color: var(--color-background-secondary) !important;
}
.dark footer .bg-white {
    background-color: #1e293b !important;
}
.dark footer .hover\:bg-white:hover,
.dark footer [class*="hover:bg-white"]:hover {
    background-color: #1e293b !important;
}

/* --- Auth Pages (Giris/Kayit/SifremiUnuttum) gradient panel --- */
.dark [style*="background: radial-gradient(circle at top left, #F7FDF3"] {
    background: radial-gradient(circle at top left, #0f1a0d 0%, #162213 100%) !important;
}

/* --- Glass Morphism Dark Mode --- */
.dark .glass {
    background: rgba(17, 24, 39, 0.4);
    border-color: rgba(255, 255, 255, 0.08);
}

/* --- Hover Lift Dark Mode --- */
.dark .hover-lift:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* --- Checkbox dark mode --- */
.dark input[type="checkbox"] {
    accent-color: #2E7223;
}

/* --- Payment card boxes in footer --- */
.dark .border-gray-100.bg-white {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* =============================================
   Analiz Bildirim Widget — floating progress cards
   ============================================= */
.analiz-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 320px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: opacity 0.3s, transform 0.3s;
    /* kapatma butonu konumlandırması için */
}
.analiz-widget.gizli {
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
}
.aw-kapat {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    z-index: 1;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}
.aw-kapat:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}
.dark .aw-kapat {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}
.dark .aw-kapat:hover {
    background: #7f1d1d;
    color: #fca5a5;
}
.analiz-widget-liste {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
}

/* ── Card ── */
.aw-kart {
    background: #fff;
    border-radius: 0 12px 12px 0;
    border-left: 4px solid var(--primary-600, #2D6A4F);
    padding: 14px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);
}
.aw-kart.tamamlandi { border-left-color: #22c55e; }
.aw-kart.hata       { border-left-color: #ef4444; }
.aw-kart.kuyrukta    { border-left-color: #f59e0b; }

/* ── Top row: icon + filename + percentage ── */
.aw-ust {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.aw-icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}
.aw-dosya {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aw-yuzde {
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Progress bar ── */
.aw-bar {
    height: 3px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}
.aw-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ── Bottom row: status text + action link ── */
.aw-alt {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.aw-detay {
    font-size: 0.72rem;
    color: #64748b;
}
.aw-link {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
}
.aw-link:hover { text-decoration: underline; }

/* ── Dark mode ── */
.dark .aw-kart {
    background: #1e293b;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.dark .aw-dosya { color: #f1f5f9; }
.dark .aw-detay { color: #94a3b8; }
.dark .aw-bar   { background: #334155; }

/* ========================================
   CANLI CHAT WIDGET (v0.tedkik.com style)
   ======================================== */
.chat-chip {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 9999px;
    border: 1px solid var(--color-primary-200, #A9D6A0);
    color: var(--color-primary-700, #255D1C);
    background: var(--color-primary-50, #F7FDF3);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.chat-chip:hover { transform: scale(1.05); }
.chat-chip:active { transform: scale(0.95); }

/* ── Dark mode ── */
.dark #chatPanel {
    background: #1e293b !important;
}
.dark #chatPanel .border-gray-100 { border-color: #334155; }
.dark .chat-chip {
    background: #334155;
    border-color: #475569;
    color: #86efac;
}

/* ========================================
   DOCUMENT VIEW - Word-like Paper Layout
   ======================================== */

/* ── View Toggle Buttons ── */
.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s ease;
}
.view-toggle-btn:hover {
    border-color: var(--color-primary-300);
    color: var(--color-primary-600);
}
.view-toggle-btn.active {
    background: var(--color-primary-50);
    border-color: var(--color-primary-400);
    color: var(--color-primary-700);
    box-shadow: 0 0 0 1px var(--color-primary-200);
}

/* ── 3-Column Container ── */
.doc-view-container {
    display: flex;
    gap: 0;
    min-height: 70vh;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}

/* ── Left: Analysis Tabs ── */
.doc-view-tabs {
    width: 220px;
    min-width: 220px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    padding: 12px 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 85vh;
}
.doc-view-tabs-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    padding: 8px 16px 12px;
}
.doc-view-tab-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
    font-size: 13px;
    color: #374151;
}
.doc-view-tab-item:hover {
    background: #f9fafb;
    border-left-color: #d1d5db;
}
.doc-view-tab-item.active {
    background: var(--color-primary-50);
    border-left-color: var(--color-primary-600);
    color: var(--color-primary-800);
    font-weight: 600;
}
.doc-view-tab-score {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    min-width: 36px;
    text-align: center;
}
.doc-view-tab-score.score-high { background: #d1fae5; color: #065f46; }
.doc-view-tab-score.score-mid { background: #fef3c7; color: #92400e; }
.doc-view-tab-score.score-low { background: #fee2e2; color: #991b1b; }
.doc-view-tab-count {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 4px;
}

/* ── Center: A4 Paper ── */
.doc-view-paper-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 32px 24px;
    display: flex;
    justify-content: center;
    max-height: 85vh;
}
.doc-view-paper {
    width: 100%;
    max-width: 780px;
    background: #fff;
    border-radius: 4px;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.08),
        0 4px 12px rgba(0,0,0,0.04),
        0 0 0 1px rgba(0,0,0,0.03);
    padding: 48px 56px;
    min-height: 900px;
    font-family: 'Georgia', 'Times New Roman', 'Noto Serif', serif;
    font-size: 14px;
    line-height: 1.7;
    color: #1f2937;
}
.doc-view-paper-header {
    text-align: center;
    padding-bottom: 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
}
.doc-view-paper-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    font-family: 'Georgia', serif;
}
.doc-view-paper-subtitle {
    font-size: 13px;
    color: #6b7280;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.doc-view-paper-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #9ca3af;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.doc-view-paper-empty svg { margin-bottom: 16px; opacity: 0.4; }
.doc-view-paper-empty p { font-size: 14px; }

/* ── Finding Item (Tracked Change) ── */
.doc-view-item {
    position: relative;
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.doc-view-item:hover {
    border-color: #e5e7eb;
    border-left-color: var(--color-primary-300);
    background: #fafbfc;
}
.doc-view-item.selected {
    border-color: var(--color-primary-200);
    border-left-color: var(--color-primary-600);
    background: var(--color-primary-50);
    box-shadow: 0 2px 8px rgba(46,114,35,0.08);
}
.doc-view-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.doc-view-item-num {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #6b7280;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.doc-view-item.selected .doc-view-item-num {
    background: var(--color-primary-600);
}
.doc-view-item-category {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #4b5563;
}
.doc-view-item-comment-icon {
    margin-left: auto;
    color: #d1d5db;
    transition: color 0.15s;
}
.doc-view-item:hover .doc-view-item-comment-icon { color: var(--color-primary-400); }

/* ── Fault (Original Text - Highlight) ── */
.doc-view-fault {
    background: #fefce8;
    border-left: 3px solid #facc15;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #78350f;
    font-style: italic;
}
.doc-view-fault::before {
    content: '\201C';
    font-size: 20px;
    color: #d97706;
    margin-right: 4px;
    font-family: Georgia, serif;
}

/* ── Strikethrough (Issue) ── */
.doc-view-strikethrough {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #991b1b;
}
.doc-view-strikethrough-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #dc2626;
    margin-bottom: 4px;
}

/* ── Insertion (Suggestion) ── */
.doc-view-insertion {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    line-height: 1.6;
    color: #166534;
}
.doc-view-insertion-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #16a34a;
    margin-bottom: 4px;
}

/* ── Right: Detail Sidebar ── */
.doc-view-sidebar {
    width: 340px;
    min-width: 340px;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    overflow-y: auto;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 85vh;
}
.doc-view-sidebar-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #9ca3af;
    text-align: center;
    padding: 24px;
}
.doc-view-sidebar-empty svg { margin-bottom: 12px; opacity: 0.35; }
.doc-view-sidebar-empty p { font-size: 13px; }
.doc-view-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.doc-view-sidebar-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}
.doc-view-sidebar-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.doc-view-sidebar-close:hover { background: #f3f4f6; color: #374151; }
.doc-view-sidebar-body { padding: 20px; }
.doc-view-sidebar-section {
    margin-bottom: 20px;
}
.doc-view-sidebar-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 8px;
}
.doc-view-sidebar-section-content {
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
}
.doc-view-sidebar-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.doc-view-sidebar-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
}

/* ── Unavailable State ── */
.doc-view-unavailable {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 50vh;
    padding: 48px;
}
.doc-view-unavailable-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.doc-view-unavailable-icon svg {
    width: 32px;
    height: 32px;
    color: #9ca3af;
}
.doc-view-unavailable h3 {
    font-size: 18px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}
.doc-view-unavailable p {
    font-size: 14px;
    color: #6b7280;
    max-width: 380px;
    margin-bottom: 20px;
    line-height: 1.6;
}
.doc-view-unavailable a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary-700);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 8px;
    border: 1px solid var(--color-primary-300);
    background: var(--color-primary-50);
    transition: all 0.15s;
}
.doc-view-unavailable a:hover {
    background: var(--color-primary-100);
    border-color: var(--color-primary-400);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .doc-view-tabs { width: 56px; min-width: 56px; }
    .doc-view-tabs-title { display: none; }
    .doc-view-tab-item { padding: 10px 8px; justify-content: center; font-size: 0; }
    .doc-view-tab-item .doc-view-tab-score { font-size: 11px; }
    .doc-view-tab-count { display: none; }
    .doc-view-sidebar { width: 280px; min-width: 280px; }
}
@media (max-width: 767px) {
    .doc-view-container { flex-direction: column; }
    .doc-view-tabs {
        width: 100%;
        min-width: unset;
        max-height: unset;
        position: static;
        display: flex;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 8px;
        gap: 4px;
    }
    .doc-view-tabs-title { display: none; }
    .doc-view-tab-item {
        border-left: none;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 12px;
    }
    .doc-view-tab-item.active { border-left: none; border-bottom-color: var(--color-primary-600); }
    .doc-view-paper-wrapper { padding: 16px 8px; max-height: unset; }
    .doc-view-paper { padding: 24px 20px; min-height: 400px; }
    .doc-view-sidebar {
        width: 100%;
        min-width: unset;
        max-height: unset;
        position: static;
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }
}

/* ── Dark Mode ── */
.dark .view-toggle-btn { background: #1e293b; border-color: #334155; color: #94a3b8; }
.dark .view-toggle-btn:hover { border-color: var(--color-primary-400); color: var(--color-primary-300); }
.dark .view-toggle-btn.active { background: #1a2e1a; border-color: var(--color-primary-500); color: var(--color-primary-300); }

.dark .doc-view-container { background: #0f172a; border-color: #1e293b; }
.dark .doc-view-tabs { background: #1e293b; border-color: #334155; }
.dark .doc-view-tabs-title { color: #64748b; }
.dark .doc-view-tab-item { color: #cbd5e1; }
.dark .doc-view-tab-item:hover { background: #334155; border-left-color: #475569; }
.dark .doc-view-tab-item.active { background: #1a2e1a; border-left-color: var(--color-primary-500); color: #86efac; }
.dark .doc-view-tab-score.score-high { background: #064e3b; color: #6ee7b7; }
.dark .doc-view-tab-score.score-mid { background: #451a03; color: #fbbf24; }
.dark .doc-view-tab-score.score-low { background: #450a0a; color: #fca5a5; }

.dark .doc-view-paper-wrapper { background: #0f172a; }
.dark .doc-view-paper { background: #1e293b; color: #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.03); }
.dark .doc-view-paper-header { border-color: #334155; }
.dark .doc-view-paper-title { color: #f1f5f9; }
.dark .doc-view-paper-subtitle { color: #64748b; }

.dark .doc-view-item { border-color: #1e293b; }
.dark .doc-view-item:hover { border-color: #334155; background: #1a2332; }
.dark .doc-view-item.selected { border-color: #1a3a1a; background: #0f1f0f; }
.dark .doc-view-item-num { background: #475569; }
.dark .doc-view-item.selected .doc-view-item-num { background: var(--color-primary-600); }
.dark .doc-view-item-category { background: #334155; color: #94a3b8; }

.dark .doc-view-fault { background: #1c1917; border-color: #a16207; color: #fbbf24; }
.dark .doc-view-fault::before { color: #d97706; }
.dark .doc-view-strikethrough { background: #1c0a0a; border-color: #b91c1c; color: #fca5a5; }
.dark .doc-view-strikethrough-label { color: #ef4444; }
.dark .doc-view-insertion { background: #052e16; border-color: #16a34a; color: #86efac; }
.dark .doc-view-insertion-label { color: #22c55e; }

.dark .doc-view-sidebar { background: #1e293b; border-color: #334155; }
.dark .doc-view-sidebar-header { border-color: #334155; }
.dark .doc-view-sidebar-header h3 { color: #f1f5f9; }
.dark .doc-view-sidebar-close:hover { background: #334155; color: #e2e8f0; }
.dark .doc-view-sidebar-section-title { color: #64748b; }
.dark .doc-view-sidebar-section-content { color: #cbd5e1; }

.dark .doc-view-unavailable-icon { background: #334155; }
.dark .doc-view-unavailable-icon svg { color: #64748b; }
.dark .doc-view-unavailable h3 { color: #e2e8f0; }
.dark .doc-view-unavailable p { color: #94a3b8; }
.dark .doc-view-unavailable a { background: #1a2e1a; border-color: #1a4a1a; color: #86efac; }
.dark .doc-view-unavailable a:hover { background: #1a3a1a; }

/* ── Print ── */
@media print {
    .doc-view-tabs, .doc-view-sidebar, .view-toggle-btn { display: none !important; }
    .doc-view-container { border: none; }
    .doc-view-paper-wrapper { padding: 0; max-height: unset; }
    .doc-view-paper { box-shadow: none; padding: 0; }
    .doc-view-item { break-inside: avoid; }
}
