/* ============================================================
   DESIGN TOKEN'LAR — LUXURY DARK EDITORIAL
   Tema: Sıcak Siyah + Bej/Krem + Glow Beyaz
   Stil: Lüks saat/parfüm reklamı estetiği
   ============================================================ */

:root {
    /* --- CORE BLACKS (sıcak siyah, soğuk değil) --- */
    --black-deep:    #080808;
    --black-base:    #0d0d0d;
    --black-surface: #111111;
    --black-raised:  #161616;
    --black-float:   #1c1c1c;

    /* --- WARM CREAM / BEJ SKALASI --- */
    --cream-50:  #f5f0e8;
    --cream-100: #e8dcc8;
    --cream-200: #d4c5a9;
    --cream-300: #c9b99a;
    --cream-400: #b8a688;
    --cream-500: #a08870;

    /* --- GLOW WHITES --- */
    --white-glow:   rgba(255, 248, 235, 0.90);
    --white-bright: rgba(255, 255, 255, 0.85);
    --white-mid:    rgba(255, 248, 235, 0.55);
    --white-subtle: rgba(255, 248, 235, 0.12);
    --white-ghost:  rgba(255, 248, 235, 0.05);

    /* --- SEMANTİK EŞLEMELERİ --- */
    --bg-color:            var(--black-deep);
    --panel-bg:            rgba(13, 13, 13, 0.75);
    --panel-border:        rgba(232, 220, 200, 0.10);
    --panel-border-strong: rgba(232, 220, 200, 0.22);
    --text-primary:        var(--cream-50);
    --text-secondary:      var(--cream-300);
    --text-muted:          rgba(184, 166, 136, 0.50);

    /* --- AKSAN --- */
    --accent-primary:   var(--cream-100);
    --accent-secondary: var(--cream-200);
    --accent-glow:      var(--white-glow);

    /* --- GRADIENT --- */
    --gradient-primary: linear-gradient(135deg, var(--cream-200), var(--white-glow));
    --gradient-logo:    linear-gradient(135deg, var(--cream-100) 0%, var(--white-bright) 100%);

    /* --- STATUS RENKLERİ (lüks nötr palet) --- */
    --status-new:       #c9b99a;
    --status-contacted: #d4a853;
    --status-won:       #8eb894;
    --status-lost:      #b07868;

    /* --- HAZIR GLOW BOX-SHADOW DEĞERLERİ --- */
    --glow-sm:  0 0 12px rgba(255, 248, 235, 0.06);
    --glow-md:  0 0 24px rgba(255, 248, 235, 0.10);
    --glow-lg:  0 0 48px rgba(255, 248, 235, 0.14);
    --glow-xl:  0 0 72px rgba(255, 248, 235, 0.18);

    /* --- ESKİDEN KALAN UYUMLULUK ALIAS'LARI --- */
    --accent-blue:   var(--cream-300);
    --accent-purple: var(--cream-100);
    --accent-pink:   var(--cream-200);
}

/* ============================================================
   RESET & TEMEL
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }

/* ============================================================
   BODY — sıcak siyah + çok subtle bej radial glow
   ============================================================ */

body {
    background-color: var(--black-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 20% 60%, rgba(201, 185, 154, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(232, 220, 200, 0.03) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 100%, rgba(184, 166, 136, 0.035) 0%, transparent 55%);
    background-attachment: fixed;
}

/* Çok ince film grain dokusu */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 160px 160px;
    background-repeat: repeat;
}

.app-container {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* ============================================================
   GLASS PANEL — bej kenarlık, siyah saydam bg, beyaz glow
   ============================================================ */

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.55),
        0 0 0 0.5px rgba(232, 220, 200, 0.06),
        inset 0 1px 0 rgba(255, 248, 235, 0.04);
    position: relative;
    overflow: hidden;
}

/* Üst-sol köşe subtle parlama */
.glass-panel::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 50%;
    height: 50%;
    background: radial-gradient(
        ellipse at top left,
        rgba(255, 248, 235, 0.05) 0%,
        rgba(232, 220, 200, 0.025) 40%,
        transparent 70%
    );
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

