/* =============================================
   PrepSub - 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: 10001; /* modal-overlay (9999) ustune */
    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: var(--radius);
    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: var(--radius); }
::-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; }

/* Mobilde topbar kullanıcı bilgisi gizle (sidebar var, gereksiz tekrar) */
@media (max-width: 1023px) {
    .top-bar-user { display: none !important; }
}

.top-bar-logout {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    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: var(--radius, 6px);
}

.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: 12px 12px 16px;
    max-width: 1600px;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    margin: 0 auto;
}
@media (min-width: 640px) { .panel-main { padding: 16px 20px 24px; } }
@media (min-width: 1024px) { .panel-main { padding: 24px 32px 32px; } }

/* Panel sayfa başlığı — tüm liste/panel sayfalarında ortak iskele */
.panel-page-header { position: relative; margin-bottom: 16px; padding-left: 18px; }
.panel-page-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 6px;
    min-height: 36px;
    border-radius: 9999px;
    background: #2E7223;
}
.panel-page-header.panel-page-header-inline { margin-bottom: 0; }
.panel-page-title { font-size: 22px; font-weight: 700; color: #111827; line-height: 1.25; margin: 0; }
.panel-page-subtitle { font-size: 14px; color: #6b7280; margin: 4px 0 0; }
.dark .panel-page-title { color: #f1f5f9; }
.dark .panel-page-subtitle { color: #94a3b8; }
@media (min-width: 1024px) {
    .panel-page-title { font-size: 26px; }
    .panel-page-subtitle { font-size: 15px; }
}

/* Sayfa başlığı — sol primary strip + h1 + altyazı (public sayfalarda kullanılır) */
.page-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.page-header-strip {
    width: 6px;
    align-self: stretch;
    min-height: 36px;
    border-radius: 9999px;
    background: #2E7223;
    flex-shrink: 0;
}
.page-header-text { min-width: 0; flex: 1; }
.page-header-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
    margin: 0;
}
.page-header-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 4px 0 0;
}
.dark .page-header-title { color: #f1f5f9; }
.dark .page-header-subtitle { color: #94a3b8; }
@media (min-width: 1024px) {
    .page-header-title { font-size: 28px; }
    .page-header-subtitle { font-size: 15px; }
    .page-header-strip { min-height: 44px; }
}

/* ¦¦ 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: var(--radius);
    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: var(--radius);
    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: var(--radius);
    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: var(--radius);
        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: var(--radius);
    }

    /* 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: var(--radius);
        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; }
}

/* ¦¦ Mobile Sidebar for Main Layout (navbar hamburger menu) ¦¦ */
body.mobile-sidebar-open { overflow: hidden; }
.mobile-sidebar-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.3s ease;
}
.mobile-sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0; left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
}
.mobile-sidebar.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

/* Header */
.mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.mobile-sidebar-close {
    background: none; border: none;
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--radius);
    color: #64748b; cursor: pointer;
    transition: all 0.2s ease;
}
.mobile-sidebar-close:hover { background: #f1f5f9; color: #334155; }

/* Navigation */
.mobile-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 16px;
}
.mobile-sidebar-nav::-webkit-scrollbar { width: 3px; }
.mobile-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.mobile-sidebar-nav::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: var(--radius); }

