:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #ec4899;
    --sidebar-width: 250px;
    --navbar-height: 56px;
}

/* ===== Renk Temaları — header / modal / butonlar ===== */
[data-color-theme="siyah-beyaz"] {
    --primary: #1f2937;
    --primary-dark: #0f172a;
    --accent: #475569;
}
[data-color-theme="kirmizi"] {
    --primary: #dc2626;
    --primary-dark: #991b1b;
    --accent: #f87171;
}
[data-color-theme="sari"] {
    --primary: #b45309;
    --primary-dark: #92400e;
    --accent: #f59e0b;
}
[data-color-theme="pembe"] {
    --primary: #db2777;
    --primary-dark: #be185d;
    --accent: #f472b6;
}
[data-color-theme="mavi"] {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #38bdf8;
}
[data-color-theme="yesil"] {
    --primary: #15803d;
    --primary-dark: #166534;
    --accent: #4ade80;
}
[data-color-theme="turuncu"] {
    --primary: #ea580c;
    --primary-dark: #c2410c;
    --accent: #fb923c;
}
[data-color-theme="mor"] {
    --primary: #7c3aed;
    --primary-dark: #5b21b6;
    --accent: #a78bfa;
}

/* 2030 paketi ek temaları — base --primary de tanımlı olsun ki renk TÜM app'e yansısın
   (yalnız gx2030 yüzeyleri değil; butonlar/linkler/odak halkaları da değişir). */