/* ============================================================
   SİDEBAR
   ============================================================ */

.sidebar {
    width: 260px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    margin: 16px;
    margin-right: 0;
    transition: width 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

/* Logo — gradient bej → beyaz */
.logo { display: flex; align-items: center; gap: 12px; position: relative; }

.logo h2 {
    font-size: 20px;
    font-weight: 600;
    background: var(--gradient-logo);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    transition: opacity 0.2s ease;
    letter-spacing: 0.02em;
}

/* Logo altındaki ince ışıyan çizgi */
.logo::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--cream-300) 30%,
        rgba(255, 248, 235, 0.9) 50%,
        var(--cream-300) 70%,
        transparent 100%
    );
    box-shadow:
        0 0 6px 1px rgba(212, 197, 169, 0.35),
        0 0 16px 3px rgba(232, 220, 200, 0.15);
    animation: logoLineGlow 3.5s ease-in-out infinite;
}

@keyframes logoLineGlow {
    0%, 100% {
        opacity: 0.55;
        box-shadow: 0 0 6px 1px rgba(212, 197, 169, 0.3), 0 0 14px 2px rgba(232, 220, 200, 0.12);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 10px 2px rgba(232, 220, 200, 0.55), 0 0 26px 5px rgba(255, 248, 235, 0.18);
    }
}

/* Neon icon — bej glow */
.neon-icon {
    color: var(--cream-200);
    filter: drop-shadow(0 0 7px rgba(212, 197, 169, 0.55));
    flex-shrink: 0;
}

.sidebar-toggle {
    background: rgba(232, 220, 200, 0.06);
    border: 1px solid rgba(232, 220, 200, 0.12);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 7px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.sidebar-toggle:hover { background: rgba(232, 220, 200, 0.14); color: var(--cream-50); border-color: rgba(232, 220, 200, 0.28); }
.sidebar-toggle svg { transition: transform 0.3s ease; width: 18px; height: 18px; }
.sidebar-toggle i { transition: transform 0.3s ease; width: 18px; height: 18px; }

/* Nav menü */
.nav-menu { display: flex; flex-direction: column; gap: 8px; flex: 1; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 12px 13px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.25s ease;
    font-weight: 500;
    white-space: nowrap;
    border-left: 3px solid transparent;
}
.nav-item span { transition: opacity 0.2s ease; }

.nav-item:hover {
    background: rgba(232, 220, 200, 0.045);
    color: var(--cream-50);
    border-left-color: var(--cream-300);
    box-shadow: inset 3px 0 14px -5px rgba(232, 220, 200, 0.55);
}

/* Aktif nav item */
.nav-item.active {
    background: rgba(232, 220, 200, 0.065);
    color: var(--cream-50);
    border-left: 3px solid var(--cream-100);
    box-shadow: inset 3px 0 18px -5px rgba(255, 248, 235, 0.55);
}

.sidebar-footer {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    transition: opacity 0.2s ease;
}

/* Sidebar — Collapsed */
.sidebar.collapsed { width: 72px; padding: 24px 12px; }
.sidebar.collapsed .sidebar-header { justify-content: center; }
.sidebar.collapsed .logo h2 { opacity: 0; width: 0; overflow: hidden; pointer-events: none; }
.sidebar.collapsed .logo::after { display: none; }
.sidebar.collapsed .sidebar-toggle i,
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
    gap: 0;
    border-left: none !important;
    box-shadow: none !important;
}
.sidebar.collapsed .nav-item span { opacity: 0; width: 0; overflow: hidden; pointer-events: none; }
.sidebar.collapsed .sidebar-footer { opacity: 0; pointer-events: none; height: 0; overflow: hidden; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main-content { flex: 1; padding: 16px 32px 32px 32px; overflow-y: auto; }

/* ============================================================
   TOPBAR
   ============================================================ */

.topbar { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px; padding-top: 16px; }

.topbar h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--cream-50);
    letter-spacing: 0.01em;
    text-shadow:
        0 0 24px rgba(255, 248, 235, 0.25),
        0 0 48px rgba(232, 220, 200, 0.10);
}

.subtitle { color: var(--text-secondary); font-size: 14px; }

