/* =====================================================================
   UFUK LOJİSTİK - KURUMSAL TASARIM SİSTEMİ & ARAYÜZ STİLLERİ
   ===================================================================== */

:root,
[data-theme="dark-navy"] {
    --theme-name: "dark-navy";
    --bg-main: #0b1120;
    --bg-secondary: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #24344d;
    --bg-header: rgba(15, 23, 42, 0.85);
    --bg-sidebar: rgba(15, 23, 42, 0.96);
    --bg-sidebar-footer: rgba(11, 17, 32, 0.6);
    --bg-panel-header: rgba(15, 23, 42, 0.45);
    --border-color: rgba(148, 163, 184, 0.14);
    --border-color-hover: rgba(59, 130, 246, 0.45);

    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-glow: rgba(37, 99, 235, 0.25);
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.25);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --info: #0ea5e9;
    --info-bg: rgba(14, 165, 233, 0.15);

    --sidebar-width: 270px;
    --header-height: 72px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.2);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --input-bg: rgba(15, 23, 42, 0.65);
    --table-header-bg: rgba(15, 23, 42, 0.55);
    --table-hover: rgba(255, 255, 255, 0.035);
    --placeholder-bg: rgba(15, 23, 42, 0.25);
    --pill-bg: rgba(30, 41, 59, 0.9);
    --subtab-bg: rgba(15, 23, 42, 0.75);
    --bg-gradient: radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.12) 0px, transparent 50%),
                   radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);

    /* Yüksek Kontrast Metin & Tablo Değişkenleri (Karanlık Mod) */
    --cell-title: #f8fafc;
    --logo-text: #93c5fd;
    --logo-badge-bg: rgba(59, 130, 246, 0.2);
    --logo-badge-text: #60a5fa;
    --hizli-badge-bg: rgba(245, 158, 11, 0.2);
    --hizli-badge-text: #f59e0b;
    --logo-net-color: #60a5fa;
    --code-color: #06b6d4;
    --modal-header-bg: rgba(15, 23, 42, 0.85);
    --modal-card-bg: #1e293b;
    --table-subrow-bg: rgba(168, 85, 247, 0.08);
}

/* 2. KURUMSAL FİNANS (TEMİZ AÇIK MOD / OFFICE DAYLIGHT) */
[data-theme="light-corporate"] {
    --theme-name: "light-corporate";
    --bg-main: #f1f5f9;
    --bg-secondary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-header: rgba(255, 255, 255, 0.95);
    --bg-sidebar: #0f172a;
    --bg-sidebar-footer: rgba(0, 0, 0, 0.25);
    --bg-panel-header: #f8fafc;
    --border-color: #cbd5e1;
    --border-color-hover: #3b82f6;

    --primary: #1d4ed8;
    --primary-light: #2563eb;
    --primary-glow: rgba(29, 78, 216, 0.2);
    --accent: #0284c7;
    --accent-glow: rgba(2, 132, 199, 0.2);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.12);
    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.12);
    --danger: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.12);
    --info: #0284c7;
    --info-bg: rgba(2, 132, 199, 0.12);

    --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(29, 78, 216, 0.15);

    --input-bg: #ffffff;
    --table-header-bg: #f1f5f9;
    --table-hover: #f8fafc;
    --placeholder-bg: #f8fafc;
    --pill-bg: #ffffff;
    --subtab-bg: #e2e8f0;
    --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);

    /* Yüksek Kontrast Metin & Tablo Değişkenleri (Açık Mod - Ters Zıt Renkler) */
    --cell-title: #0f172a;
    --logo-text: #1d4ed8;
    --logo-badge-bg: #dbeafe;
    --logo-badge-text: #1e40af;
    --hizli-badge-bg: #fef3c7;
    --hizli-badge-text: #b45309;
    --logo-net-color: #1e40af;
    --code-color: #0369a1;
    --modal-header-bg: #f8fafc;
    --modal-card-bg: #ffffff;
    --table-subrow-bg: rgba(168, 85, 247, 0.08);
}

