/* ==========================================================================
   Görünüm: Bordo
   Kırmızı baskın ama göz yormayan: doygunluğu düşük şarap/tuğla tonları, iki modda da
   koyu bordo kenar çubuğu, sıcak nötr içerik zemini, serif sayfa başlıkları.
   Parlak kırmızı yalnızca uyarı/hata için kullanılır.
   <html data-ui="crimson" data-bs-theme="light|dark">
   ========================================================================== */

html[data-ui="crimson"] {
    --font-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

    --surface-0: #faf6f4;
    --surface-1: #ffffff;
    --surface-2: #f6eeeb;
    --surface-3: #eee2de;
    --surface-0-rgb: 250, 246, 244;
    --surface-1-rgb: 255, 255, 255;
    --surface-2-rgb: 246, 238, 235;
    --input-bg: #ffffff;
    --sidebar-bg: #3a141c;

    --text: #2a1a1d;
    --text-rgb: 42, 26, 29;
    --text-2: #6b5458;
    --text-3: #9a8589;

    --border: #eadcd8;
    --border-strong: #d6c2bd;

    --accent: #a8323e;
    --accent-rgb: 168, 50, 62;
    --accent-strong: #8c2733;
    --accent-soft: rgba(168, 50, 62, 0.09);
    --accent-text: #8c2733;
    --accent-gradient: linear-gradient(135deg, #a8323e 0%, #c0545c 100%);

    --success: #2f7d52; --success-soft: rgba(47, 125, 82, 0.11);
    --warning: #a96a12; --warning-soft: rgba(169, 106, 18, 0.12);
    --danger: #d12d2d;  --danger-soft: rgba(209, 45, 45, 0.1);
    --info: #3d6f8f;    --info-soft: rgba(61, 111, 143, 0.12);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --shadow-sm: 0 1px 2px rgba(58, 20, 28, 0.06);
    --shadow: 0 1px 2px rgba(58, 20, 28, 0.05), 0 10px 28px -14px rgba(58, 20, 28, 0.22);
    --shadow-lg: 0 28px 56px -24px rgba(58, 20, 28, 0.35);
    --ring: 0 0 0 3px rgba(168, 50, 62, 0.2);
}

html[data-ui="crimson"][data-bs-theme="dark"] {
    --surface-0: #171012;
    --surface-1: #20171a;
    --surface-2: #281d20;
    --surface-3: #33262a;
    --surface-0-rgb: 23, 16, 18;
    --surface-1-rgb: 32, 23, 26;
    --surface-2-rgb: 40, 29, 32;
    --input-bg: #1c1416;
    --sidebar-bg: #2a0f15;

    --text: #f1e7e8;
    --text-rgb: 241, 231, 232;
    --text-2: #c2acaf;
    --text-3: #8f797d;

    --border: rgba(222, 178, 184, 0.12);
    --border-strong: rgba(222, 178, 184, 0.22);

    --accent: #c4505c;
    --accent-rgb: 196, 80, 92;
    --accent-strong: #a8323e;
    --accent-soft: rgba(196, 80, 92, 0.15);
    --accent-text: #e59aa2;
    --accent-gradient: linear-gradient(135deg, #b8424e 0%, #cf6872 100%);

    --success: #6cc196; --success-soft: rgba(108, 193, 150, 0.14);
    --warning: #e0a85a; --warning-soft: rgba(224, 168, 90, 0.14);
    --danger: #ff6b6b;  --danger-soft: rgba(255, 107, 107, 0.14);
    --info: #7fb2d3;    --info-soft: rgba(127, 178, 211, 0.14);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 28px 56px -24px rgba(0, 0, 0, 0.85);
}

/* --- Koyu bordo kenar çubuğu: değişkenler yalnızca menü içinde yeniden tanımlanır --- */
html[data-ui="crimson"] .app-sidebar {
    --text: #f6e9eb;
    --text-2: #d9b9be;
    --text-3: #a9868c;
    --border: rgba(255, 220, 226, 0.1);
    --surface-2: rgba(255, 255, 255, 0.06);
    --accent-soft: rgba(255, 255, 255, 0.1);
    --accent-text: #ffffff;
    border-right: 0;
    color: var(--text);
    background:
        radial-gradient(120% 60% at 0% 0%, rgba(255, 255, 255, 0.06), transparent 60%),
        var(--sidebar-bg);
}
html[data-ui="crimson"] .app-brand { border-bottom-color: var(--border); }
html[data-ui="crimson"] .app-brand-logo { background: rgba(255, 255, 255, 0.12); box-shadow: none; }
html[data-ui="crimson"] .app-brand-tag { color: var(--text-3); }
html[data-ui="crimson"] .app-nav-link { position: relative; color: var(--text-2); }
html[data-ui="crimson"] .app-nav-link i { color: var(--text-3); }
html[data-ui="crimson"] .app-nav-link:hover { color: var(--text); }
html[data-ui="crimson"] .app-nav-link.active { color: #fff; background: rgba(255, 255, 255, 0.1); }
html[data-ui="crimson"] .app-nav-link.active i { color: #f3b5bc; }
html[data-ui="crimson"] .app-nav-link.active::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #e8a0a8;
}
html[data-ui="crimson"] .app-nav-section { color: var(--text-3); }

/* --- Üst çubuk: ince bordo alt çizgi --- */
html[data-ui="crimson"] .app-topbar { box-shadow: inset 0 -2px 0 rgba(var(--accent-rgb), 0.18); border-bottom-color: transparent; }

/* --- Tipografi: serif başlıklar --- */
html[data-ui="crimson"] .page-header-title,
html[data-ui="crimson"] .home-hero-title,
html[data-ui="crimson"] .auth-card h1,
html[data-ui="crimson"] .modal-title,
html[data-ui="crimson"] .app-brand-name {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
}
html[data-ui="crimson"] .page-header-title { font-size: clamp(1.4rem, 1.15rem + 1vw, 2rem); }
html[data-ui="crimson"] .page-header-icon { background: var(--accent-soft); color: var(--accent); }

/* --- Kartlar: ince çizgi, sıcak yüzey, sakin vurgu --- */
html[data-ui="crimson"] .stat-card-icon,
html[data-ui="crimson"] .entity-icon { border-radius: 10px; }
html[data-ui="crimson"] .card-interactive:hover,
html[data-ui="crimson"] .quick-link:hover { border-color: rgba(var(--accent-rgb), 0.35) !important; }

/* --- Düğmeler: düz bordo, parlak gölge yok --- */
html[data-ui="crimson"] .btn-primary,
html[data-ui="crimson"] .btn-accent { box-shadow: none; }
html[data-ui="crimson"] .btn-primary:hover,
html[data-ui="crimson"] .btn-accent:hover { box-shadow: 0 6px 18px -10px rgba(var(--accent-rgb), 0.8); }

/* --- Tablo: hafif gül tonlu başlık --- */
html[data-ui="crimson"] .table thead th {
    background: var(--surface-2) !important;
    color: var(--accent-text) !important;
    border-bottom: 1px solid var(--border-strong);
}

/* --- Bildirim: sol şerit bordo tonunda kalır, gövde sakin --- */
html[data-ui="crimson"] .custom-toast { border-left-width: 3px !important; }