/* Status badge — bej/krem tonu */
.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(232, 220, 200, 0.07);
    color: var(--cream-100);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(232, 220, 200, 0.18);
    box-shadow:
        0 0 14px rgba(232, 220, 200, 0.10),
        inset 0 0 8px rgba(255, 255, 255, 0.02);
    letter-spacing: 0.02em;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--cream-200);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(232, 220, 200, 0.7);
    animation: pulseBej 1.8s infinite;
}

@keyframes pulseBej {
    0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(232, 220, 200, 0.7); }
    70%  { transform: scale(1);    box-shadow: 0 0 0 6px rgba(232, 220, 200, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(232, 220, 200, 0); }
}

@keyframes pulse {
    0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(232, 220, 200, 0.7); }
    70%  { transform: scale(1);    box-shadow: 0 0 0 6px rgba(232, 220, 200, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(232, 220, 200, 0); }
}

/* ============================================================
   LOADER
   ============================================================ */

.loader-container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 50vh; color: var(--text-secondary); }

.spinner {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(201, 185, 154, 0.12);
    border-radius: 50%;
    border-top-color: var(--cream-200);
    animation: spinBej 1s ease-in-out infinite;
    margin-bottom: 16px;
    box-shadow: 0 0 14px rgba(232, 220, 200, 0.18);
}

@keyframes spinBej {
    0%   { transform: rotate(0deg);   box-shadow: 0 0 8px rgba(232, 220, 200, 0.15); }
    50%  {                             box-shadow: 0 0 18px rgba(232, 220, 200, 0.32); }
    100% { transform: rotate(360deg); box-shadow: 0 0 8px rgba(232, 220, 200, 0.15); }
}

/* Views */
.view-section { animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   METRİK CARD'LAR
   ============================================================ */

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 32px; }

.metric-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Üst kenar glow çizgisi — hover'da belirir */
.metric-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    width: 70%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--cream-300) 35%,
        rgba(255, 248, 235, 0.9) 50%,
        var(--cream-300) 65%,
        transparent 100%
    );
    box-shadow: 0 0 8px 1px rgba(232, 220, 200, 0.3);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.metric-card:hover::after { opacity: 1; }

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(232, 220, 200, 0.12),
        var(--glow-sm);
}

.metric-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }

/* Metrik ikon renkleri — yeni palet */
.metric-icon.blue {
    background: rgba(201, 185, 154, 0.08);
    color: var(--cream-200);
    box-shadow: inset 0 0 16px rgba(232, 220, 200, 0.06);
}
.metric-icon.purple {
    background: rgba(232, 220, 200, 0.10);
    color: var(--cream-100);
    box-shadow: inset 0 0 16px rgba(255, 248, 235, 0.07);
}
.metric-icon.pink {
    background: rgba(184, 166, 136, 0.08);
    color: var(--cream-300);
    box-shadow: inset 0 0 16px rgba(212, 197, 169, 0.06);
}

.metric-info h3 { color: var(--text-secondary); font-size: 14px; font-weight: 500; margin-bottom: 4px; letter-spacing: 0.03em; }
.metric-info h2 { font-size: 28px; font-weight: 600; color: var(--cream-50); }
.metric-info h2.small-text { font-size: 20px; }

/* ============================================================
   CHART'LAR
   ============================================================ */

.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 24px; margin-bottom: 32px; }
.chart-card { padding: 24px; }
.chart-card h3 { font-size: 16px; font-weight: 500; margin-bottom: 24px; color: var(--text-secondary); letter-spacing: 0.03em; }
.chart-container { position: relative; height: 300px; width: 100%; }

/* ============================================================
   TABLO
   ============================================================ */

.table-section { padding: 24px; margin-bottom: 32px; }
.table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.table-header h3 { font-size: 18px; font-weight: 500; color: var(--cream-50); }
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }

th {
    text-align: left;
    padding: 14px 16px;
    color: var(--cream-400);
    font-size: 11px;
    font-weight: 600;
    border-bottom: 1px solid rgba(232, 220, 200, 0.10);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(232, 220, 200, 0.04);
    vertical-align: middle;
    color: var(--cream-50);
}