/* 3. ERP KLASİK LACİVERT (SAP & ORACLE AESTHETIC) */
[data-theme="classic-navy"] {
    --theme-name: "classic-navy";
    --bg-main: #eef2f6;
    --bg-secondary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-card-hover: #f8faff;
    --bg-header: #0a192f;
    --bg-sidebar: #0a192f;
    --bg-sidebar-footer: rgba(0, 0, 0, 0.3);
    --bg-panel-header: #f8fafc;
    --border-color: #d1d5db;
    --border-color-hover: #1e40af;

    --primary: #1e40af;
    --primary-light: #2563eb;
    --primary-glow: rgba(30, 64, 175, 0.25);
    --accent: #0284c7;
    --accent-glow: rgba(2, 132, 199, 0.2);

    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;

    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.12);
    --warning: #b45309;
    --warning-bg: rgba(180, 83, 9, 0.12);
    --danger: #b91c1c;
    --danger-bg: rgba(185, 28, 28, 0.12);
    --info: #0369a1;
    --info-bg: rgba(3, 105, 161, 0.12);

    --shadow-soft: 0 4px 12px rgba(10, 25, 47, 0.08);
    --shadow-glow: 0 0 20px rgba(30, 64, 175, 0.15);

    --input-bg: #ffffff;
    --table-header-bg: #e2e8f0;
    --table-hover: #eff6ff;
    --placeholder-bg: #f9fafb;
    --pill-bg: #ffffff;
    --subtab-bg: #e2e8f0;
    --bg-gradient: linear-gradient(180deg, #f0f4f8 0%, #e2e8f0 100%);

    /* Yüksek Kontrast Metin & Tablo Değişkenleri (Klasik Açık) */
    --cell-title: #111827;
    --logo-text: #1e40af;
    --logo-badge-bg: #dbeafe;
    --logo-badge-text: #1e40af;
    --hizli-badge-bg: #fef3c7;
    --hizli-badge-text: #b45309;
    --logo-net-color: #1e40af;
    --code-color: #0369a1;
    --modal-header-bg: #e2e8f0;
    --modal-card-bg: #ffffff;
    --table-subrow-bg: rgba(168, 85, 247, 0.08);
}

/* 4. YÜKSEK KONTRASTLI OKUMA (DENETİM & GÖZ DOSTU NETLİK) */
[data-theme="high-contrast"] {
    --theme-name: "high-contrast";
    --bg-main: #000000;
    --bg-secondary: #0d1117;
    --bg-card: #11141a;
    --bg-card-hover: #1a202c;
    --bg-header: #07090c;
    --bg-sidebar: #050608;
    --bg-sidebar-footer: #000000;
    --bg-panel-header: #0f141c;
    --border-color: #384252;
    --border-color-hover: #60a5fa;

    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-glow: rgba(96, 165, 250, 0.4);
    --accent: #22d3ee;
    --accent-glow: rgba(34, 211, 238, 0.4);

    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.22);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.22);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.22);
    --info: #38bdf8;
    --info-bg: rgba(56, 189, 248, 0.22);

    --shadow-soft: 0 0 0 1px #384252, 0 10px 30px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 20px rgba(96, 165, 250, 0.35);

    --input-bg: #0d1117;
    --table-header-bg: #161b22;
    --table-hover: rgba(255, 255, 255, 0.08);
    --placeholder-bg: #0d1117;
    --pill-bg: #161b22;
    --subtab-bg: #0d1117;
    --bg-gradient: none;

    /* Yüksek Kontrast Metin & Tablo Değişkenleri (Denetim Modu) */
    --cell-title: #ffffff;
    --logo-text: #93c5fd;
    --logo-badge-bg: #1e3a8a;
    --logo-badge-text: #bfdbfe;
    --hizli-badge-bg: #78350f;
    --hizli-badge-text: #fde68a;
    --logo-net-color: #93c5fd;
    --code-color: #67e8f9;
    --modal-header-bg: #07090c;
    --modal-card-bg: #11141a;
    --table-subrow-bg: rgba(168, 85, 247, 0.16);
}

