﻿/* ===== DGM Lead CRM - Design System (Light / Navy Theme) ===== */
:root {
    /* Ana Renkler */
    --navy:          #1e3a5f;
    --navy-dark:     #0f2744;
    --navy-light:    #2a4f7c;
    --navy-faint:    rgba(30, 58, 95, 0.07);

    /* Arka Plan */
    --bg-primary:    #c2d2e4;
    --bg-secondary:  #ffffff;
    --bg-card:       #ffffff;
    --bg-card-hover: #f0f6fc;

    /* Kenarlıklar */
    --border:        #a3bcd4;
    --border-hover:  #6e9ab8;

    /* Yazılar */
    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;

    /* Accent – Mavi */
    --accent:         #2563eb;
    --accent-glow:    rgba(37, 99, 235, 0.15);
    --accent-hover:   #1d4ed8;
    --primary:        var(--accent);  /* alias — UX modüllerinde kullanılıyor */
    --accent-light:   rgba(37, 99, 235, 0.1);

    /* Yardımcı – Kırmızı */
    --red:            #dc2626;
    --red-light:      rgba(220, 38, 38, 0.1);
    --red-hover:      #b91c1c;

    /* Durum */
    --success:        #16a34a;
    --success-light:  rgba(22, 163, 74, 0.1);
    --warning:        #d97706;
    --warning-light:  rgba(217, 119, 6, 0.1);
    --danger:         var(--red);

    --sidebar-w:  240px;
    --radius:     12px;
    --radius-sm:  8px;
    --radius-lg:  16px;  /* UX modülleri için */
    --shadow-sm:  0 2px 10px rgba(0,0,0,0.14), 0 1px 4px rgba(0,0,0,0.09);
    --shadow:     0 6px 20px rgba(0,0,0,0.16), 0 3px 8px rgba(0,0,0,0.09);
    --shadow-lg:  0 14px 36px rgba(0,0,0,0.16), 0 5px 14px rgba(0,0,0,0.10);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;   /* iOS Safari adres çubuğu kırpmasını önler */
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    background: var(--navy-dark);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
}
.sidebar-logo {
    padding: 0 20px;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: var(--navy);
}
.logo-icon {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.8rem; color: #fff;
}
.logo-text { font-weight: 700; font-size: 1rem; color: #ffffff; letter-spacing: 0.3px; }

.sidebar-nav { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500; font-size: 0.88rem;
    cursor: pointer;
}
.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}
.nav-item.active {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    box-shadow: inset 3px 0 0 var(--accent);
}
.nav-item .material-icons-round { font-size: 1.2rem; flex-shrink: 0; }
.sidebar-footer {
    padding: 10px 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ===== Main Content ===== */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-width: 0;
    padding: 0 0 env(safe-area-inset-bottom, 0px) 0;  /* alt home çubuğu boşluğu */
    min-height: 100vh;
    min-height: 100dvh;
}

/* Header */
.top-header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 16px;
    padding: 0 28px;
    min-height: 64px;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 3px 12px rgba(0,0,0,0.10);
}
.menu-toggle { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; }
.page-title { font-size: 1.3rem; font-weight: 700; flex: 1; color: var(--text-primary); }
.header-actions { display: flex; gap: 8px; }

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 2px solid #7a9fc0;
    border-radius: var(--radius);
    padding: 24px;
    margin: 0 28px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); border-color: #5580a0; }