tr:hover td {
    background: rgba(232, 220, 200, 0.025);
    transition: background 0.2s ease;
}

.contact-link {
    color: var(--cream-200);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}
.contact-link:hover { color: var(--cream-50); text-decoration: underline; }

.badge {
    background: rgba(232, 220, 200, 0.07);
    color: var(--cream-300);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid rgba(232, 220, 200, 0.10);
}

/* ============================================================
   STATUS PILL'LER — yeni renk uyumu
   ============================================================ */

.status-pill {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    letter-spacing: 0.04em;
}

.status-pill[data-status="new"] {
    background: rgba(201, 185, 154, 0.12);
    color: var(--status-new);
    border: 1px solid rgba(201, 185, 154, 0.28);
}

.status-pill[data-status="contacted"] {
    background: rgba(212, 168, 83, 0.12);
    color: var(--status-contacted);
    border: 1px solid rgba(212, 168, 83, 0.28);
}

.status-pill[data-status="won"] {
    background: rgba(142, 184, 148, 0.12);
    color: var(--status-won);
    border: 1px solid rgba(142, 184, 148, 0.28);
}

.status-pill[data-status="lost"] {
    background: rgba(176, 120, 104, 0.12);
    color: var(--status-lost);
    border: 1px solid rgba(176, 120, 104, 0.28);
}

/* ============================================================
   BUTONLAR
   ============================================================ */

.btn-sm {
    background: rgba(232, 220, 200, 0.05);
    color: var(--cream-100);
    border: 1px solid var(--panel-border);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-sm:hover {
    background: rgba(232, 220, 200, 0.10);
    border-color: rgba(232, 220, 200, 0.20);
    color: var(--cream-50);
}

.btn-delete {
    background: rgba(176, 120, 104, 0.08);
    color: var(--status-lost);
    border: 1px solid rgba(176, 120, 104, 0.22);
    margin-left: 4px;
}
.btn-delete:hover { background: rgba(176, 120, 104, 0.16); color: #d4987a; }

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
    color: var(--text-secondary);
}
.btn-delete-icon:hover { background: rgba(176, 120, 104, 0.10); color: var(--status-lost); }
.btn-delete-icon i { width: 14px; height: 14px; }

.btn-primary {
    background: rgba(232, 220, 200, 0.10);
    color: var(--cream-50);
    border: 1px solid rgba(232, 220, 200, 0.22);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.03em;
}
.btn-primary:hover {
    background: rgba(232, 220, 200, 0.17);
    border-color: rgba(232, 220, 200, 0.40);
    color: #ffffff;
    box-shadow:
        0 0 20px rgba(232, 220, 200, 0.22),
        0 0 40px rgba(255, 248, 235, 0.10),
        0 4px 20px rgba(0, 0, 0, 0.45);
    transform: translateY(-1px);
}

/* ============================================================
   KANBAN BOARD
   ============================================================ */

.kanban-board { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 16px; min-height: 60vh; }
.kanban-column { flex: 1; min-width: 300px; display: flex; flex-direction: column; }

.column-header {
    padding: 16px;
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.column-header h3 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.column-header .count {
    background: rgba(232, 220, 200, 0.08);
    color: var(--cream-400);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    border: 1px solid rgba(232, 220, 200, 0.10);
}

/* Kanban kolon başlık renkleri — yeni tema */
.kanban-column[data-status="new"]       .column-header h3 { color: var(--status-new); }
.kanban-column[data-status="contacted"] .column-header h3 { color: var(--status-contacted); }
.kanban-column[data-status="won"]       .column-header h3 { color: var(--status-won); }
.kanban-column[data-status="lost"]      .column-header h3 { color: var(--status-lost); }

.column-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 200px;
    transition: background 0.2s;
}
.column-content.drag-over {
    background: rgba(232, 220, 200, 0.03);
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(255, 248, 235, 0.04);
}

/* ============================================================
   KANBAN KART — hover glow (beyaz/bej)
   ============================================================ */

.kanban-card {
    background: rgba(11, 11, 11, 0.80);
    border: 1px solid rgba(232, 220, 200, 0.09);
    border-radius: 12px;
    padding: 16px;
    cursor: grab;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
}
.kanban-card:active { cursor: grabbing; transform: scale(0.98); }

.kanban-card:hover {
    transform: translateY(-3px);
    border-color: rgba(232, 220, 200, 0.24);
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.50),
        0 0 0 1px rgba(232, 220, 200, 0.12),
        inset 0 1px 0 rgba(255, 248, 235, 0.07),
        0 0 20px rgba(255, 248, 235, 0.06);
}