[data-color-theme="buzmavisi"] { --primary: #2563eb; --primary-dark: #1d4ed8; --accent: #60a5fa; } /* buz mavisi */
[data-color-theme="nane"]      { --primary: #047857; --primary-dark: #065f46; --accent: #34d399; } /* nane */
[data-color-theme="seftali"]   { --primary: #c2410c; --primary-dark: #9a3412; --accent: #fb923c; } /* şeftali */
[data-color-theme="okyanus"]   { --primary: #0e7490; --primary-dark: #155e75; --accent: #22d3ee; } /* okyanus */
[data-color-theme="orman"]     { --primary: #15803d; --primary-dark: #166534; --accent: #4ade80; } /* orman */
[data-color-theme="menekse"]   { --primary: #7c3aed; --primary-dark: #6d28d9; --accent: #a78bfa; } /* menekşe */
[data-color-theme="gul"]       { --primary: #be185d; --primary-dark: #9d174d; --accent: #f472b6; } /* gül */
[data-color-theme="kehribar"]  { --primary: #b45309; --primary-dark: #92400e; --accent: #fbbf24; } /* kehribar */
[data-color-theme="celik"]     { --primary: #475569; --primary-dark: #334155; --accent: #94a3b8; } /* çelik */

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f1f5f9;
    min-height: 100vh;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    min-height: 100vh;
}

.brand-icon {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}

/* Navbar — kompakt, mobil-uyumlu */
.main-navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    box-shadow: 0 2px 12px rgba(99,102,241,0.3);
    z-index: 1030;
    padding: 0.5rem 0.75rem;
    min-height: var(--navbar-height);
}

.main-navbar .navbar-brand {
    font-size: 1.05rem;
    font-weight: 800;
    padding: 0;
    line-height: 1.1;
    margin-right: auto;
}
.main-navbar .navbar-brand img {
    height: 28px !important;
    width: auto;
}

/* Firma adı üst bantı */
.firm-top-bar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent) 100%);
    text-align: center;
    padding: 3px 12px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.88);
    line-height: 1.35;
    /* Uzun işletme ismi KIRPILMASIN — tamamı görünsün (gerekirse alt satıra sarar) */
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Mobilde navbar — kompakt, modern, glassmorphism */
@media (max-width: 768px) {
    :root { --navbar-height: 44px; }
    .main-navbar {
        padding: 0.2rem 0.5rem;
        min-height: 44px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--accent) 100%);
        backdrop-filter: blur(10px) saturate(160%);
        -webkit-backdrop-filter: blur(10px) saturate(160%);
        box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 4px 16px rgba(0,0,0,.18);
    }
    .main-navbar .container-fluid {
        padding-left: 4px;
        padding-right: 4px;
    }
    .main-navbar #sidebarToggle {
        padding: 2px 5px !important;
        margin-right: 2px !important;
        border-radius: 7px;
        transition: background .15s;
        line-height: 1;
    }
    .main-navbar #sidebarToggle:active,
    .main-navbar #sidebarToggle:focus {
        background: rgba(255,255,255,.15);
    }
    .main-navbar #sidebarToggle i {
        font-size: 1.15rem !important;
    }
    /* Brand: yazıyı gizle, sadece logo göster */
    .main-navbar .navbar-brand {
        font-size: 0;
        max-width: none;
        margin-right: auto;
        padding: 0;
        line-height: 1;
    }
    .main-navbar .navbar-brand img {
        height: 24px !important;
        width: 24px !important;
        margin-right: 0 !important;
        filter: drop-shadow(0 1px 2px rgba(0,0,0,.15));
    }
    /* Sağ taraf: sıkı boşluklar */
    .main-navbar .ms-auto {
        gap: 3px !important;
    }
    /* Profil dropdown — kullanıcı adını gizle, sadece icon */
    .main-navbar .nav-link.dropdown-toggle {
        font-size: 0;
        max-width: none;
        padding: 3px 7px !important;
        background: rgba(255,255,255,.12);
        border-radius: 7px;
        backdrop-filter: blur(4px);
        line-height: 1;
    }
    .main-navbar .nav-link.dropdown-toggle i {
        font-size: 1.1rem !important;
        margin: 0 !important;
        color: #fff;
    }
    .main-navbar .nav-link.dropdown-toggle::after {
        display: none;
    }
    /* Tema butonu */
    .theme-toggle {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.85rem !important;
        border-radius: 7px !important;
        background: rgba(255,255,255,.12) !important;
        backdrop-filter: blur(4px);
    }
    /* TR/EN switch — kompakt pill */
    #langSwitchNav {
        padding: 1px !important;
        border-radius: 7px !important;
        background: rgba(255,255,255,.12) !important;
        border: 1px solid rgba(255,255,255,.18) !important;
        margin-right: 0 !important;
    }
    #langSwitchNav a,
    #langSwitchNav button {
        padding: 2px 6px !important;
        font-size: 10px !important;
        border-radius: 5px !important;
        line-height: 1.3 !important;
    }
    /* Hızlı Ödeme yeşil buton — kompakt, navbar içinde uyumlu */
    #quickPayFab {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.85rem !important;
        border-radius: 7px !important;
        box-shadow: 0 2px 8px rgba(16,185,129,.45) !important;
    }
    /* Dropdown menü daha modern */
    .main-navbar .dropdown-menu {
        border: 0;
        box-shadow: 0 8px 24px rgba(0,0,0,.15);
        border-radius: 12px;
        margin-top: 6px !important;
        padding: 6px;
    }
    .main-navbar .dropdown-menu .dropdown-item {
        border-radius: 8px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    /* Firma adı üst bantı — incelt */
    .firm-top-bar {
        padding: 1px 10px;
        font-size: 0.6rem;
        letter-spacing: 0.6px;
        line-height: 1.3;
    }
}

/* Çok küçük ekranlar (576px altı) — daha da sıkı */
@media (max-width: 575.98px) {
    .main-navbar .navbar-brand img {
        height: 22px !important;
        width: 22px !important;
    }
    .main-navbar .ms-auto {
        gap: 2px !important;
    }
    .firm-top-bar {
        font-size: 0.58rem;
        letter-spacing: 0.4px;
        padding: 1px 6px;
    }
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - var(--navbar-height) - 22px);
    background: #fff;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.sidebar .nav-link {
    color: #64748b;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    color: var(--primary);
    background: #f1f5f9;
    border-left-color: var(--primary);
}

.sidebar .nav-link.active {
    color: var(--primary);
    background: rgba(99,102,241,0.08);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - var(--navbar-height) - 22px);
    overflow-x: hidden;
}

/* 📱 iOS: sayfayı aşağı çekince tüm ekranın aşağı kayması (lastik/bounce) kapatıldı.
   Android'de içerik oynamıyordu, iOS'ta header+takvim komple iniyordu. Yenileme jesti
   yerine takvimde kendi "aşağı çek → yenile" göstergemiz var (içerik yerinde kalır). */