.card-title {
    font-size: 1rem; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 20px;
    color: var(--text-primary);
}
.card-title .material-icons-round { color: var(--accent); font-size: 1.2rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-header .card-title { margin-bottom: 0; }

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    padding: 20px 28px;
}
.stat-card {
    background: #f5f9ff;
    border: 2px solid #7a9fc0;
    border-radius: var(--radius);
    padding: 18px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: var(--transition);
    cursor: default;
}
.stat-card:hover { transform: translateY(-2px); background: #ffffff; box-shadow: var(--shadow); border-color: #3b6f9a; }
.stat-card.stat-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow); transform: translateY(-3px); }
.stat-icon {
    width: 46px; height: 46px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon .material-icons-round { font-size: 1.4rem; }
.stat-total   .stat-icon { background: var(--accent-light);   color: var(--accent); }
.stat-new     .stat-icon { background: var(--accent-light);   color: var(--navy); }
.stat-sent    .stat-icon { background: rgba(30,58,95,0.08);   color: var(--navy); }
.stat-replied .stat-icon { background: var(--warning-light);  color: var(--warning); }
.stat-meeting .stat-icon { background: var(--success-light);  color: var(--success); }
.stat-client  .stat-icon { background: var(--red-light);      color: var(--red); }
/* Lead Score stat kartları */
.stat-score   .stat-icon { background: rgba(22,163,74,0.12);  color: #16a34a; }
.stat-high    .stat-icon { background: rgba(234,179,8,0.12);  color: #b45309; }
.stat-mid     .stat-icon { background: rgba(249,115,22,0.12); color: #c2410c; }
.stat-low     .stat-icon { background: rgba(239,68,68,0.12);  color: #dc2626; }
.stat-value { font-size: 1.75rem; font-weight: 800; display: block; color: var(--text-primary); }
.stat-label { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: none; cursor: pointer;
    font-family: inherit; font-weight: 600; font-size: 0.85rem;
    transition: var(--transition);
    text-decoration: none;
}
.btn .material-icons-round { font-size: 1.05rem; }
.btn-primary {
    background: var(--navy);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--navy-light); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline {
    background: #f2f6fb;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; width: 100%; justify-content: center; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-hover); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ===== Forms ===== */
.form-group { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.form-group label { font-size: 0.78rem; color: var(--text-secondary); font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; }
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.flex-2 { flex: 2; }
.form-control {
    padding: 9px 13px;
    background: #f8fbff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit; font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
select.form-control option { color: var(--text-primary); background: #fff; }
textarea.form-control { resize: vertical; }

/* ===== Search Form ===== */
.search-form { display: flex; flex-direction: column; gap: 16px; }

/* ===== Results List — Responsive grid ===== */
.results-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-items: start;
}
@media (max-width: 1200px) { .results-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .results-list { grid-template-columns: 1fr; } }

/* Arama sonucu kartı */
.result-card {
    background: var(--bg-secondary);
    border: 2px solid #7a9fc0;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.result-card:hover { background: var(--bg-card-hover); border-color: #3b6f9a; box-shadow: var(--shadow); }
.result-card.result-dup { border-color: rgba(243,156,18,.4); background: rgba(243,156,18,.04); }
.result-card-header { margin-bottom: 8px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.result-name { font-weight: 700; font-size: 0.93rem; color: var(--text-primary); line-height: 1.35; flex: 1; min-width: 0; }

/* Aksiyon butonları */
.result-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.rca-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 11px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: #eef3f9;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}
/* Resting state renkleri */
.rca-web { color: #2563eb; border-color: #93b8f0; background: #eff5ff; }
.rca-map { color: #dc2626; border-color: #f0a0a0; background: #fff5f5; }
.rca-li  { color: #0a66c2; border-color: #93b8d8; background: #eff5ff; }
.rca-web:hover { color: #1d4ed8; border-color: var(--accent);  background: #dbeafe; }
.rca-map:hover { color: #b91c1c; border-color: #ea4335;        background: #fee2e2; }
.rca-li:hover  { color: #004182; border-color: #0a66c2;        background: #dbeafe; }
.rca-add {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    margin-left: auto;
}
.rca-add:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: scale(1.04); }

/* Detaylar */
.result-card-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.result-detail {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.result-detail .material-icons-round { font-size: 0.85rem; color: var(--text-muted); flex-shrink: 0; }

/* Footer */
.result-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Çakışma uyarısı */
.dup-warn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(243,156,18,.2);
    color: #f39c12;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 6px;
}
.dup-warn .material-icons-round { font-size: 13px; }

/* Dashboard recent-list (lead-row) — eskiden kalma, bozulmasın */
.recent-list { display: flex; flex-direction: column; gap: 8px; }
.lead-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    align-items: center; gap: 12px;
    padding: 13px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.lead-row:hover { background: var(--bg-card-hover); border-color: var(--border-hover); box-shadow: var(--shadow-sm); }

/* Lead cards — Responsive grid */
.leads-table-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-items: start;
}
@media (max-width: 1200px) {
    .leads-table-wrap { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .leads-table-wrap { grid-template-columns: 1fr; }
}
.lead-card {
    background: var(--bg-secondary);
    border: 2px solid #7a9fc0;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.lead-card:hover { background: var(--bg-card-hover); border-color: #3b6f9a; box-shadow: var(--shadow); }
.lead-card-header {
    margin-bottom: 8px;
}
.lead-name { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }

/* Aksiyon butonları — firma adının altında */
.lead-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.lca-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 11px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: #eef3f9;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}
.lca-btn .material-icons-round { font-size: 0.9rem; pointer-events: none; }
.lca-btn svg { width: 14px; height: 14px; pointer-events: none; }
/* Resting state — her buton rengini hemen göster */
.lca-analyze { color: #7c3aed; border-color: #c4b5fd; background: #f5f3ff; }
.lca-aiemail { color: #0ea5e9; border-color: #91d5f0; background: #f0f9ff; }
.lca-email   { color: #2563eb; border-color: #93b8f0; background: #eff5ff; }
.lca-wa      { color: #16a34a; border-color: #86c9a0; background: #f0faf3; }
.lca-edit    { color: #b45309; border-color: #e0b97a; background: #fffbf0; }
.lca-del     { color: #dc2626; border-color: #f0a0a0; background: #fff5f5; }
.lca-analyze:hover { background: #ede9fe; border-color: #7c3aed; color: #6d28d9; }
.lca-aiemail:hover { background: #e0f2fe; border-color: #0ea5e9; color: #0284c7; }
.lca-email:hover   { background: #dbeafe; border-color: var(--accent);   color: var(--accent); }
.lca-wa:hover      { background: #dcfce7; border-color: #25d366;         color: #15803d; }
.lca-edit:hover    { background: #fef3c7; border-color: var(--warning);  color: var(--warning); }
.lca-del:hover     { background: #fee2e2; border-color: var(--red);      color: var(--red); }
.lead-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.lead-detail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.lead-detail .material-icons-round { font-size: 0.9rem; color: var(--text-muted); }
.lead-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 10px;
}
.lead-card-footer .sector-badge { font-size: 0.7rem; padding: 3px 10px; }
.lead-card-footer .status-badge { font-size: 0.7rem; padding: 3px 10px; }
.lead-card-footer .lead-status-select {
    padding: 4px 8px;
    font-size: 0.75rem;
    max-width: 140px;
    margin-left: 0;
    order: -1;   /* Sola taşı */
}

/* Status badges */
.status-badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem; font-weight: 600;
    white-space: nowrap;
}
.status-yeni            { background: var(--accent-light);  color: var(--accent); }
.status-email_gonderildi{ background: rgba(30,58,95,0.1);   color: var(--navy); }
.status-yanit_alindi    { background: var(--warning-light); color: var(--warning); }
.status-toplanti        { background: var(--success-light); color: var(--success); }
.status-musteri_oldu    { background: var(--red-light);     color: var(--red); }
.status-reddetti        { background: rgba(100,116,139,0.1);color: #64748b; }
/* Aşama 7 — yeni pipeline statü rozetleri */
.status-ilk_iletisim    { background: rgba(139,92,246,0.12); color: #7c3aed; }
.status-donus_geldi     { background: rgba(16,185,129,0.14); color: #047857; }
.status-takip_maili_atildi { background: rgba(245,158,11,0.14); color: #b45309; }
.status-takip_ediliyor  { background: rgba(6,182,212,0.14);  color: #0e7490; }
.status-teklif_verildi  { background: rgba(245,158,11,0.14); color: #b45309; }
.status-muzakere        { background: rgba(6,182,212,0.14);  color: #0e7490; }
.status-sozlesme        { background: rgba(22,163,74,0.14);  color: #15803d; }
.status-reddedildi      { background: rgba(239,68,68,0.12);  color: #dc2626; }
.status-vekalet_alindi  { background: rgba(212,160,23,0.16); color: #b8860b; font-weight: 700; }
.status-yil_sonu_takip  { background: rgba(100,116,139,0.14); color: #475569; }

/* Kazanılanlar sekmesi */
.won-hero {
    display: flex; align-items: center; gap: 16px; padding: 20px 22px; margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(212,160,23,0.12), rgba(22,163,74,0.10));
    border: 1px solid rgba(212,160,23,0.3); border-radius: var(--radius-lg);
}
.won-hero > .material-icons-round { font-size: 2.6rem; color: #d4a017; }
.won-hero-count { font-size: 2rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.won-hero-label { font-size: 0.9rem; color: var(--text-secondary); margin-top: 2px; }
.won-card { border-left: 3px solid #d4a017; }

/* ===== FİRMA ARA — Lead Keşif ekranı ===== */
.search-layout { display: grid; grid-template-columns: 1fr 310px; gap: 16px; align-items: start; }
.search-main { min-width: 0; }
.search-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; }
.strategy-head { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.strategy-head .material-icons-round { font-size: 1.1rem; color: var(--primary); }
.strat-target { font-size: 0.82rem; font-weight: 700; color: var(--primary); background: var(--accent-light); padding: 7px 10px; border-radius: var(--radius); margin-bottom: 10px; }
.strat-row { display: flex; gap: 8px; margin-bottom: 11px; }
.strat-row .material-icons-round { font-size: 1.05rem; color: var(--text-muted); flex-shrink: 0; margin-top: 1px; }
.strat-row b { display: block; font-size: 0.78rem; color: var(--text-primary); }
.strat-row span { display: block; font-size: 0.78rem; color: var(--text-secondary); line-height: 1.45; }
.strat-empty { font-size: 0.8rem; color: var(--text-muted); }
.hist-item { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; margin-bottom: 6px; cursor: pointer; font-family: inherit; font-size: 0.8rem; color: var(--text-secondary); }
.hist-item:hover { border-color: var(--primary); color: var(--primary); }
.hist-item .material-icons-round { font-size: 1rem; }
.hist-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Boş ekran önerileri */
.search-empty-card { padding: 18px 20px; }
.se-title { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.se-title .material-icons-round { color: #f59e0b; }
.se-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.se-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px; font-size: 0.85rem; color: var(--text-primary); cursor: pointer; font-family: inherit; transition: all 0.15s; }
.se-chip:hover { border-color: var(--primary); color: var(--primary); }
.se-chip .material-icons-round { font-size: 1rem; color: var(--primary); }
.se-hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 14px; line-height: 1.5; }

/* Sonuç filtre barı */
.search-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 0 14px; }
.search-filter-bar .form-control { width: auto; min-width: 130px; font-size: 0.82rem; padding: 6px 10px; }
.sf-chip { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 0.8rem; cursor: pointer; font-family: inherit; color: var(--text-secondary); }
.sf-chip.active { background: var(--accent-light); border-color: var(--primary); color: var(--primary); font-weight: 600; }

/* Fırsat / kayıtlı etiketleri */
.opp-tag { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.opp-high { background: var(--success-light); color: var(--success); }
.opp-mid  { background: var(--warning-light); color: var(--warning); }
.opp-low  { background: rgba(100,116,139,0.12); color: #64748b; }
.saved-tag { font-size: 0.72rem; font-weight: 700; color: #15803d; background: #dcfce7; border-radius: 999px; padding: 2px 9px; margin-left: 6px; }
.result-saved { opacity: 0.82; }
.result-card .src-badge { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }

@media (max-width: 980px) {
    .search-layout { grid-template-columns: 1fr; }
    .search-side { position: static; flex-direction: row; flex-wrap: wrap; }
    .search-side > .card { flex: 1; min-width: 240px; }
}

/* Kutlama efekti (konfeti + kupa) */
.confetti-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 99999; overflow: hidden; }
.confetti-piece {
    position: absolute; top: -16px; opacity: 0.92;
    animation-name: confetti-fall; animation-timing-function: cubic-bezier(.3,.6,.5,1); animation-fill-mode: forwards;
}
@keyframes confetti-fall {
    0%   { transform: translateY(-20px) rotateZ(0deg); opacity: 1; }
    100% { transform: translateY(104vh) rotateZ(720deg); opacity: 0.85; }
}
.celebrate-trophy {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(0);
    font-size: 100px; line-height: 1; animation: trophy-grow 2.2s ease-in forwards;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,0.25));
}
/* Ortadan ufak başlar, büyüyerek tüm ekranı kaplar, sonra silinir */
@keyframes trophy-grow {
    0%   { transform: translate(-50%,-50%) scale(0.05) rotate(-15deg); opacity: 0; }
    12%  { opacity: 1; }
    70%  { opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(16) rotate(8deg); opacity: 0; }
}

.sector-badge {
    display: inline-flex; padding: 3px 10px;
    border-radius: 6px; font-size: 0.7rem; font-weight: 500;
    background: var(--navy-faint); color: var(--navy);
    white-space: nowrap;
}

/* ===== Lead Score Badge ===== */
.score-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 9px; border-radius: 20px;
    font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.02em; white-space: nowrap;
    flex-shrink: 0;
}
.score-high { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.score-mid  { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; }
.score-low  { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* Lead card header'da skor sağda */
.lead-card-header {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

/* Lead actions (eski sağ taraf — artık kullanılmıyor ama geriye uyumluluk) */
.lead-actions { display: flex; gap: 4px; }
.lead-actions button {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 5px;
    border-radius: 6px; transition: var(--transition);
}
.lead-actions button:hover { color: var(--navy); background: var(--navy-faint); }
.lead-actions .material-icons-round { font-size: 1.1rem; pointer-events: none; }

/* Müşteri kartı — Konum butonu */
.lead-location-btn {
    color: #ea4335 !important;
    font-weight: 700 !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.5px;
    border: 1px solid #ea4335;
    border-radius: 6px;
    padding: 1px 7px;
    text-decoration: none !important;
    transition: var(--transition);
}
.lead-location-btn:hover {
    background: #ea4335;
    color: #fff !important;
}

/* ===== Filters Bar ===== */
.filters-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filters-bar .form-control { max-width: 220px; }

/* ===== Email Layout ===== */
.email-layout { display: flex; flex-direction: column; gap: 0; }
.email-preview { margin-top: 8px; }
.email-subject, .email-to {
    padding: 10px 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-primary);
}
.email-body {
    padding: 20px;
    line-height: 1.7;
    white-space: pre-wrap;
    min-height: 200px;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.email-body:focus { background: rgba(37,99,235,0.02); }
.email-actions { display: flex; gap: 8px; }

/* ===== Guide ===== */
.guide-intro { color: var(--text-secondary); margin-bottom: 20px; }
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}
.guide-card {
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.guide-card:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow); }
.guide-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.guide-card h3 { font-size: 0.92rem; margin-bottom: 4px; color: var(--text-primary); }
.guide-card p { font-size: 0.8rem; color: var(--text-secondary); }

/* ===== Loading ===== */
.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(240, 244, 248, 0.85);
    backdrop-filter: blur(6px);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 200; gap: 20px;
}
.loading-overlay p { color: var(--text-secondary); font-size: 0.95rem; }
.spinner {
    width: 44px; height: 44px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Arama radar animasyonu ===== */
.radar { position: relative; width: 130px; height: 130px; }
.radar-core {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
    width: 48px; height: 48px; border-radius: 50%; z-index: 2;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px var(--accent-glow);
    animation: radar-bob 1.6s ease-in-out infinite;
}
.radar-core .material-icons-round { font-size: 1.5rem; }
.radar-ring {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(0);
    width: 130px; height: 130px; border-radius: 50%;
    border: 2px solid var(--accent); opacity: 0;
    animation: radar-pulse 2.4s ease-out infinite;
}
.radar-ring:nth-child(2) { animation-delay: 0.8s; }
.radar-ring:nth-child(3) { animation-delay: 1.6s; }
.radar-sweep {
    position: absolute; inset: 0; border-radius: 50%; z-index: 1;
    background: conic-gradient(from 0deg, transparent 0deg, var(--accent-glow) 40deg, var(--accent) 60deg, transparent 60deg);
    -webkit-mask: radial-gradient(circle, transparent 22px, #000 23px);
            mask: radial-gradient(circle, transparent 22px, #000 23px);
    animation: spin 2s linear infinite; opacity: 0.55;
}
@keyframes radar-pulse {
    0%   { transform: translate(-50%,-50%) scale(0.25); opacity: 0.7; }
    100% { transform: translate(-50%,-50%) scale(1); opacity: 0; }
}
@keyframes radar-bob {
    0%,100% { transform: translate(-50%,-50%) scale(1); }
    50%     { transform: translate(-50%,-50%) scale(1.08); }
}
.search-loading-title { font-size: 1.15rem; font-weight: 700; color: var(--text-primary) !important; margin: 0; }
.search-loading-msg {
    font-size: 0.92rem; color: var(--accent) !important; font-weight: 600; margin: 0;
    min-height: 1.2em; animation: msg-fade 0.4s ease;
}
.search-loading-sub { font-size: 0.82rem; color: var(--text-muted) !important; margin: 0; }
@keyframes msg-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ===== AI "analiz ediliyor" animasyonu ===== */
.ai-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 32px 16px; }
.ai-orb {
    position: relative; width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    box-shadow: 0 0 0 0 var(--accent-glow);
    animation: ai-orb-pulse 1.6s ease-in-out infinite;
}
.ai-orb .material-icons-round { font-size: 1.8rem; animation: ai-orb-spin 3s ease-in-out infinite; }
@keyframes ai-orb-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.35); transform: scale(1); }
    50%     { box-shadow: 0 0 0 16px rgba(37,99,235,0); transform: scale(1.06); }
}
@keyframes ai-orb-spin { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
.ai-loader-text { font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); display: inline-flex; align-items: center; }
.ai-dots { display: inline-flex; gap: 3px; margin-left: 4px; }
.ai-dots i {
    width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block;
    animation: ai-dot 1.2s ease-in-out infinite;
}
.ai-dots i:nth-child(2) { animation-delay: 0.2s; }
.ai-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-dot { 0%,100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }

/* ===== Temalı onay modalı ===== */
.ui-confirm-overlay {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(15,39,68,0.45); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    animation: ui-ov-in 0.15s ease;
}
.ui-confirm-overlay.closing { opacity: 0; transition: opacity 0.15s ease; }
@keyframes ui-ov-in { from { opacity: 0; } to { opacity: 1; } }
.ui-confirm {
    background: var(--bg-primary); border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(15,39,68,0.3); width: 100%; max-width: 400px;
    padding: 26px 24px 20px; text-align: center;
    animation: ui-box-in 0.2s cubic-bezier(.2,1.1,.4,1);
}
@keyframes ui-box-in { from { transform: scale(0.9) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.ui-confirm-icon {
    width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-light); color: var(--accent);
}
.ui-confirm-icon .material-icons-round { font-size: 1.7rem; }
.ui-confirm-icon.danger { background: var(--red-light); color: var(--red); }
.ui-confirm-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.ui-confirm-msg { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.55; margin-bottom: 20px; }
.ui-confirm-actions { display: flex; gap: 10px; justify-content: center; }
.ui-confirm-actions .btn { min-width: 110px; justify-content: center; }
.ui-confirm-danger { background: var(--red); color: #fff; border: 1px solid var(--red); }
.ui-confirm-danger:hover { filter: brightness(0.93); }

/* ===== Modal ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 39, 68, 0.45);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 300;
}
.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 90%; max-width: 600px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
    border-radius: var(--radius) var(--radius) 0 0;
}
.modal-header h2 { font-size: 1rem; color: var(--text-primary); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--red); }
.modal-body { padding: 24px; }
.modal-footer { padding: 14px 24px; display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--border); background: var(--bg-primary); border-radius: 0 0 var(--radius) var(--radius); }

/* ===== Toast ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 400; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 12px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px;
    animation: toastIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }

/* Tab content */
.tab-content { display: none; padding-top: 8px; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }

/* Empty state */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .material-icons-round { font-size: 3rem; margin-bottom: 12px; display: block; }

/* ===== Meeting Cards ===== */
.meeting-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    transition: var(--transition);
    border-left: 4px solid var(--success);
    box-shadow: var(--shadow-sm);
}
.meeting-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow); }
.meeting-card.meeting-past { opacity: 0.55; border-left-color: var(--text-muted); }
.meeting-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
.meeting-info h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.meeting-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.meeting-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.meeting-meta .material-icons-round { font-size: 0.95rem; color: var(--text-muted); }
.meeting-countdown {
    background: linear-gradient(135deg, var(--accent-light), var(--navy-faint));
    border-radius: var(--radius-sm);
    padding: 16px;
    border: 1px solid var(--border);
}
.countdown-boxes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.countdown-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.cd-val {
    font-size: 1.7rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--navy);
    line-height: 1;
}
.cd-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}
.countdown-sep {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.countdown-past {
    text-align: center;
    color: var(--red);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: none;
        padding-top: env(safe-area-inset-top, 20px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0,0,0,0.25);
    }
    body.sidebar-open::after {
        content: '';
        position: fixed; inset: 0;
        background: rgba(15,39,68,0.4);
        z-index: 99;
    }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }

    .sidebar-logo { padding: 16px 20px; min-height: 60px; }
    .sidebar-nav { padding: 8px; gap: 4px; overflow-y: auto; flex: 1; }
    .nav-item { padding: 13px 18px; font-size: 0.95rem; min-height: 48px; border-radius: 10px; }
    .nav-item .material-icons-round { font-size: 1.4rem; }
    .sidebar-footer { padding: 12px 8px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }

    .top-header {
        padding: 10px 14px;
        padding-top: calc(10px + env(safe-area-inset-top, 0px));
        gap: 10px;
    }
    .page-title { font-size: 1.05rem; }
    .header-actions { gap: 4px; }
    .header-actions .btn-sm { padding: 5px 8px; font-size: 0.7rem; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); padding: 10px 12px; gap: 10px; }
    .stat-card { padding: 13px 12px; gap: 10px; }
    .stat-icon { width: 38px; height: 38px; }
    .stat-icon .material-icons-round { font-size: 1.2rem; }
    .stat-value { font-size: 1.35rem; }
    .stat-label { font-size: 0.7rem; }

    .card { margin: 0 10px 10px; padding: 14px; }
    .card-title { font-size: 0.92rem; gap: 6px; }
    .card-header { flex-direction: column; align-items: flex-start; gap: 10px; }

    .form-row { flex-direction: column; gap: 12px; }
    .form-control { padding: 10px 12px; font-size: 0.9rem; }
    .search-form { gap: 12px; }

    .btn { padding: 10px 14px; font-size: 0.85rem; }
    .btn-lg { padding: 12px 20px; }
    .btn-sm { padding: 6px 10px; }

    .filters-bar { flex-direction: column; gap: 8px; }
    .filters-bar .form-control { max-width: 100%; }

    .lead-card { padding: 12px; }
    .lead-card-details { gap: 8px; }
    .lead-detail { font-size: 0.75rem; }
    .lead-card-footer { gap: 6px; }
    .lead-card-footer .lead-status-select { max-width: 120px; order: -1; }
    .lead-card-actions { gap: 5px; }
    .lca-btn { padding: 3px 8px; font-size: 0.7rem; }
    .lead-actions button { padding: 8px; }
    .lead-actions .material-icons-round { font-size: 1.3rem; }

    .result-card-actions { gap: 5px; }
    .rca-btn { padding: 3px 8px; font-size: 0.7rem; }
    .result-detail { font-size: 0.74rem; }

    .modal { width: 95%; max-height: 90vh; overflow-y: auto; }
    .modal-header { padding: 13px 16px; }
    .modal-body { padding: 16px; }
    .modal-footer { padding: 12px 16px; }

    .email-actions { flex-direction: column; gap: 6px; }
    .email-body { min-height: 150px; font-size: 0.85rem; padding: 14px; }
    .email-subject, .email-to { padding: 8px 12px; font-size: 0.85rem; }

    .guide-grid { grid-template-columns: 1fr; }
    .toast-container { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); right: 12px; left: 12px; }
    .toast { font-size: 0.8rem; padding: 10px 14px; }
    .recent-list .lead-row { grid-template-columns: 1fr !important; }
    .empty-state { padding: 30px 16px; }
    .empty-state .material-icons-round { font-size: 2.5rem; }
}

@media (max-width: 400px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { flex-direction: row; }
    .top-header { padding: 8px 10px; }
    .page-title { font-size: 0.95rem; }
    .card { margin: 0 6px 8px; padding: 12px; }
}

/* ===== Kredi Rozeti ===== */
.credit-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--navy-faint);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.82rem; font-weight: 700;
    color: var(--navy);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.credit-badge:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
.credit-badge .material-icons-round { font-size: 1rem; }
.credit-badge.low { background: var(--red-light); border-color: var(--red); color: var(--red); }

/* ===== Kredi Paketleri ===== */
.credit-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.credit-pkg {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-secondary);
    position: relative;
}
.credit-pkg:hover { border-color: var(--navy); box-shadow: var(--shadow); transform: translateY(-3px); }
.credit-pkg.featured { border-color: var(--accent); }
.credit-pkg.featured::before {
    content: 'En Popüler';
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: #fff;
    font-size: 0.7rem; font-weight: 700;
    padding: 3px 12px; border-radius: 20px;
}
.credit-pkg-icon { font-size: 2.5rem; margin-bottom: 8px; display: block; }
.credit-pkg-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.credit-pkg-desc { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 16px; }
.credit-pkg-amount { font-size: 2.2rem; font-weight: 800; color: var(--navy); line-height: 1; }
.credit-pkg-amount span { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.credit-pkg-price {
    display: inline-block;
    background: var(--navy);
    color: #fff;
    font-size: 1.1rem; font-weight: 700;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
    transition: var(--transition);
}
.credit-pkg:hover .credit-pkg-price { background: var(--navy-light); }
.credit-pkg.featured .credit-pkg-price { background: var(--accent); }

/* ===== Hızlı Arama Şablonları ===== */
.quick-templates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 0 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.qt-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 4px;
}
.qt-btn {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}
.qt-btn:hover, .qt-btn.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}
@media (max-width: 600px) { .qt-label { display: none; } }

/* ===== Deneme Süresi Banneri ===== */
.trial-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    font-size: 0.95rem;
}
.trial-banner .material-icons-round { font-size: 2rem; flex-shrink: 0; }
.trial-banner strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.trial-banner span { font-size: 0.85rem; opacity: 0.9; }

/* ===== Kredi Geçmişi ===== */
.credit-history { display: flex; flex-direction: column; gap: 0; }
.credit-history-item {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--border);
}
.credit-history-item:last-child { border-bottom: none; }
.credit-hist-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.credit-hist-icon.plus  { background: var(--success-light); color: var(--success); }
.credit-hist-icon.minus { background: var(--red-light);     color: var(--red); }
.credit-hist-icon .material-icons-round { font-size: 1.1rem; }
.credit-hist-desc { flex: 1; font-size: 0.85rem; color: var(--text-primary); }
.credit-hist-desc small { display: block; color: var(--text-muted); font-size: 0.75rem; margin-top: 1px; }
.credit-hist-amount { font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.credit-hist-amount.plus  { color: var(--success); }
.credit-hist-amount.minus { color: var(--red); }

/* ===== Chat ===== */
.chat-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    padding: 0 28px 28px;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.chat-bubble {
    max-width: 78%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.chat-bubble.user {
    background: var(--navy);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chat-bubble.assistant {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}
.chat-bubble.typing {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    align-self: flex-start;
    padding: 14px 18px;
}
.typing-dots { display: flex; gap: 5px; }
.typing-dots span {
    width: 7px; height: 7px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-6px); opacity: 1; }
}
.chat-bubble-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: right;
}
.chat-bubble.user .chat-bubble-meta { color: rgba(255,255,255,0.6); }

.chat-input-area {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 14px 14px 14px 20px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    transition: border-color 0.25s, box-shadow 0.25s;
}
.chat-input-area:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12), 0 4px 20px rgba(0,0,0,0.08);
}
.chat-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text-primary);
    background: transparent;
    resize: none;
    max-height: 140px;
    min-height: 24px;
    line-height: 1.6;
    padding: 2px 0;
}
.chat-input::placeholder { color: var(--text-muted); }
.chat-send-btn {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 13px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 3px 10px rgba(37,99,235,0.4);
}
.chat-send-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: scale(1.07);
    box-shadow: 0 6px 18px rgba(37,99,235,0.48);
}
.chat-send-btn:active { transform: scale(0.96); }
.chat-send-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.chat-send-btn .material-icons-round { font-size: 1.2rem; }

/* ===== Chat Welcome — Claude.ai tarzı karşılama ===== */
.chat-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 24px 16px;
    animation: fadeIn 0.5s ease;
}

/* AI Logo */
.ai-logo-wrap {
    width: 88px;
    height: 88px;
    margin-bottom: 18px;
    position: relative;
}
.ai-logo-svg {
    width: 88px;
    height: 88px;
    filter: drop-shadow(0 6px 20px rgba(37, 99, 235, 0.45));
    animation: aiLogoFloat 4s ease-in-out infinite;
}
@keyframes aiLogoFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33%       { transform: translateY(-5px) rotate(1deg); }
    66%       { transform: translateY(-3px) rotate(-1deg); }
}

/* Logo marka yazısı */
.ai-logo-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
}
.ai-brand-dgm {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.5px;
}
.ai-brand-badge {
    font-size: 0.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    color: #fff;
    border-radius: 8px;
    padding: 3px 8px;
    letter-spacing: 0.5px;
}
.ai-brand-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Büyük selamlama metni */
.chat-greeting {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.chat-subline {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 420px;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Öneri butonları */
.chat-suggestions {
    display: flex; flex-wrap: wrap; gap: 10px;
    justify-content: center;
    max-width: 560px;
}
.chat-suggestion-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}
.chat-suggestion-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Kredi yoksa uyarı banner */
.no-credits-banner {
    background: var(--red-light);
    border: 1px solid var(--red);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex; align-items: center; gap: 10px;
    font-size: 0.85rem; color: var(--red);
    margin-bottom: 12px;
}
.no-credits-banner .material-icons-round { font-size: 1.2rem; flex-shrink: 0; }
.no-credits-banner a { color: var(--red); font-weight: 700; cursor: pointer; text-decoration: underline; }

@media (max-width: 768px) {
    .chat-wrap { padding: 0 10px 14px; height: calc(100vh - 56px); }
    .chat-bubble { max-width: 90%; font-size: 0.85rem; }
    .credit-packages { grid-template-columns: 1fr; }
}

/* ===== Tema Geçiş Butonu ===== */
.theme-toggle-btn {
    width: 36px; height: 36px;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}
.theme-toggle-btn .material-icons-round { font-size: 1.2rem; }

/* ===== Karanlık Mod ===== */
[data-theme="dark"] {
    --bg-primary:    #0f172a;
    --bg-secondary:  #1e293b;
    --bg-card:       #1e293b;
    --bg-card-hover: #263348;
    --border:        #334155;
    --border-hover:  #475569;
    --text-primary:  #f1f5f9;
    --text-secondary:#94a3b8;
    --text-muted:    #64748b;
    --navy-faint:    rgba(37, 99, 235, 0.12);
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow:     0 4px 12px rgba(0,0,0,0.3), 0 2px 6px rgba(0,0,0,0.2);
    --shadow-lg:  0 10px 30px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.25);
}
[data-theme="dark"] body { background: var(--bg-primary); color: var(--text-primary); }
[data-theme="dark"] .card { background: var(--bg-card); border: 1.5px solid var(--border); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .form-control {
    background: #263348;
    border-color: var(--border);
    color: var(--text-primary);
}
[data-theme="dark"] .form-control:focus { border-color: var(--accent); background: #1e293b; }
[data-theme="dark"] .top-header { background: #1e293b; border-bottom-color: var(--border); }
[data-theme="dark"] .btn-outline {
    border-color: var(--border);
    background: transparent;
    color: var(--text-secondary);
}
[data-theme="dark"] .btn-outline:hover { background: var(--border); color: var(--text-primary); }
[data-theme="dark"] .result-card,
[data-theme="dark"] .lead-card { background: var(--bg-card); border: 1.5px solid var(--border); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .result-card:hover,
[data-theme="dark"] .lead-card:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }
[data-theme="dark"] .rca-btn,
[data-theme="dark"] .rca-web,
[data-theme="dark"] .rca-map,
[data-theme="dark"] .rca-li  { border-color: var(--border); background: transparent; color: var(--text-muted); }
[data-theme="dark"] .rca-web:hover { color: #93c5fd; border-color: #3b82f6; background: rgba(37,99,235,.12); }
[data-theme="dark"] .rca-map:hover { color: #f87171; border-color: #ef4444; background: rgba(239,68,68,.1); }
[data-theme="dark"] .rca-li:hover  { color: #60a5fa; border-color: #3b82f6; background: rgba(10,102,194,.1); }
[data-theme="dark"] .result-card-details { border-bottom-color: var(--border); }
[data-theme="dark"] .stat-card { background: var(--bg-card); border: 1.5px solid var(--border); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .modal { background: #1e293b; border-color: var(--border); }
[data-theme="dark"] .modal-header { border-bottom-color: var(--border); }
[data-theme="dark"] .modal-footer { border-top-color: var(--border); }
[data-theme="dark"] .emailLeadDropdown,
[data-theme="dark"] #emailLeadDropdown { background: #1e293b !important; border-color: var(--border) !important; }
[data-theme="dark"] .credit-history-item { border-bottom-color: var(--border); }
[data-theme="dark"] .chat-bubble.assistant { background: #263348; color: var(--text-primary); }
[data-theme="dark"] .chat-input { background: transparent; color: var(--text-primary); }
[data-theme="dark"] .chat-input-area {
    background: #1a2540;
    border-color: #2d4060;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
[data-theme="dark"] .chat-input-area:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15), 0 4px 20px rgba(0,0,0,0.3);
}
[data-theme="dark"] .guide-card { background: var(--bg-card); border-color: var(--border); color: var(--text-primary); }
[data-theme="dark"] .guide-card:hover { background: var(--bg-card-hover); }
[data-theme="dark"] .filters-bar { background: var(--bg-card); border-color: var(--border); }
[data-theme="dark"] .dash-widget { background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%); }
[data-theme="dark"] select option { background: #1e293b; color: var(--text-primary); }

/* ===== Gece Modu: Lacivert → Beyaz renk düzeltmeleri ===== */
/* Sektör rozeti */
[data-theme="dark"] .sector-badge {
    background: rgba(37, 99, 235, 0.18);
    color: #ffffff;
}
/* Score badge — dark mode */
[data-theme="dark"] .score-high { background: rgba(22,163,74,0.2);  color: #4ade80; border-color: rgba(22,163,74,0.4); }
[data-theme="dark"] .score-mid  { background: rgba(234,88,12,0.2);  color: #fb923c; border-color: rgba(234,88,12,0.4); }
[data-theme="dark"] .score-low  { background: rgba(220,38,38,0.2);  color: #f87171; border-color: rgba(220,38,38,0.4); }
/* Durum rozetleri – e-posta gönderildi */
[data-theme="dark"] .status-email_gonderildi {
    background: rgba(37, 99, 235, 0.15);
    color: #93c5fd;
}
/* Stat kart ikonları (yeni / gönderildi) */
[data-theme="dark"] .stat-new .stat-icon,
[data-theme="dark"] .stat-sent .stat-icon {
    background: rgba(37, 99, 235, 0.15);
    color: #93c5fd;
}
/* Büyük sayı değerleri (kredi sayacı vb.) */
[data-theme="dark"] .cd-val {
    color: #f1f5f9;
}
/* Üst bar kredi rozeti */
[data-theme="dark"] .credit-badge {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
    color: #93c5fd;
}
/* Kredi paketi fiyat rakamları */
[data-theme="dark"] .credit-pkg-amount {
    color: #f1f5f9;
}
/* Lead aksiyonları hover (eski) */
[data-theme="dark"] .lead-actions button:hover {
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.15);
}
/* Yeni lca butonları gece modu */
[data-theme="dark"] .lca-btn,
[data-theme="dark"] .lca-analyze,
[data-theme="dark"] .lca-aiemail,
[data-theme="dark"] .lca-email,
[data-theme="dark"] .lca-wa,
[data-theme="dark"] .lca-edit,
[data-theme="dark"] .lca-del {
    border-color: var(--border);
    background: transparent;
    color: var(--text-muted);
}
[data-theme="dark"] .lca-analyze:hover { color: #c4b5fd; border-color: #7c3aed; background: rgba(124,58,237,.12); }
[data-theme="dark"] .lca-aiemail:hover { color: #7dd3fc; border-color: #0ea5e9; background: rgba(14,165,233,.12); }
[data-theme="dark"] .lca-email:hover   { color: #93c5fd; border-color: #3b82f6; background: rgba(37,99,235,.12); }
[data-theme="dark"] .lca-wa:hover      { color: #4ade80; border-color: #22c55e; background: rgba(34,197,94,.1); }
[data-theme="dark"] .lca-edit:hover    { color: #fbbf24; border-color: #f59e0b; background: rgba(245,158,11,.1); }
[data-theme="dark"] .lca-del:hover     { color: #f87171; border-color: #ef4444; background: rgba(239,68,68,.1); }
/* Rehber kartı hover çerçevesi */
[data-theme="dark"] .guide-card:hover {
    border-color: #93c5fd;
}
/* AI sohbet öneri butonları */
[data-theme="dark"] .chat-suggestion-btn {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-secondary);
}
[data-theme="dark"] .chat-suggestion-btn:hover {
    border-color: #3b82f6;
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.12);
    transform: translateY(-2px);
}
/* AI Logo marka yazısı gece modu */
[data-theme="dark"] .ai-brand-dgm { color: #f1f5f9; }
[data-theme="dark"] .ai-brand-sub { color: var(--text-muted); }
[data-theme="dark"] .chat-greeting { color: #f1f5f9; }
[data-theme="dark"] .chat-subline  { color: var(--text-muted); }
/* Logo glow gece modunda daha parlak */
[data-theme="dark"] .ai-logo-svg {
    filter: drop-shadow(0 6px 24px rgba(59, 130, 246, 0.6));
}
/* Müşteri listesi kartı — WEB butonu */
.lead-web-btn {
    color: var(--accent) !important;
    font-weight: 700 !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.5px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 1px 7px;
    text-decoration: none !important;
    transition: var(--transition);
}
.lead-web-btn:hover {
    background: var(--accent);
    color: #fff !important;
}

/* AI Chat input kutusu — karşılama ekranında ortalanmış mod */
.chat-input-welcome {
    max-width: 660px;
    width: 100%;
    margin: 22px auto 26px;
    border-radius: 24px !important;
    box-shadow: 0 4px 28px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06) !important;
    padding: 16px 16px 16px 22px !important;
}
[data-theme="dark"] .chat-input-welcome {
    background: #1a2540 !important;
    border-color: #2d4060 !important;
    box-shadow: 0 4px 28px rgba(0,0,0,0.4) !important;
}

/* Firma kartı — WEB butonu */
.result-web-btn {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    color: var(--accent) !important;
    border-color: var(--accent) !important;
    padding: 4px 10px !important;
    min-width: unset;
}
.result-web-btn:hover {
    background: var(--accent) !important;
    color: #fff !important;
}
/* Firma kartı — Harita / Bayrak butonu */
.result-map-btn {
    font-size: 1.15rem !important;
    line-height: 1 !important;
    padding: 4px 8px !important;
    min-width: unset;
    border-color: var(--border) !important;
}
.result-map-btn:hover {
    background: var(--navy-faint) !important;
    transform: scale(1.1);
}

/* Arama kaynağı rozetleri (Maps / Apollo / Her İkisi) */
.src-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 6px;
    display: inline-block;
}
.src-badge-maps   { background: rgba(66,133,244,.15); color: #4285f4; }
.src-badge-apollo { background: rgba(30,58,95,.12);   color: var(--navy); }
.src-badge-both   { background: rgba(16,185,129,.15); color: #10b981; }
[data-theme="dark"] .src-badge-apollo {
    background: rgba(99,155,255,.15);
    color: #93c5fd;
}

/* ===== Dashboard Bilgi Widget'ı ===== */
.dash-widget {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    color: #fff;
    box-shadow: var(--shadow);
}
.dash-widget-left { display: flex; flex-direction: column; gap: 4px; }
.dash-greeting { font-size: 1.4rem; font-weight: 700; line-height: 1.2; }
.dash-clock { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-top: 2px; }
.dash-widget-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
}
.dash-weather, .dash-rates {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.1);
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}
.dash-rates { font-size: 0.85rem; }
@media (max-width: 600px) {
    .dash-widget { flex-direction: column; align-items: flex-start; }
    .dash-widget-right { align-items: flex-start; text-align: left; }
    .dash-greeting { font-size: 1.2rem; }
}

/* ===================================================================
   AI SATIŞ FIRSATI ANALİZİ — MODAL
   =================================================================== */

/* Overlay: modal kaydırılabilir olsun */
.analysis-overlay { align-items: flex-start; padding: 24px 16px; }

/* Modal kutusu */
.analysis-modal {
    max-width: 680px;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-radius: var(--radius-lg);
}

/* Başlık */
.analysis-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
}

/* Firma bilgi çubuğu */
.analysis-firm-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px;
    background: var(--navy-faint);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.analysis-firm-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
}
.analysis-firm-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.analysis-firm-meta span { display: flex; align-items: center; gap: 4px; }

/* İçerik alanı */
.analysis-content-wrap { padding: 20px; }

/* Loading / Empty state */
.analysis-loading {
    text-align: center;
    padding: 40px 20px;
}
.analysis-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.analysis-empty .material-icons-round {
    font-size: 48px;
    display: block;
    margin: 0 auto 12px;
    color: #c4b5fd;
}
.analysis-empty p { margin: 0 0 12px; color: var(--text-secondary); font-weight: 600; }

/* ── Fırsat Puanı Bloğu ─────────────────────────────────────────── */
.analysis-result { display: flex; flex-direction: column; gap: 12px; }

.analysis-score-block {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Dairesel skor göstergesi */
.analysis-score-ring {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 2px;
}
.analysis-score-ring::before {
    content: '';
    position: absolute;
    inset: 10px;
    background: var(--bg-card);
    border-radius: 50%;
    z-index: 1;
}
.analysis-score-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    line-height: 1.1;
}
.analysis-score-num  { font-size: 1.55rem; font-weight: 800; line-height: 1; }
.analysis-score-denom { font-size: 0.65rem; color: var(--text-muted); }

.analysis-score-desc { flex: 1; }
.analysis-score-label { font-size: 1.1rem; font-weight: 700; }
.analysis-score-sub   { font-size: 0.8rem; color: var(--text-muted); margin: 2px 0 8px; }

.analysis-web-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #2563eb;
    background: #eff5ff;
    border: 1px solid #93b8f0;
    border-radius: 20px;
    padding: 2px 10px;
    margin-bottom: 4px;
}
.analysis-web-badge .material-icons-round { font-size: 13px; }

.analysis-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.analysis-date .material-icons-round { font-size: 12px; }

/* ── 2'li Grid ──────────────────────────────────────────────────── */
.analysis-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Bölüm Kartı ────────────────────────────────────────────────── */
.analysis-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.analysis-section-full { grid-column: 1 / -1; }

.analysis-section-title {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--navy);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.analysis-section-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Liste (Argümanlar / Riskler) ───────────────────────────────── */
.analysis-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.analysis-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.analysis-list-green li .material-icons-round { color: #16a34a; font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.analysis-list-orange li .material-icons-round { color: #d97706; font-size: 17px; flex-shrink: 0; margin-top: 1px; }

/* ── İlk İletişim ───────────────────────────────────────────────── */
.analysis-contact .analysis-section-text {
    background: var(--navy-faint);
    border-left: 3px solid #7c3aed;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* ── Sonraki Aksiyon ────────────────────────────────────────────── */
.analysis-action-section { border-color: #7c3aed33; }
.analysis-action-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.6;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(99,102,241,0.06));
    border-radius: 8px;
    border-left: 4px solid #7c3aed;
}

/* ── Geçmiş Analiz Bar ──────────────────────────────────────────── */
.analysis-history-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--navy-faint);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.analysis-history-bar .material-icons-round { font-size: 16px; }

.analysis-history-list { display: none; }
.analysis-history-list.open { display: block; }

.analysis-history-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 8px;
    overflow: hidden;
}
.analysis-history-item summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.83rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    list-style: none;
    user-select: none;
}
.analysis-history-item summary::-webkit-details-marker { display: none; }
.analysis-history-item summary .material-icons-round { font-size: 16px; transition: transform 0.2s; }
.analysis-history-item[open] summary .material-icons-round { transform: rotate(180deg); }
.analysis-history-body { padding: 16px; }

/* ── Karanlık Mod ───────────────────────────────────────────────── */
[data-theme="dark"] .analysis-firm-bar    { background: rgba(15,39,68,0.7); }
[data-theme="dark"] .analysis-firm-name   { color: #f1f5f9; }
[data-theme="dark"] .analysis-score-block { background: var(--bg-card); }
[data-theme="dark"] .analysis-score-ring::before { background: var(--bg-card); }
[data-theme="dark"] .analysis-section     { background: var(--bg-card); }
[data-theme="dark"] .analysis-section-title { color: #e2e8f0; }
[data-theme="dark"] .analysis-contact .analysis-section-text { background: rgba(124,58,237,0.1); }
[data-theme="dark"] .analysis-action-text { color: #e2e8f0; }
[data-theme="dark"] .analysis-web-badge   { background: rgba(37,99,235,0.15); color: #93c5fd; border-color: #3b82f6; }
[data-theme="dark"] .analysis-history-item summary { background: var(--bg-secondary); }
[data-theme="dark"] .analysis-history-bar { background: rgba(15,39,68,0.5); }
[data-theme="dark"] .lca-analyze          { color: #c4b5fd; border-color: #7c3aed; background: rgba(124,58,237,0.12); }

/* ── Mobil ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .analysis-grid-2       { grid-template-columns: 1fr; }
    .analysis-score-block  { flex-direction: column; align-items: flex-start; gap: 12px; }
    .analysis-firm-bar     { flex-direction: column; align-items: flex-start; }
    .analysis-modal        { max-height: calc(100vh - 32px); }
    .analysis-overlay      { padding: 16px 8px; }
}

/* ===================================================================
   AI SATIŞ E-POSTASI — MODAL
   =================================================================== */
.emailgen-overlay { align-items: flex-start; padding: 24px 16px; }
.emailgen-modal {
    max-width: 720px;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-radius: var(--radius-lg);
}
.emailgen-modal-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }

.emailgen-firm-bar { padding: 14px 24px; border-bottom: 1px solid var(--border); }
.emailgen-firm-name { font-weight: 700; font-size: 1.02rem; color: var(--text-primary); }
.emailgen-firm-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 0.8rem; color: var(--text-muted); }

.emailgen-controls {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
    padding: 16px 24px; border-bottom: 1px solid var(--border);
}
.emailgen-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 150px; }
.emailgen-field label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.emailgen-field select {
    padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg-primary); color: var(--text-primary); font-size: 0.86rem;
}
.emailgen-run-btn { white-space: nowrap; }

.emailgen-content-wrap { padding: 20px 24px; }

.emailgen-result { display: flex; flex-direction: column; gap: 16px; }
.emailgen-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.emailgen-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 99px; font-size: 0.72rem; font-weight: 600;
}
.emailgen-tag .material-icons-round { font-size: 0.85rem; }
.emailgen-tag-type { background: #f0f9ff; color: #0284c7; }
.emailgen-tag-tone { background: #f5f3ff; color: #7c3aed; }
.emailgen-tag-ai   { background: #ecfdf5; color: #059669; }
.emailgen-tag-web  { background: #eff6ff; color: #2563eb; }

.emailgen-section { display: flex; flex-direction: column; gap: 6px; }
.emailgen-label { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); }
.emailgen-hint  { font-weight: 400; color: var(--text-muted); font-size: 0.74rem; }
.emailgen-subject-input,
.emailgen-body-input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--bg-primary);
    color: var(--text-primary); font-size: 0.9rem; font-family: inherit;
}
.emailgen-body-input { resize: vertical; line-height: 1.55; min-height: 220px; }
.emailgen-subject-input:focus,
.emailgen-body-input:focus { outline: none; border-color: #0ea5e9; }
.contact-linkedin-ai { color: #0a66c2; border-color: rgba(10,102,194,0.25); background: rgba(10,102,194,0.08); }
.linkedin-msg-input { min-height: 130px; }
.linkedin-alt-list .linkedin-alt-btn {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    text-align: left;
    line-height: 1.45;
    cursor: pointer;
}
.linkedin-alt-list .linkedin-alt-btn:hover { color: #0a66c2; }

.emailgen-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.emailgen-alt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.emailgen-alt-list li {
    display: flex; align-items: center; gap: 8px; font-size: 0.85rem;
    color: var(--text-secondary); padding: 6px 10px; background: var(--bg-secondary);
    border-radius: var(--radius);
}
.emailgen-alt-list .material-icons-round { font-size: 1rem; color: #0ea5e9; }

.emailgen-text { font-size: 0.86rem; line-height: 1.55; color: var(--text-secondary); }
.emailgen-prewrap { white-space: pre-wrap; }
.emailgen-followup  { background: #f0f9ff; border-radius: var(--radius); padding: 12px 14px; }
.emailgen-callnotes { background: #fffbeb; border-radius: var(--radius); padding: 12px 14px; }

.emailgen-loading, .emailgen-empty { text-align: center; padding: 40px 16px; }
.emailgen-empty .material-icons-round { font-size: 2.6rem; color: var(--text-muted); margin-bottom: 8px; }
.emailgen-empty p { color: var(--text-secondary); font-weight: 600; margin: 0 0 4px; }

.emailgen-history-bar {
    display: flex; align-items: center; gap: 8px; margin-top: 18px;
    padding: 10px 12px; background: var(--bg-secondary); border-radius: var(--radius);
    font-size: 0.84rem; font-weight: 600; color: var(--text-secondary);
}
.emailgen-history-list { display: none; flex-direction: column; gap: 8px; margin-top: 10px; }
.emailgen-history-list.open { display: flex; }
.emailgen-history-item summary {
    cursor: pointer; padding: 10px 12px; background: var(--bg-secondary);
    border-radius: var(--radius); font-size: 0.82rem; color: var(--text-secondary);
    display: flex; align-items: center; gap: 6px; list-style: none;
}
.emailgen-history-item summary::-webkit-details-marker { display: none; }
.emailgen-history-item summary .material-icons-round { font-size: 1rem; transition: transform 0.2s; }
.emailgen-history-item[open] summary .material-icons-round { transform: rotate(180deg); }
.emailgen-history-body { padding: 12px 4px 4px; }

/* Dark mode */
[data-theme="dark"] .emailgen-tag-type { background: rgba(14,165,233,0.15); color: #7dd3fc; }
[data-theme="dark"] .emailgen-tag-tone { background: rgba(124,58,237,0.15); color: #c4b5fd; }
[data-theme="dark"] .emailgen-tag-ai   { background: rgba(5,150,105,0.15);  color: #6ee7b7; }
[data-theme="dark"] .emailgen-tag-web  { background: rgba(37,99,235,0.15);  color: #93c5fd; }
[data-theme="dark"] .emailgen-followup  { background: rgba(14,165,233,0.1); }
[data-theme="dark"] .emailgen-callnotes { background: rgba(245,158,11,0.1); }
[data-theme="dark"] .emailgen-alt-list li { background: var(--bg-secondary); }

@media (max-width: 600px) {
    .emailgen-controls { flex-direction: column; align-items: stretch; }
    .emailgen-run-btn  { width: 100%; justify-content: center; }
    .emailgen-modal    { max-height: calc(100vh - 32px); }
    .emailgen-overlay  { padding: 16px 8px; }
}

/* ── Gönderilen e-posta geçmişi (emailgen modal) ── */
.emailgen-sent-wrap { padding: 0 24px 20px; }
.emailgen-sent-title {
    display: flex; align-items: center; gap: 6px; margin: 4px 0 10px;
    font-size: 0.85rem; font-weight: 700; color: var(--text-secondary);
}
.emailgen-sent-title .material-icons-round { font-size: 1.05rem; color: #0078d4; }
.emailgen-sent-list { display: flex; flex-direction: column; gap: 8px; }
.emailgen-sent-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius); background: var(--bg-secondary);
}
.emailgen-sent-item .material-icons-round { font-size: 1.1rem; margin-top: 1px; }
.emailgen-sent-item.sent-ok   .material-icons-round { color: #16a34a; }
.emailgen-sent-item.sent-fail .material-icons-round { color: #dc2626; }
.emailgen-sent-subj { font-size: 0.86rem; font-weight: 600; color: var(--text-primary); }
.emailgen-sent-meta { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }
.sent-fail-txt { color: #dc2626; }

/* ===================================================================
   AYARLAR — MICROSOFT BAĞLANTISI
   =================================================================== */
.settings-loading { padding: 24px; text-align: center; }
.settings-error { color: #dc2626; font-size: 0.86rem; }
.ms-state {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; border-radius: var(--radius); margin-bottom: 14px;
}
.ms-state .material-icons-round { font-size: 1.6rem; margin-top: 2px; }
.ms-state strong { display: block; font-size: 0.92rem; color: var(--text-primary); }
.ms-state p { font-size: 0.82rem; color: var(--text-secondary); margin: 3px 0 0; line-height: 1.5; }
.ms-state-on  { background: #f0faf3; border: 1px solid #bbe6c9; }
.ms-state-on  .material-icons-round { color: #16a34a; }
.ms-state-off { background: var(--bg-secondary); border: 1px solid var(--border); }
.ms-state-off .material-icons-round { color: #0078d4; }
[data-theme="dark"] .ms-state-on { background: rgba(22,163,74,0.1); border-color: #16a34a; }

/* ── Gönderim ön izleme modalı ── */
.sendpreview-overlay { align-items: flex-start; padding: 32px 16px; z-index: 1200; }
.sendpreview-modal { max-width: 560px; width: 100%; border-radius: var(--radius-lg); }
.sendpreview-body { padding: 18px 24px; }
.sendpreview-row { margin-bottom: 14px; }
.sendpreview-row label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 4px; }
.sendpreview-static { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.sendpreview-message {
    font-size: 0.86rem; line-height: 1.6; color: var(--text-secondary);
    background: var(--bg-secondary); padding: 12px 14px; border-radius: var(--radius);
    max-height: 240px; overflow-y: auto;
}
.sendpreview-note {
    display: flex; align-items: center; gap: 6px; margin-top: 6px;
    font-size: 0.78rem; color: var(--text-muted);
}
.sendpreview-note .material-icons-round { font-size: 1rem; color: #0078d4; }
.sendpreview-actions {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 14px 24px; border-top: 1px solid var(--border);
}

/* ===== AŞAMA 6 — AKTİVİTE GEÇMİŞİ ===== */
/* Kart butonu: Geçmiş (slate) */
.lca-history { color: #475569; }
.lca-history:hover { background: rgba(71, 85, 105, 0.1); border-color: rgba(71, 85, 105, 0.35); }
[data-theme="dark"] .lca-history { color: #94a3b8; }
[data-theme="dark"] .lca-history:hover { background: rgba(148, 163, 184, 0.14); }

/* Modal başlık (firma adı) */
.activity-lead-name {
    font-size: 1.05rem; font-weight: 700; color: var(--text-primary);
    margin-bottom: 14px;
}

/* Manuel kayıt kutusu */
.activity-add-box {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px; margin-bottom: 18px;
}
.activity-add-types { display: flex; gap: 8px; flex-wrap: wrap; }
.act-type-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 12px; font-size: 0.82rem; font-weight: 600;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--bg-primary); color: var(--text-secondary);
    cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.act-type-btn .material-icons-round { font-size: 1.05rem; }
.act-type-btn:hover { border-color: var(--primary); color: var(--primary); }
.act-type-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Zaman çizelgesi */
.activity-timeline { position: relative; padding-left: 6px; }
.act-item {
    position: relative; display: flex; gap: 14px;
    padding: 0 0 18px 0;
}
.act-item:not(:last-child)::before {
    content: ''; position: absolute; left: 17px; top: 36px; bottom: 0;
    width: 2px; background: var(--border);
}
.act-dot {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; z-index: 1;
}
.act-dot .material-icons-round { font-size: 1.15rem; color: #fff; }
.act-content { flex: 1; min-width: 0; padding-top: 2px; }
.act-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.act-lead {
    font-size: 0.8rem; font-weight: 600; color: var(--primary); margin-top: 1px;
}
.act-detail {
    font-size: 0.83rem; color: var(--text-secondary); margin-top: 2px;
    white-space: pre-wrap; word-break: break-word;
}
.act-time { font-size: 0.74rem; color: var(--text-muted); margin-top: 3px; }

/* ===== AŞAMA 7 — SATIŞ PIPELINE (KANBAN) ===== */
.pipe-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 16px;
}
.pipe-summary { display: flex; gap: 18px; flex-wrap: wrap; }
.pipe-sum-item {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.9rem; color: var(--text-secondary);
}
.pipe-sum-item .material-icons-round { font-size: 1.15rem; color: var(--primary); }
.pipe-sum-item strong { color: var(--text-primary); }
.pipe-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pipe-filters .form-control { width: auto; min-width: 140px; font-size: 0.85rem; padding: 7px 10px; }

/* Board: yatay kaydırılabilir kolonlar */
.pipe-board {
    display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px;
    align-items: flex-start;
}
.pipe-col {
    flex: 0 0 280px; width: 280px; background: var(--bg-secondary);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    display: flex; flex-direction: column; max-height: 72vh;
}
.pipe-col-head {
    padding: 12px 14px; border-bottom: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--bg-primary);
}
.pipe-col-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.9rem; font-weight: 700; color: var(--text-primary);
}
.pipe-col-title .material-icons-round { font-size: 1.15rem; }
.pipe-col-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pipe-col-count {
    background: var(--primary); color: #fff; font-size: 0.75rem; font-weight: 700;
    border-radius: 999px; padding: 1px 9px;
}
.pipe-col-score { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.pipe-col-body {
    padding: 10px; display: flex; flex-direction: column; gap: 10px;
    overflow-y: auto; flex: 1; min-height: 80px; transition: background 0.15s;
}
.pipe-col-body.drag-over { background: rgba(59,130,246,0.08); outline: 2px dashed var(--primary); outline-offset: -4px; }
.pipe-empty { text-align: center; color: var(--text-muted); font-size: 0.8rem; padding: 16px 0; }

/* Kart */
.pipe-card {
    background: var(--bg-primary); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 11px 12px; cursor: grab;
    box-shadow: 0 1px 2px rgba(15,39,68,0.05); transition: box-shadow 0.15s, transform 0.1s;
}
.pipe-card:hover { box-shadow: 0 4px 12px rgba(15,39,68,0.12); }
.pipe-card.dragging { opacity: 0.5; transform: scale(0.98); cursor: grabbing; }
.pipe-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pipe-card-name { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.pipe-card-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.pipe-card-city {
    display: inline-flex; align-items: center; gap: 2px;
    font-size: 0.74rem; color: var(--text-muted);
}
.pipe-card-city .material-icons-round { font-size: 0.95rem; }
.pipe-card-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border);
}
.pipe-card-contact {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.72rem; color: var(--text-muted);
}
.pipe-card-contact .material-icons-round { font-size: 0.9rem; }
.pipe-card-actions { display: flex; gap: 2px; }
.pipe-mini-btn {
    border: none; background: transparent; cursor: pointer; color: var(--text-muted);
    padding: 3px; border-radius: 6px; display: inline-flex; transition: all 0.15s;
}
.pipe-mini-btn:hover { background: var(--bg-secondary); color: var(--primary); }
.pipe-mini-btn .material-icons-round { font-size: 1.05rem; }

@media (max-width: 640px) {
    .pipe-col { flex: 0 0 84vw; width: 84vw; }
}

/* ===== AŞAMA 8 — ANALİTİK PANEL ===== */
.analytics-filter-card { margin-bottom: 16px; padding: 14px 16px; }
.analytics-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.af-field { display: flex; flex-direction: column; gap: 3px; }
.af-field label { font-size: 0.72rem; font-weight: 600; color: var(--text-secondary); }
.af-field .form-control { width: auto; min-width: 140px; font-size: 0.85rem; padding: 7px 10px; }
.analytics-filters .btn { align-self: flex-end; }

/* Metrik kartları */
.analytics-metrics {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px; margin-bottom: 16px;
}
.metric-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-primary); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px;
}
.metric-icon {
    width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.metric-icon .material-icons-round { font-size: 1.5rem; }
.metric-info { display: flex; flex-direction: column; min-width: 0; }
.metric-value { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.metric-label { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
.metric-card.clickable { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s; }
.metric-card.clickable:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(15,39,68,0.1); transform: translateY(-1px); }

/* Grafikler */
.analytics-charts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px; margin-bottom: 16px;
}
.chart-card { padding: 16px; }
.chart-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 14px;
}
.chart-title .material-icons-round { font-size: 1.2rem; color: var(--primary); }
.chart-rows { display: flex; flex-direction: column; gap: 9px; }
.chart-row { display: flex; align-items: center; gap: 10px; }
.chart-row-label {
    flex: 0 0 96px; width: 96px; font-size: 0.8rem; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chart-bar-track {
    flex: 1; height: 16px; background: var(--bg-secondary);
    border-radius: 8px; overflow: hidden;
}
.chart-bar-fill { height: 100%; border-radius: 8px; min-width: 2px; transition: width 0.4s ease; }
.chart-row-val { flex: 0 0 32px; text-align: right; font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }

/* En yüksek skorlu 10 firma */
.top-leads { display: flex; flex-direction: column; }
.top-lead-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 6px; border-bottom: 1px solid var(--border); cursor: pointer;
    transition: background 0.15s;
}
.top-lead-row:last-child { border-bottom: none; }
.top-lead-row:hover { background: var(--bg-secondary); }
.top-rank {
    flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%;
    background: var(--primary); color: #fff; font-size: 0.78rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.top-name { flex: 1; font-weight: 600; font-size: 0.88rem; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 80px; }
.top-city {
    flex: 0 0 110px; display: inline-flex; align-items: center; gap: 2px;
    font-size: 0.76rem; color: var(--text-muted); white-space: nowrap; overflow: hidden;
}
.top-city .material-icons-round { font-size: 0.95rem; }
@media (max-width: 640px) {
    .top-city, .top-lead-row .sector-badge { display: none; }
}

/* ===== AŞAMA 9 — TOPLU KAMPANYA ===== */
/* Lead kartı seçim kutusu */
.lead-select-wrap { display: inline-flex; align-items: center; margin-right: 4px; cursor: pointer; }
.lead-select { width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary); }

/* Seçim barı */
.campaign-select-bar {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    background: var(--accent-light); border: 1px solid var(--primary);
    border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px;
}
.csb-count { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--primary); }
.csb-count .material-icons-round { font-size: 1.2rem; }
.csb-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Sihirbaz */
.cw-info, .cw-note {
    display: flex; align-items: flex-start; gap: 8px; font-size: 0.82rem;
    background: var(--bg-secondary); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px;
    color: var(--text-secondary);
}
.cw-info .material-icons-round { color: var(--primary); font-size: 1.1rem; }
.cw-note .material-icons-round { color: #f59e0b; font-size: 1.1rem; }
.form-group label small { color: var(--text-muted); font-weight: 400; }
.cw-preview-title { font-weight: 700; font-size: 0.85rem; margin: 14px 0 8px; color: var(--text-primary); }
.cw-preview-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.cw-pv-to { font-size: 0.8rem; color: var(--text-muted); }
.cw-pv-subject { font-weight: 700; font-size: 0.86rem; margin: 4px 0; color: var(--text-primary); }
.cw-pv-body { font-size: 0.82rem; color: var(--text-secondary); white-space: pre-wrap; max-height: 120px; overflow-y: auto; }

/* Kampanya kartları */
.campaign-help {
    display: flex; align-items: flex-start; gap: 8px; font-size: 0.82rem;
    color: var(--text-secondary); background: var(--bg-secondary);
    border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px;
}
.campaign-help .material-icons-round { color: var(--primary); font-size: 1.1rem; }
.campaign-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 12px; }
.campaign-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.campaign-name { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.campaign-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 8px; }
.campaign-stats span { display: inline-flex; align-items: center; gap: 3px; }
.campaign-stats .material-icons-round { font-size: 1rem; }
.campaign-progress { height: 8px; background: var(--bg-secondary); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.campaign-progress-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width 0.4s; }
.campaign-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.campaign-date { font-size: 0.76rem; color: var(--text-muted); }
.campaign-ctrls { display: flex; gap: 6px; }

/* Loglar */
.camp-detail-head { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; }
.camp-log-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--border); }
.camp-log-ic { flex: 0 0 22px; text-align: center; }
.camp-log-name { flex: 1; font-size: 0.84rem; color: var(--text-primary); display: flex; flex-direction: column; }
.camp-log-name small { color: var(--text-muted); font-size: 0.74rem; }
.camp-log-st { font-size: 0.78rem; font-weight: 600; }

/* ===== DGM SALES INTELLIGENCE ===== */
.lca-intel { color: #db2777; }
.lca-intel:hover { background: rgba(219,39,119,0.1); border-color: rgba(219,39,119,0.35); }
[data-theme="dark"] .lca-intel { color: #f472b6; }
[data-theme="dark"] .lca-intel:hover { background: rgba(244,114,182,0.14); }

.si-lead-name { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }

.si-report { display: flex; flex-direction: column; gap: 14px; }
.si-score-row { display: flex; align-items: center; gap: 14px; }
.si-score {
    font-size: 2.2rem; font-weight: 800; line-height: 1; padding: 12px 18px; border-radius: var(--radius-lg);
    display: flex; align-items: baseline; gap: 2px;
}
.si-score small { font-size: 0.9rem; font-weight: 600; opacity: 0.7; }
.si-score.score-high { background: var(--success-light); color: var(--success); }
.si-score.score-mid  { background: var(--warning-light); color: var(--warning); }
.si-score.score-low  { background: var(--red-light); color: var(--red); }
.si-score-label { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.si-date { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }

.si-block { background: var(--bg-secondary); border-radius: var(--radius); padding: 12px 14px; }
.si-block p { margin: 6px 0 0; font-size: 0.86rem; color: var(--text-secondary); line-height: 1.55; }
.si-block-title { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }
.si-block-title .material-icons-round { font-size: 1.1rem; color: var(--primary); }

.si-dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.si-dim { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.si-dim-head { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.si-dim-head .material-icons-round { font-size: 1.05rem; color: var(--text-muted); }
.si-dim-reason { font-size: 0.78rem; color: var(--text-secondary); margin-top: 5px; line-height: 1.45; }

.si-lvl { margin-left: auto; font-size: 0.72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.si-lvl-high { background: var(--success-light); color: var(--success); }
.si-lvl-mid  { background: var(--warning-light); color: var(--warning); }
.si-lvl-low  { background: rgba(6,182,212,0.14); color: #0e7490; }
.si-lvl-none { background: rgba(100,116,139,0.12); color: #64748b; }

.si-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.si-chip { background: var(--accent-light); color: var(--primary); font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.si-list { margin: 8px 0 0; padding-left: 20px; }
.si-list li { font-size: 0.84rem; color: var(--text-secondary); margin-bottom: 5px; line-height: 1.45; }

/* ===== GTİP INTELLIGENCE ===== */
.gtip-search { display: flex; gap: 8px; margin-bottom: 16px; }
.gtip-search .form-control { flex: 1; font-size: 0.95rem; padding: 11px 14px; }
.gtip-search .btn { white-space: nowrap; }
.gtip-layout { display: grid; grid-template-columns: 1fr 240px; gap: 16px; align-items: start; }
.gtip-result { min-height: 120px; }
.gtip-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.gtip-code { font-size: 1.3rem; font-weight: 800; color: var(--primary); letter-spacing: 0.5px; }
.gtip-product { font-size: 0.9rem; color: var(--text-secondary); }
.gtip-source { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 600; color: var(--text-muted); margin-top: 4px; }
.gtip-source .material-icons-round { font-size: 0.95rem; }
.gtip-source.verified { color: #16a34a; }
.gtip-disclaimer {
    display: flex; align-items: flex-start; gap: 8px; font-size: 0.8rem; line-height: 1.5;
    background: var(--warning-light); color: #92600a; border-radius: var(--radius); padding: 12px 14px;
}
.gtip-disclaimer .material-icons-round { font-size: 1.1rem; color: #d97706; flex-shrink: 0; }
.gtip-side-title { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.gtip-hist-item {
    display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left;
    background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 8px 10px; margin-bottom: 6px; cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.gtip-hist-item:hover { border-color: var(--primary); }
.gtip-hist-code { font-size: 0.82rem; font-weight: 700; color: var(--primary); }
.gtip-hist-item small { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gtip-hist-empty { font-size: 0.8rem; color: var(--text-muted); padding: 8px 0; }

/* ===== UX SADELEŞTİRME — nav grubu + kart taşma menüsü ===== */
.nav-section-label {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: rgba(255,255,255,0.38); padding: 14px 16px 6px; margin-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.nav-item.nav-tool { opacity: 0.85; }
.nav-item.nav-tool:hover { opacity: 1; }

/* Araçlar açılır grubu */
.nav-section-toggle {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    background: transparent; border: none; cursor: pointer; font-family: inherit;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: rgba(255,255,255,0.4); padding: 14px 16px 6px; margin-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.nav-section-toggle:hover { color: rgba(255,255,255,0.7); }
.nav-section-toggle .nav-chevron { font-size: 1.1rem; transition: transform 0.2s; }
.nav-section-toggle.open .nav-chevron { transform: rotate(180deg); }
.nav-tools-group { overflow: hidden; }
.nav-tools-group.collapsed { display: none; }

/* Kart aksiyon taşma menüsü ("⋯ Daha fazla") */
.lca-more-wrap { position: relative; display: inline-flex; }
.lca-menu {
    position: absolute; top: calc(100% + 4px); right: 0; z-index: 50; min-width: 160px;
    background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(15,39,68,0.16); padding: 6px; display: none;
}
.lca-menu.open { display: block; }
.lca-menu button {
    display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
    background: transparent; border: none; cursor: pointer; font-family: inherit;
    font-size: 0.85rem; color: var(--text-primary); padding: 8px 10px; border-radius: 8px;
}
.lca-menu button:hover { background: var(--bg-secondary); }
.lca-menu button.danger { color: var(--red); }
.lca-menu .material-icons-round { font-size: 1.1rem; }

/* Arama sonucu birincil eylem: Ekle & E-posta */
.rca-btn.rca-addmail {
    background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600;
}
.rca-btn.rca-addmail:hover { filter: brightness(1.07); }

/* Dashboard "Bugünün işi" çipleri */
.dash-todo { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; justify-content: center; }
.todo-chip {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    background: var(--bg-primary); border: 1px solid var(--border); border-radius: 999px;
    padding: 9px 16px; font-size: 0.88rem; color: var(--text-secondary); transition: all 0.15s;
}
.todo-chip:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(15,39,68,0.08); }
.todo-chip.active { border-color: var(--primary); background: var(--accent-light); }
.todo-chip strong { color: var(--text-primary); font-size: 1.05rem; }
.todo-chip .material-icons-round { font-size: 1.15rem; color: var(--primary); }

/* Detaylı Analiz aç/kapat */
.dash-detail-toggle {
    display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 14px;
    background: transparent; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 8px 14px; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary);
    cursor: pointer; font-family: inherit;
}
.dash-detail-toggle:hover { border-color: var(--primary); color: var(--primary); }
.dash-detail-toggle .material-icons-round { transition: transform 0.2s; }
.dash-detail-toggle.open .material-icons-round { transform: rotate(180deg); }
.dash-detail.collapsed { display: none; }
@media (max-width: 768px) {
    .gtip-layout { grid-template-columns: 1fr; }
    .gtip-search { flex-direction: column; }
}

/* ===== KARAR VERİCİLER (Apollo contacts) ===== */
.contacts-box {
    margin-bottom: 10px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.contacts-box-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.78rem; font-weight: 700; color: var(--text-secondary);
    margin-bottom: 8px;
}
.contacts-box-title .material-icons-round { font-size: 1rem; color: #d4a017; }
.contact-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 5px 0;
    border-top: 1px dashed var(--border);
}
.contact-row:first-of-type { border-top: none; }
.contact-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; min-width: 0; }
.contact-name { font-size: 0.84rem; font-weight: 600; color: var(--text-primary); }
.contact-title { font-size: 0.74rem; color: var(--text-muted); }
.contact-links { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.contact-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 7px;
    background: var(--bg-primary); border: 1px solid var(--border);
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.72rem; font-weight: 700;
}
.contact-ico .material-icons-round { font-size: 0.95rem; }
.contact-ico:hover { color: var(--text-primary); border-color: var(--text-muted); }
.contact-li { color: #0a66c2; font-family: Arial, sans-serif; }
.contact-aimail {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
    background: rgba(212,160,23,0.1); border: 1px solid rgba(212,160,23,0.35);
    color: #d4a017;
}
.contact-aimail .material-icons-round { font-size: 0.95rem; }
.contact-aimail:hover { background: rgba(212,160,23,0.22); }
.contact-more { font-size: 0.74rem; color: var(--text-muted); padding-top: 5px; }
.emailgen-tag-contact { background: #fdf6e3; color: #b8860b; }
[data-theme="dark"] .emailgen-tag-contact { background: rgba(212,160,23,0.15); color: #e7c66a; }
[data-theme="dark"] .contacts-box { background: rgba(255,255,255,0.03); }

/* ===== ÖZEL ARAMA — Apollo karar verici sonuç kartları ===== */
.apollo-dm-card {
    position: relative;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.apollo-dm-card:last-child { margin-bottom: 0; }
.apollo-dm-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.apollo-dm-name { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.apollo-dm-title { font-size: 0.78rem; color: #d4a017; font-weight: 600; }
.apollo-dm-details { display: flex; flex-direction: column; gap: 3px; }
.apollo-dm-row {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.78rem; color: var(--text-secondary);
}
.apollo-dm-row .material-icons-round { font-size: 0.9rem; color: var(--text-muted); }
.apollo-dm-row a { color: var(--text-primary); text-decoration: none; }
.apollo-dm-row a:hover { text-decoration: underline; }
.apollo-dm-row i { color: var(--text-muted); font-style: normal; opacity: .7; }
.apollo-dm-source {
    position: absolute; top: 10px; right: 10px;
    font-size: 0.68rem; font-weight: 600; color: var(--text-muted);
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 99px; padding: 2px 8px;
}

/* ===== ÖZEL ARAMA — Son aramalar (geçmiş) ===== */
.apollo-dm-hist-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.78rem; font-weight: 700; color: var(--text-secondary);
    margin-bottom: 6px;
}
.apollo-dm-hist-title .material-icons-round { font-size: 1rem; color: var(--text-muted); }
.apollo-dm-hist-item {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 7px 10px; margin-bottom: 5px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer;
    color: var(--text-primary); font-family: inherit; font-size: 0.8rem;
    text-align: left; transition: border-color .15s;
}
.apollo-dm-hist-item:hover { border-color: #d4a017; }
.apollo-dm-hist-item .material-icons-round { font-size: 0.95rem; color: #d4a017; flex-shrink: 0; }
.apollo-dm-hist-item .adh-label {
    flex: 1; min-width: 0; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.apollo-dm-hist-item .adh-meta { color: var(--text-muted); font-size: 0.72rem; flex-shrink: 0; }
.apollo-dm-hist-note {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 10px; margin-bottom: 8px;
    background: rgba(212,160,23,0.08); border: 1px solid rgba(212,160,23,0.3);
    border-radius: var(--radius);
    font-size: 0.76rem; font-weight: 600; color: #b8860b;
}
.apollo-dm-hist-note .material-icons-round { font-size: 0.95rem; }
[data-theme="dark"] .apollo-dm-hist-note { color: #e7c66a; }

.pending-followups-modal {
    width: min(920px, calc(100vw - 32px));
    max-width: 920px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.pending-followups-body { min-height: 0; padding: 0; display: flex; flex: 1; }
.pending-followups-layout { min-height: 0; display: flex; flex: 1; flex-direction: column; }
.pending-followups-scroll { min-height: 180px; overflow-y: auto; padding: 18px 24px 14px; }
.pending-followup-item { border: 1px solid var(--border); }
.pending-followup-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pending-followups-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
}
.pending-followups-filter-main { min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pending-followups-filter .form-control { width: auto; min-width: 150px; max-width: 240px; padding: 7px 10px; font-size: 0.82rem; }
#pendingFollowupSearch { min-width: min(300px, 100%); }
.pending-followups-count { white-space: nowrap; font-size: 0.82rem; color: var(--text-secondary); padding-right: 4px; }
.pending-followups-count b { color: var(--text-primary); }
.pending-followups-empty { padding: 28px 12px; }

@media (max-width: 600px) {
    .pending-followups-modal { width: calc(100vw - 16px); max-height: calc(100vh - 18px); }
    .pending-followups-scroll { padding: 14px 14px 10px; }
    .pending-followups-filter { align-items: stretch; flex-direction: column; padding: 10px 14px; }
    .pending-followups-filter-main,
    .pending-followups-filter .form-control,
    .pending-followups-filter .btn { width: 100%; max-width: 100%; }
    .pending-followup-actions .btn { flex: 1 1 130px; justify-content: center; }
}