.mobile-sb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}
.mobile-sb-item svg {
    flex-shrink: 0; width: 20px; height: 20px;
    color: #64748b; transition: all 0.2s ease;
}
.mobile-sb-item:hover { color: var(--color-primary, #2E7223); background: #f0fdf4; }
.mobile-sb-item:hover svg { color: var(--color-primary, #2E7223); }
.mobile-sb-item.active { color: var(--color-primary, #2E7223); background: #f0fdf4; font-weight: 600; }
.mobile-sb-item.active svg { color: var(--color-primary, #2E7223); }

.mobile-sb-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 12px 4px;
}

/* Primary CTA item inside mobile sidebar nav (e.g. "Panele Git") */
.mobile-sb-cta-primary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--color-primary, #2E7223), #255D1C);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(46, 114, 35, 0.18);
    transition: all 0.2s ease;
}
.mobile-sb-cta-primary svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #fff;
}
.mobile-sb-cta-primary:hover,
.mobile-sb-cta-primary:focus {
    color: #fff;
    opacity: 0.92;
    box-shadow: 0 3px 12px rgba(46, 114, 35, 0.25);
}
.mobile-sb-cta-primary:active { transform: translateY(1px); }
.mobile-sb-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 8px 12px;
}

/* Language */
.mobile-sidebar-lang {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.mobile-sidebar-lang-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 4px 0;
    background: none; border: none;
    cursor: pointer; opacity: 0.8;
}

/* User info (panel sidebar style) */
.mobile-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.mobile-sidebar-user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary, #2E7223), #255D1C);
    color: #fff; font-weight: 700; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.mobile-sidebar-user-details {
    display: flex; flex-direction: column;
    min-width: 0; flex: 1;
}
.mobile-sidebar-user-name {
    font-size: 13px; font-weight: 600;
    color: #1e293b; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.mobile-sidebar-user-email {
    font-size: 11px; color: #94a3b8;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mobile-sidebar-user-logout {
    background: none; border: none;
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: var(--radius);
    color: #ef4444; cursor: pointer;
    transition: all 0.2s ease; flex-shrink: 0;
}
.mobile-sidebar-user-logout:hover { background: #fef2f2; }

/* Auth buttons for logged-out users */
.mobile-sidebar-auth {
    display: flex; flex-direction: column;
    gap: 8px; padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.mobile-sidebar-auth-login {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 16px; font-size: 14px; font-weight: 500;
    border: 1px solid var(--color-primary, #2E7223);
    color: var(--color-primary, #2E7223);
    border-radius: var(--radius); text-decoration: none;
    transition: all 0.2s ease;
}
.mobile-sidebar-auth-login:hover { background: #f0fdf4; }
.mobile-sidebar-auth-register {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 16px; font-size: 14px; font-weight: 500;
    background: var(--color-primary, #2E7223); color: #fff;
    border-radius: var(--radius); text-decoration: none;
    transition: all 0.2s ease; border: none;
}
.mobile-sidebar-auth-register:hover { opacity: 0.9; }

/* Hide mobile sidebar on desktop (>=1024px) */
@media (min-width: 1024px) {
    .mobile-sidebar,
    .mobile-sidebar-overlay { display: none !important; }
}

/* ¦¦ Sidebar Toggle Button (AdminPanel birebir) ¦¦¦¦¦ */
.sidebar-toggle {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    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: var(--radius);
}
.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: var(--radius); 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: var(--radius); }
.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: 6px;
    --radius-lg: 6px;
    /* 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: var(--radius); border: none; cursor: pointer;
    font-size: 14px; transition: all 0.2s;
}
.action-btn.primary { background: rgba(46,114,35,0.1); color: #2E7223; }
.action-btn.primary:hover { background: #2E7223; color: white; }
.action-btn.view    { background: rgba(59,130,246,0.1); color: #3b82f6; }
.action-btn.view:hover    { background: #3b82f6; color: white; }
.action-btn.send    { background: rgba(16,185,129,0.1); color: #10b981; }
.action-btn.send:hover    { background: #10b981; color: white; }
.action-btn.edit    { background: rgba(245,158,11,0.1); color: #d97706; }
.action-btn.edit:hover    { background: #d97706; color: white; }
.action-btn.status  { background: rgba(255,111,15,0.1); color: #FF6F0F; }
.action-btn.status:hover  { background: #FF6F0F; color: white; }
.action-btn.pdf     { background: rgba(220,38,38,0.1); color: #dc2626; }
.action-btn.pdf:hover     { background: #dc2626; color: white; }
.action-btn.validate { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.action-btn.validate:hover { background: #8b5cf6; color: white; }
.action-btn.info    { background: rgba(99,102,241,0.1); color: #6366f1; }
.action-btn.info:hover    { background: #6366f1; color: white; }
.action-btn.delete,
.action-btn.danger  { background: rgba(220,38,38,0.1); color: #dc2626; }
.action-btn.delete:hover,
.action-btn.danger:hover  { background: #dc2626; color: white; }
.action-btn.more    { background: var(--bg-light, #f8fafc); color: var(--text-muted, #64748b); }
.action-btn.more:hover    { background: var(--secondary, #1a2b3c); 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.4;
    overflow: visible; white-space: nowrap;
    min-height: auto; min-width: auto;
}
button.badge {
    border: none; cursor: pointer;
    -webkit-appearance: none; appearance: none;
}
.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: var(--radius);
    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: var(--radius); 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: var(--radius); 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);
}

/* ¦¦ Duyuru Modal — kapak gorseli header altinda, aciklama ustunde ¦¦ */
.duyuru-modal-gorsel {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    max-height: 280px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.duyuru-modal-gorsel img {
    width: 100%; max-height: 280px;
    object-fit: cover; display: block;
}
@media (max-width: 768px) {
    .duyuru-modal-gorsel { max-height: 180px; }
    .duyuru-modal-gorsel img { max-height: 180px; }
}
.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: var(--radius); margin: 0;
    }
}

/* ¦¦ Kisayol Modal ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ */
.kisayol-modal-mesaj {
    font-size: 14px; color: #475569; line-height: 1.6; text-align: center;
}

/* ¦¦ Modal Grid Components (dl-*) ¦¦¦¦¦¦¦ */
.dl-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 28px;
}
@media (max-width: 768px) {
    .dl-grid { grid-template-columns: 1fr; }
}
.dl-info { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.dl-info-header { display: flex; align-items: center; gap: 14px; }
.dl-icon-box {
    width: 56px; height: 56px; flex-shrink: 0;
    background: var(--color-primary-50, #f5f3ff);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
}
.dl-info-title { font-size: 16px; font-weight: 700; color: #1e293b; margin: 0; }
.dl-info-desc { font-size: 14px; color: #64748b; line-height: 1.7; margin: 0; }
.dl-checklist { display: flex; flex-direction: column; gap: 8px; }
.dl-check-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; color: #334155;
}
.dl-info-notice {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px 12px;
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius);
    font-size: 12px; color: #1e40af; line-height: 1.5;
}
.dl-options { display: flex; flex-direction: column; }
.dl-options-card {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: var(--radius);
    padding: 20px; display: flex; flex-direction: column; gap: 0;
}
.dl-section { display: flex; flex-direction: column; gap: 10px; }
.dl-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700; color: #475569;
    letter-spacing: 0.05em; margin: 0;
}
.dl-section-title svg { color: var(--color-primary-600, #7c3aed); }
.dl-divider { height: 1px; background: #e2e8f0; margin: 16px 0; }
.dl-input {
    width: 100%; padding: 10px 14px;
    background: white; border: 1px solid #e2e8f0; border-radius: var(--radius);
    font-size: 14px; font-weight: 500; color: #1e293b;
    outline: none; transition: all 0.2s;
    box-sizing: border-box;
}
.dl-input:focus { border-color: var(--color-primary-500, #8b5cf6); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08); }
.dl-input::placeholder { color: #94a3b8; }
.dl-doc-card {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: var(--radius);
}
.dl-doc-name {
    font-size: 14px; font-weight: 600; color: #1e293b;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dl-select {
    width: 100%; padding: 10px 14px;
    background: white; border: 1px solid #e2e8f0; border-radius: var(--radius);
    font-size: 14px; font-weight: 500; color: #1e293b;
    outline: none; transition: all 0.2s; cursor: pointer;
}
.dl-select:focus { border-color: var(--color-primary-500, #8b5cf6); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08); }
.dl-input-label {
    display: block; font-size: 12px; font-weight: 600; color: #475569;
    margin-bottom: 6px; margin-top: 10px;
}
.dl-footer-right { display: flex; gap: 8px; }

/* ¦¦ 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: var(--radius);
    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: var(--radius);
    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-danger-outline { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.btn-danger-outline:hover:not(:disabled) { background: #fee2e2; }
.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: var(--radius); 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: var(--radius);
    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: var(--radius); 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: var(--radius); 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: var(--radius); 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: var(--radius); margin-top: 0.5rem; overflow: hidden; }
.dosya-progress-fill { height: 100%; background: var(--color-primary); border-radius: var(--radius); 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;
}

/* =============================================
   Navbar Dropdown — Active Item State
   ============================================= */
.dd-item-active {
    position: relative !important;
}
.dd-item-active::after {
    content: '?';
    position: absolute;
    top: 14px;
    right: 10px;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    background-color: #2E7223;
    color: #fff;
    border-radius: 50%;
}
.dd-item-active > svg:last-child {
    display: none !important;
}
.dd-item-active > div:first-child {
    background-color: #EDFBE7 !important;
    color: #2E7223 !important;
}
.dd-item-active span {
    color: #2E7223 !important;
}

.sec-card-active > .sec-card-inner {
    position: relative !important;
}
.sec-card-active > .sec-card-inner::after {
    content: '?';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    background-color: #2E7223;
    color: #fff;
    border-radius: 50%;
}
.sec-card-active p,
.sec-card-active span {
    color: #2E7223 !important;
}
.sec-card-active svg {
    color: #2E7223 !important;
}

/* =============================================
   Analiz Bildirim Widget — floating progress cards
   ============================================= */
.analiz-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 360px;
    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: var(--radius);
    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);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.aw-kart:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.07);
}
.aw-kart.tamamlandi { border-left-color: #22c55e; }
.aw-kart.hata       { border-left-color: #ef4444; }
.aw-kart.kuyrukta    { border-left-color: #f59e0b; }

/* ¦¦ Tamamlandı kartı (yeni tasarım) ¦¦ */
.aw-kart.aw-tamamlandi {
    border-left-color: #22c55e;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 70%);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.18), 0 1px 4px rgba(0, 0, 0, 0.06);
    animation: awSuccessPulse 1.5s ease-out 1;
}
@keyframes awSuccessPulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
    70%  { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 4px 16px rgba(34, 197, 94, 0.18), 0 1px 4px rgba(0, 0, 0, 0.06); }
}
.aw-icon-success {
    color: #16a34a;
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    animation: awIconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1;
}
@keyframes awIconPop {
    0%   { transform: scale(0.4); opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.aw-baslik-grup {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.aw-hazir-baslik {
    font-size: 0.85rem;
    font-weight: 700;
    color: #15803d;
    line-height: 1.2;
}
.aw-dosya-tamam {
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
    margin-top: 2px;
}

/* ¦¦ Aksiyon butonları (3'lü) ¦¦ */
.aw-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}
.aw-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    cursor: pointer;
}
.aw-btn-primary {
    flex: 1.4;
    background: linear-gradient(90deg, var(--primary-500, #40916C) 0%, var(--primary-600, #2D6A4F) 100%);
    color: #fff;
    box-shadow: 0 1px 3px rgba(45, 106, 79, 0.3);
}
.aw-btn-primary:hover {
    background: linear-gradient(90deg, var(--primary-600, #2D6A4F) 0%, var(--primary-700, #1B4332) 100%);
    box-shadow: 0 2px 6px rgba(45, 106, 79, 0.4);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}
.aw-btn-outline {
    background: #fff;
    color: #475569;
    border-color: #e2e8f0;
}
.aw-btn-outline:hover {
    background: #f8fafc;
    color: #16a34a;
    border-color: #86efac;
    text-decoration: none;
}

/* ¦¦ 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: 6px;
    background: #e2e8f0;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}
.aw-bar-fill {
    height: 100%;
    border-radius: var(--radius);
    transition: width 0.5s ease;
    background: linear-gradient(90deg, var(--primary-500, #40916C) 0%, var(--primary-600, #2D6A4F) 100%);
    position: relative;
    overflow: hidden;
}
.aw-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
    animation: awBarShimmer 1.6s linear infinite;
}
@keyframes awBarShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ¦¦ 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; }
.aw-kalan {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-left: auto;
    margin-right: 8px;
    white-space: nowrap;
}

/* ¦¦ Dark mode ¦¦ */
.dark .aw-kart {
    background: #1e293b;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.dark .aw-kart:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
}
.dark .aw-dosya { color: #f1f5f9; }
.dark .aw-detay { color: #94a3b8; }
.dark .aw-bar   { background: #334155; }

.dark .aw-kart.aw-tamamlandi {
    background: linear-gradient(180deg, #052e16 0%, #1e293b 70%);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.25), 0 1px 4px rgba(0, 0, 0, 0.3);
}
.dark .aw-icon-success { color: #4ade80; }
.dark .aw-hazir-baslik { color: #4ade80; }
.dark .aw-dosya-tamam  { color: #94a3b8; }
.dark .aw-btn-outline {
    background: #0f172a;
    color: #cbd5e1;
    border-color: #334155;
}
.dark .aw-btn-outline:hover {
    background: #1e293b;
    color: #4ade80;
    border-color: #16a34a;
}

/* ========================================
   CANLI CHAT WIDGET
   ======================================== */
.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;
    gap: 6px;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius);
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.view-toggle-btn svg { flex-shrink: 0; }
.view-toggle-btn:hover {
    border-color: #c7d2fe;
    color: #6366f1;
}
.view-toggle-btn.active {
    background: #eef2ff;
    border-color: #a5b4fc;
    color: #4338ca;
    box-shadow: 0 0 0 2px #c7d2fe;
}
@media (max-width: 480px) {
    .view-toggle-btn { padding: 0 8px; }
    .view-toggle-btn span { display: none; }
}


/* view-toggle dark mode (ortak) */
.dark .view-toggle-btn { background: #1e293b; border-color: #334155; color: #94a3b8; }
.dark .view-toggle-btn:hover { border-color: #6366f1; color: #a5b4fc; }
.dark .view-toggle-btn.active { background: #1e2a4a; border-color: #6366f1; color: #a5b4fc; }

/* ¦¦ Results Action Bar (Sonuclar header buttons) ¦¦ */
.results-action-bar {
    display: flex; align-items: center; gap: 4px;
    flex-wrap: wrap;
}
.results-action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: 1px solid #e5e7eb; border-radius: var(--radius);
    background: #fff; font-size: 13px; font-weight: 500; color: #374151;
    cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.results-action-btn:hover { background: #f3f4f6; }
.results-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
@media (max-width: 640px) {
    .results-action-btn { padding: 6px 8px; font-size: 0; }
    .results-action-btn svg { font-size: initial; }
    .results-action-btn span { display: none; }
}
.dark .results-action-btn { background: #1e293b; border-color: #334155; color: #cbd5e1; }
.dark .results-action-btn:hover { background: #334155; }

/* ¦¦ List Toolbar (Kutuphane vb. liste sayfalari ust toolbar) ¦¦
   Sonuclar sayfasindaki .results-action-btn ile gorsel olarak esit. */
.list-toolbar {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-start;
}
/* Primary CTA (Yeni X) her zaman EN SAĞDA — !important + order ile garanti, search'i flex:1 yaparak sıkıştırma */
.list-toolbar > .list-toolbar-search { flex: 1 1 280px; min-width: 0; }
.list-toolbar > .list-toolbar-btn-primary { margin-left: auto !important; order: 99; }
/* Toolbar count göstergesi (Toplam: N) — sade, sağa yaslı */
.list-toolbar-count {
    display: inline-flex; align-items: center; gap: 8px;
    height: 55px; padding: 0 16px;
    margin-left: auto;
    color: #6b7280; font-size: 14px; white-space: nowrap;
}
.list-toolbar-count svg { width: 16px; height: 16px; flex-shrink: 0; }
.list-toolbar-count strong { color: #111827; font-weight: 700; margin-right: 4px; }
.dark .list-toolbar-count { color: #94a3b8; }
.dark .list-toolbar-count strong { color: #f1f5f9; }
@media (max-width: 640px) {
    .list-toolbar-count { height: 40px; font-size: 13px; padding: 0 8px; }
}
@media (min-width: 1024px) {
    .list-toolbar { width: auto; }
}
.list-toolbar-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 55px;
    padding: 0 18px; border: 1px solid #e5e7eb; border-radius: var(--radius);
    background: #fff; font-size: 14px; font-weight: 500; color: #374151;
    cursor: pointer; transition: all 0.15s; white-space: nowrap;
    line-height: 1;
}
.list-toolbar-btn:hover {
    background: #EDFBE7;
    border-color: #B3E9A3;
    color: #2E7223;
}
/* Select (dropdown) için sade gri hover — yeşil vurgu sadece gerçek butonlarda */
select.list-toolbar-btn:hover,
select.list-toolbar-btn:focus {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
    outline: none;
}
.dark select.list-toolbar-btn:hover,
.dark select.list-toolbar-btn:focus {
    background: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}
/* Avatar / initial badge — siyah text, kontrast için beyaz halo */
.avatar-initials {
    color: #111827 !important;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(255, 255, 255, 0.8);
    letter-spacing: 0;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
}
.list-toolbar-btn:disabled { opacity: 0.4; cursor: not-allowed; }
/* Search input — list-toolbar-btn ile aynı yükseklik/border/padding. */
.list-toolbar-input {
    display: inline-flex; align-items: center;
    height: 55px;
    padding: 0 18px 0 44px;
    border: 1px solid #e5e7eb; border-radius: var(--radius);
    background: #fff;
    font-size: 14px; font-weight: 500; color: #374151;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-width: 360px;
}
.list-toolbar-input:focus {
    border-color: #2E7223;
    box-shadow: 0 0 0 3px rgba(46, 114, 35, 0.1);
}
.list-toolbar-input::placeholder { color: #9ca3af; font-weight: 500; }
.list-toolbar-search {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.list-toolbar-search svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
}
.dark .list-toolbar-input { background: #1e293b; border-color: #334155; color: #cbd5e1; }
.dark .list-toolbar-input:focus { border-color: #4FBA39; box-shadow: 0 0 0 3px rgba(79, 186, 57, 0.15); }
.dark .list-toolbar-input::placeholder { color: #64748b; }
.dark .list-toolbar-search svg { color: #64748b; }
.list-toolbar-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.list-toolbar-btn .badge-dot {
    width: 6px; height: 6px; border-radius: 9999px; background: #4f46e5;
    display: inline-block;
}
.list-toolbar-btn .badge-dot.hidden { display: none; }
/* Primary variant — vurgulu CTA (orn. Yeni Analiz). PrepSub primary yeşili. */
.list-toolbar-btn-primary {
    background: #2E7223; border-color: #2E7223; color: #fff;
}
.list-toolbar-btn-primary:hover { background: #255D1C; border-color: #255D1C; color: #fff; }
/* Danger variant — destructive aksiyonlar (orn. Sil). Solid kırmızı. */
.list-toolbar-btn-danger {
    background: #dc2626; border-color: #dc2626; color: #fff;
}
.list-toolbar-btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
/* Info variant — bilgilendirici aksiyon (orn. Davet Et). Solid mavi. */
.list-toolbar-btn-info {
    background: #2563eb; border-color: #2563eb; color: #fff;
}
.list-toolbar-btn-info:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
@media (max-width: 640px) {
    .list-toolbar-btn { height: 40px; padding: 0 10px; font-size: 0; gap: 0; }
    .list-toolbar-btn svg { font-size: initial; }
    .list-toolbar-btn span:not(.badge-dot) { display: none; }
    /* Primary butonun mobilde ikon-only olmasi UX'i bozar; metin gorunsun */
    .list-toolbar-btn-primary { font-size: 13px; padding: 0 12px; gap: 6px; }
    .list-toolbar-btn-primary span:not(.badge-dot) { display: inline; }
    /* Select dropdown — option text'i gorunsun, ikon-only davranisina maruz kalmasin */
    select.list-toolbar-btn { font-size: 13px; padding: 0 28px 0 10px; gap: 6px; }
    select.list-toolbar-btn option { font-size: 13px; }
    /* Mobilde search alani tam genisle — flex parent'ta dogal width hesabi yerine 100% zorla */
    .list-toolbar-search { display: flex; width: 100%; }
    .list-toolbar-input { height: 50px; font-size: 14px; min-width: 0; width: 100%; padding-left: 40px; }
    .list-toolbar-search svg { left: 12px; width: 16px; height: 16px; }
    /* Mobil dropdown'lar — butonun altinda acilsin, viewport tasmasini engellemek
       icin width sinirli; yukseklik 70vh ile scrollable. Bottom-sheet kaldirildi
       cunku kullanici dropdown'un ekran altinda acilmasini "cok asagi" buluyor. */
    #filterDropdown,
    #sortDropdown {
        width: calc(100vw - 1.5rem) !important;
        max-width: 360px;
        max-height: 70vh;
        overflow-y: auto;
        right: 0 !important;
    }
}
.dark .list-toolbar-btn { background: #1e293b; border-color: #334155; color: #cbd5e1; }
.dark .list-toolbar-btn:hover { background: #1a2e1a; border-color: #4FBA39; color: #B3E9A3; }
.dark .list-toolbar-btn-primary { background: #2E7223; border-color: #2E7223; color: #fff; }
.dark .list-toolbar-btn-primary:hover { background: #1E4A17; border-color: #1E4A17; color: #fff; }
.dark .list-toolbar-btn-danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.dark .list-toolbar-btn-danger:hover { background: #991b1b; border-color: #991b1b; color: #fff; }
.dark .list-toolbar-btn-info { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.dark .list-toolbar-btn-info:hover { background: #1e40af; border-color: #1e40af; color: #fff; }
/* Sonuçlar sayfası — versiyon badge (v1, v2, ...).
   Indigo tonları ile vurgulu, breadcrumb içinde okunaklı kalır. */
.result-version-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius);
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}
.dark .result-version-badge {
    background: #1e2a4a;
    border-color: #6366f1;
    color: #a5b4fc;
}

/* Kredi Geçmişi — tip hücresi (ikon + badge): dar hücrede badge alt satıra düşer,
   dışarı taşmaz. Tailwind standalone'da flex-wrap class'ı garantili olmadığı için
   fallback class. */
.kg-tip-cell {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

/* Kredi Geçmişi — açıklama hücresi: 2 satıra kadar, üzerinde ellipsis. */
.kg-aciklama {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    word-break: break-word;
    max-width: 320px;
}

/* Bildirim badge — buton sağ üst köşesi.
   Tailwind precompiled'da -top-1/-right-1 her zaman olmadığından custom konumlandırma. */
#bildirimWidget { position: relative; }
#bildirimWidget > button { position: relative; }
#bildirimBadge,
#panelBildirimBadge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
}

/* Panel sidebar — mobil: alttaki kullanıcı bilgileri (Ad Soyad) ekrana sığsın, kesilmesin. */
.sb-user-info { min-width: 0; }
.sb-user-details { min-width: 0; flex: 1; }
.sb-user-name, .sb-user-role {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}
@media (max-width: 640px) {
    .sb-user-name { font-size: 13px; }
    .sb-user-role { font-size: 11px; }
}

/* dl-tabs (download modal sekmeleri) — mobilde sıkışıyor, ikon-only yap. */
@media (max-width: 480px) {
    .dl-tabs-wrapper .dl-tab { padding: 7px 9px; font-size: 0; gap: 0; }
    .dl-tabs-wrapper .dl-tab svg { font-size: initial; width: 18px; height: 18px; }
}

/* Sonuçlar sayfası header — sağ controls container.
   Mobilde flex-col parent içinde sağa yaslar (Tailwind self-end yedek olarak da geçer).
   Masaüstünde flex-row + justify-between varken margin-left:auto ile ekran sağına itilir. */
@media (min-width: 640px) {
    .results-controls-right {
        margin-left: auto;
        align-self: auto;
    }
}

/* ¦¦ Otomatik Dogrulama Sayfasi ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ */
.oto-dogrula-bg {
    background: radial-gradient(circle at top left, #F7FDF3 0%, #D5EECC 100%);
}
.oto-dogrula-dotgrid {
    background-image: radial-gradient(#2E7223 0.5px, transparent 0.5px);
    background-size: 24px 24px;
    opacity: 0.08;
}
.oto-dogrula-card {
    box-shadow: 0 25px 50px -12px rgba(46, 114, 35, 0.12);
    border: 1px solid rgba(213, 238, 204, 0.8);
}
.oto-dogrula-icon-bg {
    background: linear-gradient(135deg, #EDFBE7 0%, #D9F5D0 50%, #B3E9A3 100%);
}
.oto-dogrula-icon-bg-error {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 50%, #FCA5A5 100%);
}
/* iOS zoom önlemek için input min font 16px */
.oto-dogrula-input {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}
.oto-dogrula-poll-bar {
    width: 0%;
}
.oto-dogrula-mail-box {
    word-break: break-word;
}
@media (max-width: 640px) {
    .oto-dogrula-logo img {
        filter: drop-shadow(0 2px 4px rgba(46, 114, 35, 0.15));
    }
    /* Mobilde card padding ve form scale optimizasyonu */
    .oto-dogrula-card {
        box-shadow: 0 10px 30px -10px rgba(46, 114, 35, 0.18);
    }
}

/* ¦¦ Desktop Nav Link — wrapping önle ¦¦¦¦¦¦¦¦¦¦¦ */
.nav-link { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1279px) {
    .nav-link { font-size: 0.8125rem; }
}

/* ¦¦ User Center Mega Menu ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ */
.kullanim-mega { width: 380px; max-width: calc(100vw - 32px); overflow: hidden; }
.user-center-mega { width: 640px; max-width: calc(100vw - 32px); overflow: hidden; }
.mega-menu-xl { width: 680px; max-width: calc(100vw - 32px); overflow: hidden; }
.mega-menu-2xl { width: 860px; max-width: calc(100vw - 32px); overflow: hidden; }
.mega-menu-cols { display: flex; }
.mega-menu-cols-main { flex: 1 1 auto; min-width: 0; }
.mega-menu-cols-side { flex: 0 0 288px; width: 288px; }
/* Dropdown icerigi tasmasin: uzun metinler kirilsin (Turkce kelimelerde de calisir) */
.user-center-mega a span,
.mega-menu-xl a span,
.mega-menu-2xl a span {
    overflow-wrap: anywhere;
    word-break: break-word;
}
/* Mega menu grid item basliklarinin ortasinda kesmemesi icin */
.mega-menu-2xl .group\/item .font-semibold {
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}
@media (max-width: 1023px) {
    .kullanim-mega, .user-center-mega, .mega-menu-xl, .mega-menu-2xl { width: 300px; }
    .user-center-mega .grid, .mega-menu-xl .grid, .mega-menu-2xl .grid { grid-template-columns: 1fr; }
}

/* ¦¦ Context Menu ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ */
.ctx-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.45rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    text-align: left;
}
.ctx-item:hover { background-color: #f3f4f6; }
.ctx-danger { color: #dc2626; }
.ctx-danger:hover { background-color: #fef2f2; }

/* Admin Cache Yonetimi sayfasi */
.cache-btn {
    padding: 8px 14px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    background-color: #ffffff;
    color: #374151;
    font-weight: 500;
    transition: background-color 0.15s, border-color 0.15s;
    cursor: pointer;
}
.cache-btn:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}
.cache-btn-primary {
    background-color: #2E7223;
    border-color: #2E7223;
    color: #ffffff;
}
.cache-btn-primary:hover {
    background-color: #255D1C;
    border-color: #255D1C;
    color: #ffffff;
}

/* ===========================================================
   Onboarding Wizard  (ow-)
   A: Merkezi modal adımlar
   B: Spotlight + callout (sidebar elemanlarını vurgular)
   =========================================================== */

body.ow-modal-open { overflow: hidden; }

/* ¦¦ A: Modal overlay ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ */
.ow-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.52);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.ow-overlay.ow-active { display: flex; }

.ow-modal {
    position: relative;
    background: var(--bg-white, #fff);
    border-radius: var(--radius);
    max-width: 560px;
    width: 100%;
    padding: 2rem 2rem 1.5rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.08);
    animation: owSlideUp 0.32s cubic-bezier(0.34,1.46,0.64,1);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes owSlideUp {
    from { opacity: 0; transform: translateY(22px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.ow-close {
    position: absolute;
    top: 1rem; right: 1rem;
    width: 30px; height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--bg-light, #f8faf7);
    color: var(--text-muted, #64748b);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.ow-close:hover { background: #fee2e2; color: #ef4444; }

/* İlerleme noktaları */
.ow-progress {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-bottom: 1.75rem;
}
.ow-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--border, #dce8d8);
    transition: background 0.3s, width 0.3s;
    flex-shrink: 0;
}
.ow-dot.ow-dot-active {
    width: 22px;
    border-radius: var(--radius);
    background: var(--color-primary, #2E7223);
}
.ow-dot.ow-dot-done { background: var(--color-primary-300, #84A67D); }

/* Adım içeriği */
.ow-step-content { text-align: center; }

/* Büyük ikon dairesi */
.ow-icon {
    width: 70px; height: 70px;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    display: flex; align-items: center; justify-content: center;
}
.ow-icon svg { width: 30px; height: 30px; }

.ow-icon-primary { background: var(--color-primary-100, #D5EECC); color: var(--color-primary, #2E7223); }
.ow-icon-green   { background: #dcfce7; color: #16a34a; }
.ow-icon-blue    { background: #dbeafe; color: #2563eb; }
.ow-icon-amber   { background: #fef3c7; color: #d97706; }
.ow-icon-purple  { background: #ede9fe; color: #7c3aed; }

.ow-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark, #1e293b);
    margin: 0 0 .5rem;
    line-height: 1.3;
}
.ow-desc {
    font-size: .9375rem;
    color: var(--text-muted, #64748b);
    line-height: 1.65;
    margin: 0 0 1.25rem;
}

/* 3'lü özellik kartları */
.ow-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    margin-bottom: .25rem;
    text-align: left;
}
.ow-feature {
    background: var(--bg-light, #f8faf7);
    border: 1px solid var(--border-light, #e8f0e5);
    border-radius: var(--radius);
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.ow-feature-icon {
    width: 30px; height: 30px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: .125rem;
}
.ow-feature-icon svg { width: 15px; height: 15px; }
.ow-feature strong { font-size: .8rem; font-weight: 600; color: var(--text-dark, #1e293b); }
.ow-feature span   { font-size: .75rem; color: var(--text-muted, #64748b); line-height: 1.4; }

/* Süreç adımları listesi */
.ow-steps-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: .25rem;
    text-align: left;
}
.ow-step-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    background: var(--bg-light, #f8faf7);
    border: 1px solid var(--border-light, #e8f0e5);
    border-radius: var(--radius);
    padding: .75rem;
}
.ow-step-num {
    min-width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--color-primary, #2E7223);
    color: #fff;
    font-size: .75rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.ow-step-text strong { display: block; font-size: .875rem; font-weight: 600; color: var(--text-dark, #1e293b); margin-bottom: 1px; }
.ow-step-text span   { font-size: .8125rem; color: var(--text-muted, #64748b); }

/* Son adım CTA butonu */
.ow-cta-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--color-primary, #2E7223);
    color: #fff;
    border-radius: var(--radius);
    padding: .75rem 1.75rem;
    font-size: .9375rem; font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    margin-top: .25rem;
}
.ow-cta-btn:hover { background: var(--color-primary-700, #255D1C); color: #fff; }

/* Alt navigasyon */
.ow-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: .75rem;
}
.ow-nav-right { display: flex; gap: .5rem; align-items: center; }

.ow-skip {
    background: none; border: none;
    color: var(--text-muted, #64748b);
    font-size: .875rem; cursor: pointer;
    padding: .375rem .5rem;
    border-radius: var(--radius);
    transition: color 0.15s;
    line-height: 1;
}
.ow-skip:hover { color: var(--text-dark, #1e293b); }

.ow-btn {
    display: inline-flex; align-items: center; gap: .375rem;
    border-radius: var(--radius);
    padding: .5625rem 1.25rem;
    font-size: .9375rem; font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    border: 1.5px solid transparent;
    white-space: nowrap;
    line-height: 1;
}
.ow-btn-primary {
    background: var(--color-primary, #2E7223);
    color: #fff;
    border-color: var(--color-primary, #2E7223);
}
.ow-btn-primary:hover {
    background: var(--color-primary-700, #255D1C);
    border-color: var(--color-primary-700, #255D1C);
}
.ow-btn-ghost {
    background: transparent;
    color: var(--text-muted, #64748b);
    border-color: var(--border, #dce8d8);
}
.ow-btn-ghost:hover { background: var(--bg-light, #f8faf7); color: var(--text-dark, #1e293b); }

/* ¦¦ B: Spotlight ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ */

/* Şeffaf tıklama engelleyici */
.ow-spotlight-bd {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    cursor: default;
}
.ow-spotlight-bd.ow-active { display: block; }

/* Vurgulama çerçevesi — box-shadow ile karartma efekti */
.ow-spotlight-frame {
    position: fixed;
    border-radius: var(--radius);
    z-index: 10002;
    pointer-events: none;
    transition: left 0.32s cubic-bezier(0.4,0,0.2,1),
                top  0.32s cubic-bezier(0.4,0,0.2,1),
                width  0.32s cubic-bezier(0.4,0,0.2,1),
                height 0.32s cubic-bezier(0.4,0,0.2,1);
}

/* Callout tooltip */
.ow-callout {
    position: fixed;
    z-index: 10003;
    background: var(--bg-white, #fff);
    border-radius: var(--radius);
    padding: 1.125rem 1.375rem .875rem;
    max-width: 296px;
    min-width: 210px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.06);
    animation: owCalloutIn 0.22s ease;
}

@keyframes owCalloutIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

/* Ok işareti */
.ow-callout::after {
    content: '';
    position: absolute;
    width: 12px; height: 12px;
    background: var(--bg-white, #fff);
    transform: rotate(45deg);
}
.ow-callout.ow-callout-left::after   { left: -6px;   top: 20px;  box-shadow: -2px  2px 4px rgba(0,0,0,0.05); }
.ow-callout.ow-callout-right::after  { right: -6px;  top: 20px;  box-shadow:  2px -2px 4px rgba(0,0,0,0.05); }
.ow-callout.ow-callout-top::after    { top: -6px;    left: 20px; box-shadow: -2px -2px 4px rgba(0,0,0,0.05); }
.ow-callout.ow-callout-bottom::after { bottom: -6px; left: 20px; box-shadow:  2px  2px 4px rgba(0,0,0,0.05); }

.ow-callout-title {
    font-size: .9375rem;
    font-weight: 700;
    color: var(--text-dark, #1e293b);
    margin: 0 0 .3125rem;
}
.ow-callout-desc {
    font-size: .8125rem;
    color: var(--text-muted, #64748b);
    line-height: 1.55;
    margin: 0 0 .875rem;
}
.ow-callout-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ow-callout-counter {
    font-size: .75rem;
    color: var(--text-muted, #64748b);
    font-variant-numeric: tabular-nums;
}

/* Mobil uyumluluğu */
@media (max-width: 600px) {
    .ow-modal  { padding: 1.5rem 1.25rem 1.25rem; border-radius: var(--radius); }
    .ow-title  { font-size: 1.15rem; }
    .ow-icon   { width: 58px; height: 58px; }
    .ow-icon svg { width: 24px; height: 24px; }
    .ow-features { grid-template-columns: 1fr; }
    .ow-callout  { max-width: 86vw; min-width: 190px; padding: .9rem 1.1rem .75rem; }
    .ow-callout::after { display: none; }
}
/* ========================================================== */

/* Bildirim dropdown — desktop'ta 400px, mobilde icerik/viewport genisligi */
#bildirimDropdown {
    width: calc(100vw - 1rem);
}
@media (min-width: 640px) {
    #bildirimDropdown {
        width: 400px;
    }
}

/* === TOP BAR ACTION BUTTONS === */
.top-bar-action {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
    margin-right: 4px;
    text-decoration: none;
}
.top-bar-action-icon {
    justify-content: center;
    width: 32px;
    height: 32px;
    position: relative;
}
.top-bar-action-search {
    gap: 6px;
    padding: 5px 12px;
    font-size: .78rem;
    font-weight: 500;
}
.top-bar-kbd {
    font-size: .65rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 5px;
    color: #94a3b8;
    font-weight: 600;
}
.top-bar-notification-badge {
    display: none;
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #ef4444;
    border-radius: 9999px;
    line-height: 16px;
    text-align: center;
}
.top-bar-notification-dropdown {
    display: none;
    background: #fff;
    box-shadow: 0 12px 48px rgba(0,0,0,.14);
    border: 1px solid #e2e8f0;
}
.top-bar-notification-header {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.top-bar-notification-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}
.top-bar-notification-count {
    display: none;
    font-size: 11px;
    font-weight: 600;
    color: #4f46e5;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 9999px;
}
.top-bar-notification-list {
    max-height: 420px;
    overflow-y: auto;
}