html, body {
    overscroll-behavior-y: none;
}

/* ===== Masaüstü: sol menü ve sağ içerik BAĞIMSIZ kaydırılır =====
   Mouse sol menünün üzerindeyken sadece menü, sağ taraftayken sadece içerik
   iner/çıkar. Üst bar + navbar her zaman sabit kalır.
   :has() ile yalnız sidebar'lı sayfa düzenine uygulanır (login/register vb. etkilenmez);
   desteklemeyen tarayıcıda kurallar atlanır ve eski (tek sayfa scroll) davranış sürer. */
@media (min-width: 992px) {
    html:has(body > .d-flex > .sidebar) { height: 100%; }

    body:has(> .d-flex > .sidebar) {
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* sidebar + main-content sarmalı: navbar altında kalan tüm yüksekliği kaplar */
    body:has(> .d-flex > .sidebar) > .d-flex {
        flex: 1 1 auto;
        min-height: 0;
    }

    body:has(> .d-flex > .sidebar) > .d-flex > .sidebar,
    body:has(> .d-flex > .sidebar) > .d-flex > .main-content {
        height: 100%;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;   /* kendi sonuna gelince diğer tarafı sürüklemez */
    }

    /* Kaydırma şeridi — ok düğmesi YOK, doğrudan dar şerit (saydam kenar hilesi
       çok dar şeritlerde tarayıcıca yok sayılabiliyordu; genişlik artık birebir).
       Sol menü: 3px kıl çizgi · Sağ içerik: 6px (uzun listede tutması kolay olsun). */
    body:has(> .d-flex > .sidebar) > .d-flex > .sidebar,
    body:has(> .d-flex > .sidebar) > .d-flex > .main-content {
        scrollbar-width: thin;                              /* Firefox: ok tuşsuz ince şerit */
        scrollbar-color: rgba(100,116,139,.35) transparent;
    }
    body:has(> .d-flex > .sidebar) > .d-flex > .sidebar::-webkit-scrollbar {
        width: 3px;
    }
    body:has(> .d-flex > .sidebar) > .d-flex > .main-content::-webkit-scrollbar {
        width: 6px;
    }
    /* Chrome/Edge'in ok (yukarı/aşağı) düğmeleri tamamen kalksın */
    body:has(> .d-flex > .sidebar) > .d-flex > .sidebar::-webkit-scrollbar-button,
    body:has(> .d-flex > .sidebar) > .d-flex > .main-content::-webkit-scrollbar-button {
        display: none;
        width: 0;
        height: 0;
    }
    body:has(> .d-flex > .sidebar) > .d-flex > .sidebar::-webkit-scrollbar-track,
    body:has(> .d-flex > .sidebar) > .d-flex > .main-content::-webkit-scrollbar-track,
    body:has(> .d-flex > .sidebar) > .d-flex > .sidebar::-webkit-scrollbar-corner,
    body:has(> .d-flex > .sidebar) > .d-flex > .main-content::-webkit-scrollbar-corner {
        background: transparent;
    }
    body:has(> .d-flex > .sidebar) > .d-flex > .sidebar::-webkit-scrollbar-thumb,
    body:has(> .d-flex > .sidebar) > .d-flex > .main-content::-webkit-scrollbar-thumb {
        background: rgba(100,116,139,.35);
        border-radius: 99px;
        transition: background-color .2s ease;
    }
    body:has(> .d-flex > .sidebar) > .d-flex > .sidebar::-webkit-scrollbar-thumb:hover,
    body:has(> .d-flex > .sidebar) > .d-flex > .main-content::-webkit-scrollbar-thumb:hover {
        background: rgba(100,116,139,.6);
    }
    body.dark:has(> .d-flex > .sidebar) > .d-flex > .sidebar,
    body.dark:has(> .d-flex > .sidebar) > .d-flex > .main-content {
        scrollbar-color: rgba(255,255,255,.26) transparent;
    }
    body.dark:has(> .d-flex > .sidebar) > .d-flex > .sidebar::-webkit-scrollbar-thumb,
    body.dark:has(> .d-flex > .sidebar) > .d-flex > .main-content::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.26);
    }
    body.dark:has(> .d-flex > .sidebar) > .d-flex > .sidebar::-webkit-scrollbar-thumb:hover,
    body.dark:has(> .d-flex > .sidebar) > .d-flex > .main-content::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,.5);
    }
}