/* Unread badge */
.unread-badge {
    background: rgba(176, 120, 104, 0.18);
    color: #d4987a;
    border: 1px solid rgba(176, 120, 104, 0.45);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
    display: inline-block;
    animation: pulseRed 2s infinite;
}
@keyframes pulseRed {
    0%   { box-shadow: 0 0 0 0 rgba(176, 120, 104, 0.40); }
    70%  { box-shadow: 0 0 0 6px rgba(176, 120, 104, 0); }
    100% { box-shadow: 0 0 0 0 rgba(176, 120, 104, 0); }
}

.card-header { display: flex; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.card-header h4 { font-size: 15px; font-weight: 600; width: 100%; color: var(--cream-50); }
.card-tag {
    font-size: 11px;
    color: var(--cream-400);
    background: rgba(232, 220, 200, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(232, 220, 200, 0.08);
}

/* Priority badge'ler */
.priority-high {
    color: #d4987a;
    background: rgba(176, 120, 104, 0.14);
    border: 1px solid rgba(176, 120, 104, 0.28);
    padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600;
}
.priority-medium {
    color: var(--status-contacted);
    background: rgba(212, 168, 83, 0.12);
    border: 1px solid rgba(212, 168, 83, 0.26);
    padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600;
}
.priority-low {
    color: var(--cream-400);
    background: rgba(232, 220, 200, 0.05);
    border: 1px solid rgba(232, 220, 200, 0.10);
    padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 500;
}

.card-body p { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.card-body i { width: 14px; height: 14px; }
.card-footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(232, 220, 200, 0.06); display: flex; justify-content: space-between; }

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(4, 4, 4, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    background: var(--black-surface);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.70),
        0 0 0 1px rgba(232, 220, 200, 0.12),
        inset 0 1px 0 rgba(255, 248, 235, 0.05);
    border: 1px solid rgba(232, 220, 200, 0.14);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(232, 220, 200, 0.10);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h2 { font-size: 20px; font-weight: 600; color: var(--cream-50); letter-spacing: 0.01em; }
.close-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; transition: color 0.2s; }
.close-btn:hover { color: var(--cream-50); }

.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 24px; max-height: 60vh; overflow-y: auto; }

.modal-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: rgba(8, 8, 8, 0.50);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(232, 220, 200, 0.07);
}
.detail-item label {
    font-size: 10px;
    color: var(--cream-400);
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.detail-item p { font-size: 14px; font-weight: 500; color: var(--cream-50); }

.modal-chat { margin-top: 16px; border-top: 1px solid rgba(232, 220, 200, 0.07); padding-top: 16px; }
.modal-chat h3 { font-size: 14px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; color: var(--text-primary); }

.modal-notes h3 { font-size: 14px; margin-bottom: 8px; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }

#modal-textarea {
    width: 100%;
    height: 120px;
    background: rgba(8, 8, 8, 0.55);
    border: 1px solid rgba(232, 220, 200, 0.10);
    border-radius: 8px;
    padding: 12px;
    color: var(--cream-50);
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}
#modal-textarea:focus { outline: none; border-color: rgba(232, 220, 200, 0.28); box-shadow: 0 0 12px rgba(232, 220, 200, 0.08); }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(232, 220, 200, 0.08);
    display: flex;
    justify-content: flex-end;
    background: rgba(8, 8, 8, 0.40);
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

/* ============================================================
   CHAT ELEMANLARI
   ============================================================ */

.chat-container {
    background: rgba(6, 6, 6, 0.55);
    border-radius: 10px;
    padding: 12px;
    height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(232, 220, 200, 0.07);
}