/* 5. ZÜMRÜT FİNANS (TERMINAL & FINTECH YEŞİLİ) */
[data-theme="emerald-finance"] {
    --theme-name: "emerald-finance";
    --bg-main: #04140f;
    --bg-secondary: #08221a;
    --bg-card: #0c2e23;
    --bg-card-hover: #123d2f;
    --bg-header: rgba(8, 34, 26, 0.88);
    --bg-sidebar: rgba(6, 26, 20, 0.96);
    --bg-sidebar-footer: rgba(3, 15, 11, 0.7);
    --bg-panel-header: rgba(12, 46, 35, 0.6);
    --border-color: rgba(52, 211, 153, 0.18);
    --border-color-hover: rgba(52, 211, 153, 0.5);

    --primary: #059669;
    --primary-light: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.3);
    --accent: #2dd4bf;
    --accent-glow: rgba(45, 212, 191, 0.25);

    --text-primary: #ecfdf5;
    --text-secondary: #a7f3d0;
    --text-muted: #6ee7b7;

    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.2);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.2);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.2);
    --info: #38bdf8;
    --info-bg: rgba(56, 189, 248, 0.2);

    --shadow-soft: 0 10px 25px -5px rgba(4, 20, 15, 0.6);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.25);

    --input-bg: rgba(8, 34, 26, 0.75);
    --table-header-bg: rgba(8, 34, 26, 0.7);
    --table-hover: rgba(52, 211, 153, 0.05);
    --placeholder-bg: rgba(12, 46, 35, 0.3);
    --pill-bg: #0c2e23;
    --subtab-bg: #08221a;
    --bg-gradient: radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.12) 0px, transparent 50%),
                   radial-gradient(at 100% 100%, rgba(45, 212, 191, 0.08) 0px, transparent 50%);

    /* Yüksek Kontrast Metin & Tablo Değişkenleri (Zümrüt Yeşil) */
    --cell-title: #ecfdf5;
    --logo-text: #6ee7b7;
    --logo-badge-bg: rgba(16, 185, 129, 0.25);
    --logo-badge-text: #34d399;
    --hizli-badge-bg: rgba(245, 158, 11, 0.25);
    --hizli-badge-text: #fbbf24;
    --logo-net-color: #34d399;
    --code-color: #2dd4bf;
    --modal-header-bg: rgba(8, 34, 26, 0.9);
    --modal-card-bg: #0c2e23;
    --table-subrow-bg: rgba(168, 85, 247, 0.12);
}

/* 6. KÖMÜR & TİTANYUM (GÖZ DİNLENDİREN SICAK KOYU) */
[data-theme="charcoal-warm"] {
    --theme-name: "charcoal-warm";
    --bg-main: #141416;
    --bg-secondary: #1a1a1e;
    --bg-card: #222228;
    --bg-card-hover: #2b2b33;
    --bg-header: rgba(26, 26, 30, 0.88);
    --bg-sidebar: rgba(20, 20, 22, 0.97);
    --bg-sidebar-footer: rgba(12, 12, 14, 0.7);
    --bg-panel-header: rgba(34, 34, 40, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-hover: rgba(245, 158, 11, 0.45);

    --primary: #f59e0b;
    --primary-light: #fbbf24;
    --primary-glow: rgba(245, 158, 11, 0.25);
    --accent: #fb923c;
    --accent-glow: rgba(251, 146, 60, 0.25);

    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.16);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.16);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.16);
    --info: #38bdf8;
    --info-bg: rgba(56, 189, 248, 0.16);

    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.2);

    --input-bg: rgba(26, 26, 30, 0.8);
    --table-header-bg: rgba(26, 26, 30, 0.7);
    --table-hover: rgba(255, 255, 255, 0.035);
    --placeholder-bg: rgba(34, 34, 40, 0.35);
    --pill-bg: #222228;
    --subtab-bg: #1a1a1e;
    --bg-gradient: radial-gradient(at 0% 0%, rgba(245, 158, 11, 0.06) 0px, transparent 50%),
                   radial-gradient(at 100% 100%, rgba(251, 146, 60, 0.04) 0px, transparent 50%);

    /* Yüksek Kontrast Metin & Tablo Değişkenleri (Kömür Grisi) */
    --cell-title: #f4f4f5;
    --logo-text: #93c5fd;
    --logo-badge-bg: rgba(59, 130, 246, 0.2);
    --logo-badge-text: #60a5fa;
    --hizli-badge-bg: rgba(245, 158, 11, 0.2);
    --hizli-badge-text: #fbbf24;
    --logo-net-color: #60a5fa;
    --code-color: #38bdf8;
    --modal-header-bg: rgba(26, 26, 30, 0.9);
    --modal-card-bg: #222228;
    --table-subrow-bg: rgba(168, 85, 247, 0.09);
}