/* Stats Cards */
.stat-card {
    border-radius: 12px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* Cards */
.card {
    border-radius: 12px;
}

.card-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1rem 1.25rem;
}

/* Tables */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.03em;
}

.table td {
    vertical-align: middle;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.7em;
    border-radius: 6px;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* FullCalendar customization */
.fc .fc-button-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.fc .fc-daygrid-day-number {
    color: #334155;
}

.fc .fc-event {
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

/* DataTables */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.375rem 0.75rem;
}

/* Responsive — sidebar drawer overlay (modern) */
@media (max-width: 991.98px) {
    /* 📱 SOL MENÜ (drawer) — 2026-08-14 düzeltmesi.
       ESKİ HALİ: top/height sabit `--navbar-height` (44px) üzerinden hesaplanıyordu.
       Gerçekte üst header (firma bandı + navbar + demo/duyuru şeridi) ~123px, altta da
       "Hızlı" barı + iPhone çentik payı (~94px) var. Menü bunları hiç saymadığı için:
         · ilk maddeler (Gösterge Paneli/Takvim) header'ın arkasında kalıyordu,
         · son madde (AYARLAR) alt barın arkasında kalıyordu,
         · içerik kutuya "sığmış" göründüğünden scrollHeight==clientHeight oluyor →
           overflow:auto olmasına rağmen PARMAKLA KAYDIRILAMIYORDU (ölçüldü: 0 px).
       Artık gerçek ölçüler JS ile alınıp değişkene yazılıyor (genix-mobilenav.js →
       --gx-hdr-h / --gx-menu-pb); JS çalışmazsa aşağıdaki güvenli yedekler devreye girer. */
    .sidebar {
        position: fixed;
        top: var(--gx-hdr-h, var(--navbar-height));
        left: 0;
        transform: translateX(-100%);
        z-index: 1040;
        /* ⚠️ min-height ŞART: base .sidebar kuralındaki min-height (100vh-…) burada
           height'ı EZER ve menü yine ekrandan taşar. */
        min-height: 0;
        height: calc(100vh - var(--gx-hdr-h, var(--navbar-height)));    /* yedek */
        height: calc(100dvh - var(--gx-hdr-h, var(--navbar-height)));   /* iOS: adres çubuğu açılıp kapanınca kaymaz */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;      /* menü kaydırılırken arkadaki sayfa sürüklenmesin */
        /* alt "Hızlı" barı + çentik payı kadar iç boşluk → son madde barın arkasında
           kalmaz ve liste taşınca gerçekten kaydırılır */
        padding-bottom: var(--gx-menu-pb, calc(60px + env(safe-area-inset-bottom, 0px) + 16px));
        transition: transform .25s ease;
        width: 78%;
        max-width: 280px;
        border-right: 0;
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(15,23,42,.18);
    }

    .sidebar .nav-link {
        font-size: 1rem;
        padding: 12px 18px;
        border-radius: 10px;
        margin: 2px 8px;
    }
    .sidebar .nav-link.active {
        background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 14%, transparent), color-mix(in srgb, var(--accent) 7%, transparent));
        color: var(--primary);
        font-weight: 700;
    }

    .main-content {
        width: 100%;
        /* 🔒 Mobilde ekran boyu ZORLAMA YOK: eskiden min-height 100vh-66px idi ama üstteki
           bantlar (demo/duyuru) + alttaki 92px alt-bar payı hesaba katılmadığı için sayfa
           içerik boş olsa bile ~188px uzun kalıyor, parmakla boşluğa çekiliyordu. */
        min-height: 0;
    }

    /* Backdrop — sidebar açıkken arkayı karart, dış tıklama ile kapansın */
    .sidebar-backdrop {
        position: fixed;
        inset: var(--gx-hdr-h, var(--navbar-height)) 0 0 0;
        background: rgba(15,23,42,.45);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: 1035;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }
    .sidebar-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }
    body.sidebar-open {
        overflow: hidden;
    }
}