.chat-msg {
    max-width: 85%;
    padding: 9px 13px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
    word-wrap: break-word;
    animation: chatBubbleIn 0.22s ease forwards;
}

@keyframes chatBubbleIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Gelen mesaj — bej/krem */
.chat-msg.in {
    align-self: flex-start;
    background: rgba(201, 185, 154, 0.10);
    border: 1px solid rgba(232, 220, 200, 0.13);
    color: var(--cream-100);
    border-bottom-left-radius: 2px;
}

/* Giden mesaj — beyaz glow + koyu zemin */
.chat-msg.out {
    align-self: flex-end;
    background: rgba(8, 8, 8, 0.80);
    color: rgba(245, 240, 232, 0.92);
    border: 1px solid rgba(255, 248, 235, 0.10);
    border-bottom-right-radius: 2px;
    box-shadow:
        0 0 12px rgba(255, 248, 235, 0.07),
        inset 0 0 10px rgba(255, 255, 255, 0.025);
}

.chat-time { display: block; font-size: 10px; opacity: 0.50; margin-top: 4px; text-align: right; }
.chat-loading, .chat-empty { text-align: center; font-size: 13px; color: var(--text-secondary); margin: auto; }

.chat-input-container { display: flex; gap: 8px; margin-top: 12px; }
.chat-input-container input {
    flex: 1;
    background: rgba(8, 8, 8, 0.60);
    border: 1px solid rgba(232, 220, 200, 0.10);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--cream-50);
    font-family: inherit;
    font-size: 13px;
    transition: border-color 0.2s;
}
.chat-input-container input:focus {
    outline: none;
    border-color: rgba(232, 220, 200, 0.26);
    box-shadow: 0 0 10px rgba(232, 220, 200, 0.07);
}

.btn-send {
    background: rgba(232, 220, 200, 0.10);
    color: var(--cream-100);
    border: 1px solid rgba(232, 220, 200, 0.18);
    border-radius: 8px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-send:hover {
    background: rgba(232, 220, 200, 0.18);
    border-color: rgba(232, 220, 200, 0.35);
    box-shadow: 0 0 14px rgba(232, 220, 200, 0.18);
    color: var(--cream-50);
}

/* ============================================================
   SCROLLBAR — bej tonları
   ============================================================ */

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--black-deep); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        var(--cream-500) 0%,
        var(--cream-300) 50%,
        var(--cream-500) 100%
    );
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        var(--cream-200) 0%,
        var(--cream-100) 50%,
        var(--cream-200) 100%
    );
}

/* ============================================================
   LIVE CHATS PANEL
   ============================================================ */

.chats-layout {
    display: flex;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(8, 8, 8, 0.45);
}

.chat-list-pane {
    width: 320px;
    border-right: 1px solid rgba(232, 220, 200, 0.08);
    display: flex;
    flex-direction: column;
    background: rgba(6, 6, 6, 0.30);
}

.chat-list-header {
    padding: 16px;
    border-bottom: 1px solid rgba(232, 220, 200, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-list-header h3 { font-size: 16px; font-weight: 600; color: var(--cream-50); }

.chat-list-items { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }

.chat-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-item:hover { background: rgba(232, 220, 200, 0.04); }
.chat-item.active { background: rgba(232, 220, 200, 0.08); }
.chat-item-info h4 { font-size: 14px; font-weight: 500; color: var(--cream-50); }
.chat-item-info p { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
.chat-item-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.chat-item-time { font-size: 10px; color: var(--text-muted); }
.chat-item-unread {
    background: rgba(232, 220, 200, 0.14);
    color: var(--cream-100);
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid rgba(232, 220, 200, 0.20);
}

.chat-view-pane { flex: 1; display: flex; flex-direction: column; }
.chat-empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-secondary); }

.chat-view-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(232, 220, 200, 0.08);
    background: rgba(6, 6, 6, 0.30);
    display: flex;
    align-items: center;
    gap: 12px;
}
.chat-view-header h3 { font-size: 16px; color: var(--cream-50); }
.chat-view-header .status-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--status-won); }

.chat-view-messages { flex: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }

.chat-view-messages .chat-msg { max-width: 70%; font-size: 14px; }