/* 7. NORDİK AÇIK (MİNİMAL GRİ & MAVİ) */
[data-theme="nordic-slate"] {
    --theme-name: "nordic-slate";
    --bg-main: #e8ecf2;
    --bg-secondary: #dde3eb;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f7fa;
    --bg-header: rgba(255, 255, 255, 0.95);
    --bg-sidebar: #1e293b;
    --bg-sidebar-footer: rgba(0, 0, 0, 0.25);
    --bg-panel-header: #f1f5f9;
    --border-color: #cbd5e1;
    --border-color-hover: #2563eb;

    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-glow: rgba(37, 99, 235, 0.2);
    --accent: #0891b2;
    --accent-glow: rgba(8, 145, 178, 0.2);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info: #0284c7;
    --info-bg: rgba(2, 132, 199, 0.12);

    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);

    --input-bg: #ffffff;
    --table-header-bg: #e2e8f0;
    --table-hover: #f1f5f9;
    --placeholder-bg: #f8fafc;
    --pill-bg: #ffffff;
    --subtab-bg: #dde3eb;
    --bg-gradient: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);

    /* Yüksek Kontrast Metin & Tablo Değişkenleri (Nordik Açık) */
    --cell-title: #0f172a;
    --logo-text: #1d4ed8;
    --logo-badge-bg: #dbeafe;
    --logo-badge-text: #1e40af;
    --hizli-badge-bg: #fef3c7;
    --hizli-badge-text: #b45309;
    --logo-net-color: #1e40af;
    --code-color: #0369a1;
    --modal-header-bg: #f1f5f9;
    --modal-card-bg: #ffffff;
    --table-subrow-bg: rgba(168, 85, 247, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* =====================================================================
   DASHBOARD LAYOUT (SIDEBAR + MAIN)
   ===================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.brand-section {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.brand-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sidebar-pin-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: var(--transition);
    transform: rotate(-45deg);
}

.sidebar-pin-btn:hover {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.2);
    border-color: var(--primary-light);
}

.sidebar-toggle-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: var(--transition);
}

.sidebar-toggle-btn:hover {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.2);
    border-color: var(--primary-light);
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.brand-info h1 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
    line-height: 1.2;
}

.brand-info span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 600;
}

.nav-section {
    flex: 1;
    padding: 20px 14px;
    overflow-y: auto;
}

.nav-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 0 12px 10px 12px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-item a i {
    font-size: 17px;
    width: 22px;
    text-align: center;
    transition: var(--transition);
}

.nav-item:hover a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active a {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.3) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-left: 3px solid var(--primary-light);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.15);
}

.nav-item.active a i {
    color: var(--primary-light);
}

.nav-badge {
    margin-left: auto;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 18px;
    border-top: 1px solid var(--border-color);
    background: rgba(11, 17, 32, 0.5);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #475569 0%, #1e293b 100%);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
}

.user-details h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-details p {
    font-size: 11px;
    color: var(--text-muted);
}