@media (max-width: 575.98px) {
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .container-fluid {
        padding: 1rem !important;
    }

    h4 {
        font-size: 1.1rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Modal */
.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-content {
    border-radius: 12px;
    border: none;
}

/* SweetAlert2 customization */
.swal2-confirm {
    background: var(--primary) !important;
}

/* Dark Mode Toggle */
.theme-toggle {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.25);
}

/* ========== DARK MODE ========== */
[data-theme="dark"] body,
body.dark {
    background-color: #0f172a;
    color: #e2e8f0;
}

body.dark .sidebar {
    background: #1e293b;
    border-right-color: #334155;
}

body.dark .sidebar .nav-link {
    color: #94a3b8;
}

body.dark .sidebar .nav-link:hover {
    color: var(--primary);
    background: #334155;
}

body.dark .sidebar .nav-link.active {
    color: #a5b4fc;
    background: rgba(99,102,241,0.15);
}

body.dark .card {
    background: #1e293b;
    border-color: #334155;
}

body.dark .card-header {
    border-bottom-color: #334155;
    background: #1e293b;
}

body.dark .stat-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark .table,
body.dark .table thead,
body.dark .table tbody,
body.dark .table tr,
body.dark .table td,
body.dark .table th,
body.dark table.dataTable thead th,
body.dark table.dataTable tbody td {
    color: #e2e8f0 !important;
    border-color: #334155 !important;
    --bs-table-color: #e2e8f0;
    --bs-table-bg: transparent;
    --bs-table-border-color: #334155;
    --bs-table-striped-color: #e2e8f0;
    --bs-table-hover-color: #f1f5f9;
    --bs-table-hover-bg: rgba(51,65,85,0.5);
}

body.dark .table th {
    color: #94a3b8 !important;
}

body.dark .table-hover tbody tr:hover,
body.dark .table-hover tbody tr:hover td {
    background: #334155 !important;
    color: #f1f5f9 !important;
}

body.dark .table-striped>tbody>tr:nth-of-type(odd)>* {
    color: #e2e8f0 !important;
    --bs-table-bg-type: rgba(51,65,85,0.3);
    background-color: rgba(51,65,85,0.3) !important;
}

body.dark .table-striped>tbody>tr:nth-of-type(even)>* {
    color: #e2e8f0 !important;
    background-color: transparent !important;
}

/* ===== Form alanı çerçeveleri — bir tık kalın ve okunur (program geneli) =====
   Bootstrap'in varsayılan 1px #dee2e6 çerçevesi açık zeminde neredeyse görünmüyordu;
   kullanıcı "tutar kutusunun çerçevesi belli olmuyor" diye bildirdi. */
.form-control,
.form-select,
.input-group-text,
.form-control-plaintext.border {
    border-width: 1.5px;
    border-color: #94a3b8;          /* eski: #dee2e6 (neredeyse görünmüyordu) */
}
.form-control:hover:not(:disabled):not([readonly]),
.form-select:hover:not(:disabled) {
    border-color: #64748b;
}
.form-control:focus,
.form-select:focus {
    border-width: 1.5px;
}
/* Koyu modda da aynı kalınlık, koyu zemine uygun ton */
body.dark .form-control,
body.dark .form-select,
body.dark .input-group-text {
    border-width: 1.5px;
    border-color: #6b7d96;
}
body.dark .form-control:hover:not(:disabled):not([readonly]),
body.dark .form-select:hover:not(:disabled) {
    border-color: #7c8da3;
}

body.dark .form-control,
body.dark .form-select {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark .form-control::placeholder {
    color: #64748b;
}

body.dark .form-control:focus,
body.dark .form-select:focus {
    background: #3b4c63;
    border-color: var(--primary);
    color: #f1f5f9;
}

body.dark .input-group-text {
    background: #475569;
    border-color: #475569;
    color: #94a3b8;
}

body.dark .modal-content {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark .modal-body {
    background: #1e293b;
}

body.dark .modal-footer {
    border-top-color: #334155;
    background: #1e293b;
}

body.dark .btn-secondary {
    background: #475569;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark .btn-outline-secondary {
    border-color: #475569;
    color: #94a3b8;
}

body.dark .btn-outline-secondary:hover {
    background: #475569;
    color: #e2e8f0;
}

body.dark .btn-light {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark .dropdown-menu {
    background: #1e293b;
    border-color: #334155;
}

body.dark .dropdown-item {
    color: #e2e8f0;
}

body.dark .dropdown-item:hover {
    background: #334155;
    color: #f1f5f9;
}

body.dark .dropdown-divider {
    border-color: #334155;
}

body.dark .text-muted {
    color: #64748b !important;
}

body.dark h4, body.dark h5, body.dark h6,
body.dark .fw-bold, body.dark .fw-semibold {
    color: #f1f5f9;
}

body.dark .border {
    border-color: #334155 !important;
}

body.dark .bg-light {
    background-color: #334155 !important;
}

body.dark .bg-white {
    background-color: #1e293b !important;
}

/* Dark FullCalendar */
body.dark .fc .fc-daygrid-day-number {
    color: #e2e8f0;
}

body.dark .fc .fc-col-header-cell-cushion {
    color: #94a3b8;
}

body.dark .fc td, body.dark .fc th {
    border-color: #334155;
}

body.dark .fc .fc-scrollgrid {
    border-color: #334155;
}

body.dark .fc .fc-daygrid-day.fc-day-today {
    background: rgba(99,102,241,0.15);
}

body.dark .fc .fc-toolbar-title {
    color: #f1f5f9;
}

body.dark .fc .fc-button-primary:disabled {
    background: #475569 !important;
    border-color: #475569 !important;
}

/* Dark DataTables */
body.dark .dataTables_wrapper .dataTables_filter input {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark .dataTables_wrapper .dataTables_length select {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark .dataTables_wrapper .dataTables_info,
body.dark .dataTables_wrapper .dataTables_length label,
body.dark .dataTables_wrapper .dataTables_filter label {
    color: #94a3b8;
}

body.dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #94a3b8 !important;
}

body.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

body.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

/* Dark Scrollbar */
body.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

body.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

body.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Dark page-link (pagination) */
body.dark .page-link {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* Dark Charts */
body.dark .chart-container canvas {
    filter: brightness(0.95);
}

/* Dark Alert */
body.dark .alert-info {
    background: rgba(59,130,246,0.15);
    border-color: rgba(59,130,246,0.3);
    color: #93c5fd;
}

body.dark .alert-warning {
    background: rgba(245,158,11,0.15);
    border-color: rgba(245,158,11,0.3);
    color: #fcd34d;
}

/* Dark list-group */
body.dark .list-group-item {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

/* Dark Login Page */
body.dark.login-page {
    background: linear-gradient(135deg, #1e1b4b 0%, #831843 100%);
}

body.dark .card {
    color: #e2e8f0;
}

body.dark .card-title {
    color: #f1f5f9;
}

body.dark .form-check-label {
    color: #94a3b8;
}

body.dark a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item) {
    color: #a5b4fc;
}

/* Transition for smooth theme switch */
body, .sidebar, .card, .table, .form-control, .form-select,
.modal-content, .dropdown-menu, .btn, .list-group-item {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ── Rezervasyon Durum Badge'leri ── */
.badge.status-musait    { background:#16a34a; color:#fff; }
.badge.status-opsiyonlu { background:#d97706; color:#fff; }
.badge.status-beklemede { background:#f59e0b; color:#1e293b; }
.badge.status-kesin     { background:#2563eb; color:#fff; }
.badge.status-iptal     { background:#dc2626; color:#fff; }
.badge.status-teklif    { background:#7c3aed; color:#fff; }

/* Kart sol kenarlık renkleri */
.res-card.musait    { border-left-color:#16a34a; }
.res-card.opsiyonlu { border-left-color:#d97706; }
.res-card.kesin     { border-left-color:#2563eb; }

/* ── Kişi Kartları (Gelin/Damat/Yakını) ── */
.kisi-kart {
    border:1px solid #e2e8f0;
    border-radius:10px;
    padding:10px;
    background:#f8fafc;
    height:100%;
}
.kisi-kart-baslik {
    font-weight:700;
    font-size:.8rem;
    text-transform:uppercase;
    letter-spacing:.5px;
    color:#6366f1;
    margin-bottom:6px;
    display:flex;
    align-items:center;
    gap:5px;
}
body.dark .kisi-kart { background:#1e293b; border-color:#334155; }
body.dark .kisi-kart-baslik { color:#a5b4fc; }

/* Form bölüm başlıkları */
.form-section-label {
    font-size:.75rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.7px;
    color:#6366f1;
    border-bottom:1px solid #e2e8f0;
    padding-bottom:4px;
    margin-bottom:10px;
    margin-top:4px;
}
body.dark .form-section-label { color:#a5b4fc; border-bottom-color:#334155; }

/* Hazır not etiketleri */
.hazir-not-tag {
    display: inline-block;
    cursor: pointer;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 500;
    user-select: none;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    transition: all .15s;
}
.hazir-not-tag:hover { background: #eef2ff; border-color: #6366f1; color: #4338ca; }
.hazir-not-tag.hazir-not-active { background: #6366f1; border-color: #6366f1; color: #fff; }
body.dark .hazir-not-tag { background: #334155; border-color: #475569; color: #cbd5e1; }
body.dark .hazir-not-tag:hover { background: #3f4a5e; border-color: #818cf8; color: #e0e7ff; }
body.dark .hazir-not-tag.hazir-not-active { background: #4f46e5; border-color: #4f46e5; color: #fff; }

.hazir-not-sil {
    background: none;
    border: none;
    padding: 0 0 0 4px;
    font-size: .85rem;
    line-height: 1;
    color: inherit;
    opacity: .6;
    cursor: pointer;
    vertical-align: middle;
}
.hazir-not-sil:hover { opacity: 1; }
.hazir-not-tag.hazir-not-active .hazir-not-sil { color: #fff; }

/* ═══ Kampanya menü öğesi — dikkat çekici animasyonlu hediye SVG ═══ */
.kmp-gift-icon {
    width: 20px;
    height: 20px;
    vertical-align: -5px;
    margin-right: 8px;
    flex-shrink: 0;
    animation: kmp-gift-bounce 1.8s ease-in-out infinite;
    transform-origin: 50% 100%;
    filter: drop-shadow(0 1px 2px rgba(236,72,153,.35));
}
.sidebar a.nav-link:has(.kmp-gift-icon) {
    background: linear-gradient(90deg, rgba(236,72,153,.08), rgba(168,85,247,.05));
    border-left: 3px solid #ec4899;
    font-weight: 700;
    position: relative;
}
.sidebar a.nav-link.active:has(.kmp-gift-icon) {
    background: linear-gradient(90deg, rgba(236,72,153,.22), rgba(168,85,247,.15));
}
body.dark .sidebar a.nav-link:has(.kmp-gift-icon) {
    background: linear-gradient(90deg, rgba(236,72,153,.12), rgba(168,85,247,.08));
}
@keyframes kmp-gift-bounce {
    0%, 100% { transform: translateY(0) rotate(0); }
    20%      { transform: translateY(-2px) rotate(-6deg); }
    40%      { transform: translateY(0) rotate(0); }
    60%      { transform: translateY(-2px) rotate(6deg); }
    80%      { transform: translateY(0) rotate(0); }
}
.kmp-gift-icon .kmp-spark { animation: kmp-spark-blink 1.4s ease-in-out infinite; transform-origin: center; }
.kmp-gift-icon .kmp-spark-2 { animation-delay: .35s; }
.kmp-gift-icon .kmp-spark-3 { animation-delay: .7s; }
@keyframes kmp-spark-blink {
    0%, 100% { opacity: 0; transform: scale(.3); }
    50%      { opacity: 1; transform: scale(1.2); }
}
/* Kullanıcı hareketten rahatsız oluyorsa: */
@media (prefers-reduced-motion: reduce) {
    .kmp-gift-icon, .kmp-gift-icon .kmp-spark { animation: none; }
}