/* Büyük chat view bubble'ları */
.chat-view-messages .chat-msg.in {
    background: rgba(201, 185, 154, 0.09);
    border: 1px solid rgba(232, 220, 200, 0.12);
    color: var(--cream-100);
}
.chat-view-messages .chat-msg.out {
    background: rgba(8, 8, 8, 0.85);
    color: rgba(245, 240, 232, 0.90);
    border: 1px solid rgba(255, 248, 235, 0.10);
    box-shadow: 0 0 14px rgba(255, 248, 235, 0.07);
}

.chat-view-input {
    padding: 16px 24px;
    border-top: 1px solid rgba(232, 220, 200, 0.08);
    background: rgba(6, 6, 6, 0.30);
}

/* ============================================================
   ALEYNA PULSE ANİMASYONU
   ============================================================ */

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.40; }
}

/* ============================================================
   BLAST ANIMATION SYSTEM — orijinal animasyonlar korunuyor
   ============================================================ */

.blast-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(4, 4, 4, 0.82);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: overlayFadeIn 0.25s ease forwards;
}
@keyframes overlayFadeIn { from { opacity: 0; } to { opacity: 1; } }

.blast-bubble {
  position: fixed; inset: 0; z-index: 910;
  display: flex; align-items: center; justify-content: center;
}
.blast-bubble__card {
  background: linear-gradient(135deg, rgba(201, 185, 154, 0.10), rgba(232, 220, 200, 0.06));
  border: 1px solid rgba(232, 220, 200, 0.16);
  border-radius: 24px; padding: 40px 48px; min-width: 340px; max-width: 420px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(232, 220, 200, 0.10), 0 24px 64px rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  animation: bubbleBounceIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes bubbleBounceIn {
  0%   { transform: scale(0);    opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  80%  { transform: scale(0.97); }
  100% { transform: scale(1); }
}
.blast-bubble__icon  { font-size: 56px; line-height: 1; margin-bottom: 16px; display: block; animation: iconWiggle 0.6s 0.45s ease both; }
@keyframes iconWiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.blast-bubble__title { font-size: 1.35rem; font-weight: 700; color: var(--cream-50); margin: 0 0 8px; }
.blast-bubble__desc  { font-size: 0.88rem; color: var(--cream-400); margin: 0 0 32px; }
.blast-bubble__actions { display: flex; gap: 12px; justify-content: center; }

.blast-btn--confirm {
  position: relative; padding: 12px 28px; border: none; border-radius: 14px;
  font-size: 0.95rem; font-weight: 700; color: #fff; cursor: pointer; overflow: hidden;
  background: linear-gradient(135deg, #c4897a, #a86955, #8c5248);
  box-shadow: 0 4px 20px rgba(176, 120, 104, 0.50);
  transition: transform 0.15s, box-shadow 0.15s;
  animation: confirmPulse 2s 1s ease-in-out infinite;
}
.blast-btn--confirm::after {
  content: ''; position: absolute; top: -50%; left: -75%; width: 50%; height: 200%;
  background: rgba(255, 255, 255, 0.15); transform: skewX(-20deg);
  animation: shimmer 2.4s 1.2s ease-in-out infinite;
}
@keyframes shimmer { 0% { left: -75%; } 60%, 100% { left: 130%; } }
@keyframes confirmPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(176, 120, 104, 0.50), 0 0 0 0 rgba(176, 120, 104, 0.35); }
  50%       { box-shadow: 0 4px 20px rgba(176, 120, 104, 0.50), 0 0 0 8px rgba(176, 120, 104, 0); }
}
.blast-btn--confirm:hover  { transform: translateY(-2px) scale(1.03); }
.blast-btn--confirm:active { transform: scale(0.96); }

.blast-btn--cancel {
  padding: 12px 24px; border-radius: 14px; font-size: 0.92rem; font-weight: 600;
  color: var(--cream-300); background: transparent;
  border: 1px solid rgba(232, 220, 200, 0.16); cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}
.blast-btn--cancel:hover {
  color: var(--cream-50);
  border-color: rgba(232, 220, 200, 0.36);
  background: rgba(232, 220, 200, 0.06);
}

.card-shake { animation: cardShake 0.30s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes cardShake {
  0%   { transform: translateX(0); }
  15%  { transform: translateX(-6px) rotate(-1.5deg); }
  30%  { transform: translateX(6px)  rotate(1.5deg); }
  45%  { transform: translateX(-5px) rotate(-1deg); }
  60%  { transform: translateX(4px)  rotate(1deg); }
  75%  { transform: translateX(-3px) rotate(-0.5deg); }
  88%  { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

.card-explode { animation: cardExplode 0.5s cubic-bezier(0.55, 0, 1, 0.45) forwards; pointer-events: none; }
@keyframes cardExplode {
  0%   { transform: scale(1)    rotate(0deg);  opacity: 1; filter: brightness(1); }
  30%  { transform: scale(1.15) rotate(3deg);  opacity: 1; filter: brightness(1.6); }
  55%  { transform: scale(0.85) rotate(8deg);  opacity: 0.7; filter: brightness(2); }
  100% { transform: scale(0)    rotate(15deg); opacity: 0; filter: brightness(3); }
}

.blast-particle {
  position: fixed; width: 8px; height: 8px; border-radius: 50%;
  pointer-events: none; z-index: 9999;
  animation: particleFly 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes particleFly {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  70%  { opacity: 0.8; }
  100% { transform: translate(var(--tx, 60px), var(--ty, -60px)) scale(0.2); opacity: 0; }
}
.blast-particle--purple { background: var(--cream-100); box-shadow: 0 0 6px var(--cream-100); }
.blast-particle--pink   { background: var(--cream-200); box-shadow: 0 0 6px var(--cream-200); }
.blast-particle--red    { background: var(--status-lost); box-shadow: 0 0 6px var(--status-lost); }
.blast-particle--rose   { background: #d4987a; box-shadow: 0 0 6px #d4987a; }
.blast-particle--violet { background: var(--cream-300); box-shadow: 0 0 6px var(--cream-300); }
.blast-particle--fuchsia{ background: var(--cream-50);  box-shadow: 0 0 6px var(--cream-50); }

.blast-toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(201, 185, 154, 0.14), rgba(232, 220, 200, 0.09));
  border: 1px solid rgba(232, 220, 200, 0.22);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(232, 220, 200, 0.12);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: var(--cream-50); font-size: 0.9rem; font-weight: 600;
  animation:
    toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
    toastFadeOut 0.35s 2.2s ease forwards;
}
@keyframes toastSlideIn { from { transform: translateX(calc(100% + 28px)); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastFadeOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(16px); opacity: 0; } }

/* ============================================================
   AI AGENT (NORA) CHAT
   ============================================================ */

.agent-chat-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    border-radius: 16px;
    overflow: hidden;
}

.agent-chat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--panel-border-strong);
    flex-shrink: 0;
}

.agent-chat-header .agent-avatar {
    width: 44px;
    height: 44px;
    background: var(--white-subtle);
    border: 1px solid var(--panel-border-strong);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.agent-chat-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.agent-chat-header p {
    font-size: 12px;
    color: var(--text-muted);
}

.agent-chat-header .btn-icon {
    margin-left: auto;
}

.agent-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agent-msg {
    display: flex;
    max-width: 80%;
}

.agent-msg-ai {
    align-self: flex-start;
}

.agent-msg-user {
    align-self: flex-end;
}

.agent-msg span {
    display: block;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.agent-msg-ai span {
    background: var(--black-raised);
    border: 1px solid var(--panel-border-strong);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.agent-msg-user span {
    background: rgba(232, 220, 200, 0.12);
    border: 1px solid var(--panel-border-strong);
    color: var(--cream-50);
    border-bottom-right-radius: 4px;
}

.agent-typing span {
    color: var(--text-muted) !important;
    font-style: italic;
}

.agent-input-bar {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--panel-border-strong);
    flex-shrink: 0;
}

.agent-input-bar input {
    flex: 1;
    background: var(--black-raised);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.agent-input-bar input:focus {
    border-color: var(--panel-border-strong);
    box-shadow: var(--glow-sm);
}

.agent-input-bar input::placeholder {
    color: var(--text-muted);
}