/* --- MAIN CONTENT WRAPPER --- */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================================
   SIDEBAR MODLARI: 1) OTOMATİK KAPANMA (VARSAYILAN)  2) SABİT MOD
   ===================================================================== */

/* 1. OTOMATİK KAPANMA MODU (Unpinned - Normalde 76px, üzerine fare gelince açılır) */
:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar {
    width: 76px;
    overflow-x: hidden;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.35);
}

:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .main-wrapper {
    margin-left: 76px;
}

:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:hover {
    width: var(--sidebar-width);
    box-shadow: 12px 0 35px rgba(0, 0, 0, 0.75);
    z-index: 1000;
}

:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar .brand-info,
:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar .brand-section .sidebar-pin-btn,
:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar .nav-label,
:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar .nav-item a span,
:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar .nav-item a .nav-badge,
:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar .user-details {
    opacity: 0;
    visibility: hidden;
    white-space: nowrap;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:hover .brand-info,
:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:hover .brand-section .sidebar-pin-btn,
:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:hover .nav-label,
:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:hover .nav-item a span,
:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:hover .nav-item a .nav-badge,
:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:hover .user-details {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.08s;
}

:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:not(:hover) .brand-section {
    padding: 20px 16px;
    justify-content: center;
}

:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:not(:hover) .brand-icon {
    margin: 0 auto;
}

:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-section {
    padding: 16px 10px;
}

:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-item a {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
}

:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-item a i {
    font-size: 19px;
    margin: 0;
}

:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:not(:hover) .sidebar-footer {
    padding: 16px 10px;
}

:root:not(.sidebar-pinned) body:not(.sidebar-pinned) .sidebar:not(:hover) .user-card {
    justify-content: center;
}

/* 2. SABİT MOD (Pinned - 270px Sürekli Açık) */
body.sidebar-pinned .sidebar,
:root.sidebar-pinned .sidebar {
    width: var(--sidebar-width);
}

body.sidebar-pinned .main-wrapper,
:root.sidebar-pinned .main-wrapper {
    margin-left: var(--sidebar-width);
}

body.sidebar-pinned .sidebar-pin-btn,
:root.sidebar-pinned .sidebar-pin-btn {
    transform: rotate(0deg);
    color: var(--primary-light);
    background: rgba(37, 99, 235, 0.25);
    border-color: var(--primary-light);
    box-shadow: 0 0 10px var(--primary-glow);
}

body.sidebar-pinned .sidebar-toggle-btn,
:root.sidebar-pinned .sidebar-toggle-btn {
    color: var(--primary-light);
    border-color: var(--primary-light);
    background: rgba(37, 99, 235, 0.15);
}

/* --- TOP HEADER --- */
.top-header {
    height: var(--header-height);
    background: var(--bg-header);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

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

.page-title-badge {
    display: flex;
    flex-direction: column;
}

.page-title-badge h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-title-badge span {
    font-size: 12px;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* =====================================================================
   KURUMSAL TEMA / OKUNAKLI MOD SEÇİCİ (SAĞ ÜST ÇOKTAN SEÇMELİ)
   ===================================================================== */
.theme-picker-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--pill-bg, var(--bg-card));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px 10px 4px 10px;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.theme-picker-box:hover,
.theme-picker-box:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 14px var(--primary-glow);
}

.theme-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary-light);
    box-shadow: 0 0 8px var(--primary-light);
    flex-shrink: 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-picker-icon {
    font-size: 13px;
    color: var(--primary-light);
    flex-shrink: 0;
}

.theme-dropdown-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding-right: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 11px;
    font-family: inherit;
    line-height: 1.4;
}

.theme-dropdown-select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 12.5px;
    font-weight: 500;
    padding: 6px 10px;
}

/* Classic Navy & Light Theme specific header adjustments */
[data-theme="classic-navy"] .top-header .page-title-badge h2 {
    color: #ffffff;
}
[data-theme="classic-navy"] .top-header .date-pill {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.15);
}
[data-theme="classic-navy"] .top-header .status-pill {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Live Status Badge */
.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--pill-bg, rgba(30, 41, 59, 0.9));
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.status-pill:hover {
    border-color: var(--primary-light);
    color: var(--text-primary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
    position: relative;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-dot.pulse::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid currentColor;
    animation: pulseAnim 2s infinite;
}

@keyframes pulseAnim {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.4); opacity: 0; }
}

.date-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
    background: var(--pill-bg, rgba(255, 255, 255, 0.03));
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* --- PAGE CONTENT CONTAINER --- */
.content-body {
    padding: 28px;
    flex: 1;
}

/* =====================================================================
   CARDS & GRIDS
   ===================================================================== */
.grid-cards-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.grid-cards-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

@media (max-width: 1024px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-info h5 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 6px;
}

.stat-sub {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-sub.positive {
    color: var(--success);
}

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

.stat-icon.blue { background: rgba(37, 99, 235, 0.15); color: var(--primary-light); }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.amber { background: var(--warning-bg); color: var(--warning); }
.stat-icon.purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

/* Standard Content Card */
.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    margin-bottom: 24px;
}

.panel-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-panel-header);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.panel-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-title span {
    font-size: 12px;
    color: var(--text-muted);
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-body {
    padding: 24px;
}

/* =====================================================================
   TABS & SUB-NAVIGATION
   ===================================================================== */
.module-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.module-tab-btn {
    padding: 10px 18px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.module-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

.module-tab-btn.active {
    color: var(--primary-light);
    border-bottom: 2px solid var(--primary-light);
    background: rgba(37, 99, 235, 0.08);
}

/* Sub-Tab Segmented Control (Faturalar: Alış / Satış) */
.sub-tab-segmented {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.75);
    padding: 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 22px;
    gap: 8px;
}

.sub-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.sub-pill-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.sub-pill-btn.active {
    color: #ffffff;
    background: var(--bg-card);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-hover);
}

.sub-pill-btn.active.alis-active {
    border-color: rgba(245, 158, 11, 0.5);
}

.sub-pill-btn.active.satis-active {
    border-color: rgba(16, 185, 129, 0.5);
}

/* =====================================================================
   BUTTONS & CONTROLS
   ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: #ffffff;
}

.btn-success:hover {
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    color: #ffffff;
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* =====================================================================
   FORMS & INPUTS
   ===================================================================== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-label span.req {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-help {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 5px;
}

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

/* =====================================================================
   DATA TABLES
   ===================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

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

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

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--table-hover);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 600;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-secondary { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

/* =====================================================================
   PLACEHOLDER & READY-TO-EXPAND CARDS (İçerikler İçin)
   ===================================================================== */
.placeholder-box {
    border: 2px dashed rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    background: var(--placeholder-bg);
    transition: var(--transition);
    margin: 16px 0;
}

.placeholder-box:hover {
    border-color: var(--border-color-hover);
    background: rgba(30, 41, 59, 0.35);
}

.placeholder-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 18px auto;
}

.placeholder-box h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.placeholder-box p {
    font-size: 13.5px;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 18px auto;
}

.quick-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px;
}

/* =====================================================================
   NOTIFICATIONS / TOASTS
   ===================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-primary);
    font-size: 13px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-info { border-left: 4px solid var(--info); }

/* =====================================================================
   KULLANICI & YETKİLENDİRME PANELİ STİLLERİ
   ===================================================================== */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    inset: 0;
    background-color: rgba(148, 163, 184, 0.3);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.switch-toggle input:checked + .switch-slider {
    background-color: #f59e0b;
}

.switch-toggle input:checked + .switch-slider:before {
    transform: translateX(20px);
}

.perm-card {
    transition: all 0.2s ease;
    user-select: none;
}

.perm-card:hover {
    border-color: var(--primary) !important;
    background: rgba(37, 99, 235, 0.05) !important;
    transform: translateY(-1px);
}

.perm-card:has(input:checked) {
    border-color: var(--primary-light) !important;
    background: rgba(37, 99, 235, 0.1) !important;
}

.user-logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.08);
}

