@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #09090b;
    --bg-elevated: #0f0f12;
    --bg-card: #141419;
    --bg-hover: #1c1c24;
    --bg-input: #0c0c10;
    --border: rgba(255,255,255,.06);
    --border-strong: rgba(255,255,255,.1);
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59,130,246,.15);
    --accent: #8b5cf6;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --hot: #f97316;
    --radius: 14px;
    --radius-sm: 10px;
    --sidebar-w: 248px;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 32px rgba(0,0,0,.35);
    --transition: .18s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(59,130,246,.12), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139,92,246,.08), transparent);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: #60a5fa; }

/* ─── Layout ─── */
.layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
    width: var(--sidebar-w);
    background: rgba(15,15,18,.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-brand {
    padding: 28px 22px 24px;
}

/* ─── Sidebar marka kartı ─── */
.sb-brand {
    display: block;
    margin: 12px 10px 16px;
    padding: 14px 14px 0;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(165deg, rgba(30,41,59,.55) 0%, rgba(15,15,18,.92) 55%, rgba(20,10,8,.75) 100%);
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.04);
    transition: border-color .25s, box-shadow .25s, transform .15s;
}
.sb-brand:hover {
    border-color: rgba(59,130,246,.35);
    box-shadow: 0 6px 28px rgba(0,0,0,.35), 0 0 0 1px rgba(59,130,246,.12), inset 0 1px 0 rgba(255,255,255,.06);
    transform: translateY(-1px);
}

.sb-brand__logo {
    display: block;
    width: 100%;
    max-width: 168px;
    height: auto;
    margin: 0 auto 10px;
}
.sb-brand__divider {
    height: 1px;
    margin: 0 2px 10px;
    background: linear-gradient(90deg, transparent, rgba(148,163,184,.22), transparent);
}

.sb-brand__hero {
    position: relative;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 12px 16px;
    isolation: isolate;
}
.sb-brand__hero-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 100%, rgba(249,115,22,.18) 0%, transparent 65%),
        radial-gradient(ellipse 50% 40% at 50% 90%, rgba(220,38,38,.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.sb-brand__hero-fire {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 52px;
    opacity: .42;
    mask-image: linear-gradient(to top, black 25%, transparent 88%);
    -webkit-mask-image: linear-gradient(to top, black 25%, transparent 88%);
    pointer-events: none;
    z-index: 0;
}
.sb-brand__hero-text {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 8px 14px 6px;
    border-radius: 10px;
    background: rgba(15,15,18,.45);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.sb-brand__title {
    display: block;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #e2e8f0;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
    line-height: 1.2;
    white-space: nowrap;
}
.sb-brand__4000 {
    display: block;
    margin-top: 2px;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1;
    background: linear-gradient(180deg, #fff7ed 0%, #fdba74 30%, #f97316 55%, #dc2626 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 14px rgba(249,115,22,.55)) drop-shadow(0 2px 4px rgba(0,0,0,.4));
    animation: sbEditionPulse 2.5s ease-in-out infinite;
}

@keyframes sbEditionPulse {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(249,115,22,.5)) drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
    50% { filter: drop-shadow(0 0 20px rgba(249,115,22,.75)) drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
}

.sb-brand__foot {
    padding: 0 12px 12px;
}
.sb-brand__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .03em;
    color: #94a3b8;
    background: rgba(59,130,246,.06);
    border: 1px solid rgba(59,130,246,.12);
    border-radius: 8px;
    transition: color .2s, border-color .2s, background .2s;
}
.sb-brand:hover .sb-brand__badge {
    color: #bfdbfe;
    border-color: rgba(59,130,246,.22);
    background: rgba(59,130,246,.1);
}
.sb-brand__badge svg {
    opacity: .75;
    color: #60a5fa;
}

/* Yamanda alev — kompakt sidebar */
.sb-brand__hero-fire .yamanda-fire--compact {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 140px;
    height: 48px;
    transform: translateX(-50%);
}
.sb-brand__hero-fire .yamanda-fire .fire-left,
.sb-brand__hero-fire .yamanda-fire .fire-center,
.sb-brand__hero-fire .yamanda-fire .fire-right,
.sb-brand__hero-fire .yamanda-fire .fire-bottom {
    position: absolute;
    height: 100%;
    width: 100%;
}
.sb-brand__hero-fire .yamanda-fire .fire-center {
    animation: yamandaScaleUpDown 3s ease-out infinite;
    animation-fill-mode: both;
}
.sb-brand__hero-fire .yamanda-fire .fire-left {
    animation: yamandaShake 3s ease-out infinite;
    animation-fill-mode: both;
}
.sb-brand__hero-fire .yamanda-fire .fire-right {
    animation: yamandaShake 2s ease-out infinite;
    animation-fill-mode: both;
}
.sb-brand__hero-fire .yamanda-fire .fire-center .main-fire {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(farthest-corner at 10px 0, #d43300 0%, #ef5a00 95%);
    transform: scaleX(0.8) rotate(45deg);
    border-radius: 0 40% 60% 40%;
    filter: drop-shadow(0 0 8px #d43322);
}
.sb-brand__hero-fire .yamanda-fire .fire-left .main-fire {
    position: absolute;
    top: 15%;
    left: -20%;
    width: 80%;
    height: 80%;
    background-color: #ef5a00;
    transform: scaleX(0.8) rotate(45deg);
    border-radius: 0 40% 60% 40%;
    filter: drop-shadow(0 0 8px #d43322);
}
.sb-brand__hero-fire .yamanda-fire .fire-right .main-fire {
    position: absolute;
    top: 15%;
    right: -25%;
    width: 80%;
    height: 80%;
    background-color: #ef5a00;
    transform: scaleX(0.8) rotate(45deg);
    border-radius: 0 40% 60% 40%;
    filter: drop-shadow(0 0 8px #d43322);
}
.sb-brand__hero-fire .yamanda-fire .fire-bottom .main-fire {
    position: absolute;
    top: 30%;
    left: 20%;
    width: 75%;
    height: 75%;
    background-color: #ff7800;
    transform: scaleX(0.8) rotate(45deg);
    border-radius: 0 40% 100% 40%;
    filter: blur(8px);
    animation: yamandaGlow 2s ease-out infinite;
    animation-fill-mode: both;
}
.sb-brand__hero-fire .yamanda-fire .fire-center .particle-fire,
.sb-brand__hero-fire .yamanda-fire .fire-left .particle-fire,
.sb-brand__hero-fire .yamanda-fire .fire-right .particle-fire {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: #ef5a00;
    border-radius: 50%;
    filter: drop-shadow(0 0 6px #d43322);
}
.sb-brand__hero-fire .yamanda-fire .fire-center .particle-fire {
    top: 60%;
    left: 45%;
    animation: yamandaParticleUp 2s ease-out infinite;
    animation-fill-mode: both;
}
.sb-brand__hero-fire .yamanda-fire .fire-left .particle-fire {
    top: 10%;
    left: 20%;
    animation: yamandaParticleUp 3s ease-out infinite;
    animation-fill-mode: both;
}
.sb-brand__hero-fire .yamanda-fire .fire-right .particle-fire {
    top: 45%;
    left: 50%;
    animation: yamandaParticleUp 2s ease-out infinite;
    animation-fill-mode: both;
}

@media (prefers-reduced-motion: reduce) {
    .sb-brand__4000 { animation: none !important; }
    .sb-brand__hero-fire .yamanda-fire .fire-left,
    .sb-brand__hero-fire .yamanda-fire .fire-center,
    .sb-brand__hero-fire .yamanda-fire .fire-right,
    .sb-brand__hero-fire .yamanda-fire .fire-bottom .main-fire,
    .sb-brand__hero-fire .yamanda-fire .particle-fire {
        animation: none !important;
    }
}

/* Eski sidebar marka sınıfları (login vb. uyumluluk) */
.sb-brand__fire-stage { display: none; }
.sb-brand__tag { display: none; }

@keyframes yamandaScaleUpDown {
    0%, 100% { transform: scaleY(1) scaleX(1); }
    50%, 90% { transform: scaleY(1.1); }
    75% { transform: scaleY(0.95); }
    80% { transform: scaleX(0.95); }
}
@keyframes yamandaShake {
    0%, 100% { transform: skewX(0) scale(1); }
    50% { transform: skewX(5deg) scale(0.9); }
}
@keyframes yamandaParticleUp {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; top: -100%; transform: scale(0.5); }
}
@keyframes yamandaGlow {
    0%, 100% { background-color: #ef5a00; }
    50% { background-color: #ff7800; }
}

.sb-brand__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.sb-brand__name {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
}
.sb-brand__edition {
    flex-shrink: 0;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1.35;
    border-radius: 6px;
    background: linear-gradient(135deg, #fdba74 0%, #f97316 45%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(249,115,22,.35);
}

.sidebar-logo {
    display: block;
    max-width: 150px;
    height: auto;
    margin-bottom: 10px;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(59,130,246,.35);
}

.sidebar-brand h1 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text);
}

.sidebar-brand p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.nav-section {
    padding: 8px 14px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
}

.sidebar nav { flex: 1; padding: 8px 12px; overflow-y: auto; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    margin-bottom: 2px;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    border: 1px solid transparent;
}

.nav-link svg { width: 18px; height: 18px; opacity: .7; flex-shrink: 0; }

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text);
    text-decoration: none;
}

.nav-link.active {
    background: var(--primary-glow);
    color: #93c5fd;
    border-color: rgba(59,130,246,.2);
}

.nav-link.active svg { opacity: 1; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
}

.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 32px 40px 48px;
    max-width: 1280px;
    width: 100%;
}

/* ─── Page header ─── */
.page-header { margin-bottom: 28px; }
.page-header h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.03em;
}
.page-header p { color: var(--text-muted); margin-top: 6px; font-size: 14px; }
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

/* ─── Cards ─── */
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
}

.card-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* ─── Stats ─── */
.stats-grid { margin-bottom: 24px; }

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 20px 22px;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: .4;
}

.stat-card-hot::after {
    background: linear-gradient(90deg, transparent, var(--hot), transparent);
    opacity: .7;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
}

.stat-hot { color: var(--hot); }
.stat-warm { color: var(--warning); }
.stat-cold { color: var(--text-muted); }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    box-shadow: 0 2px 12px rgba(59,130,246,.35);
}
.btn-primary:hover { color: #fff; box-shadow: 0 4px 20px rgba(59,130,246,.45); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { color: #fff; background: #16a34a; }

.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { color: #fff; background: #1da851; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
}
.btn-outline:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-strong); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 8px 12px;
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-danger { background: var(--danger); color: #fff; }

.action-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; margin: 0 -4px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.table-modern th {
    text-align: left;
    padding: 10px 14px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,.2);
}

.table-modern td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table-modern tbody tr { transition: background var(--transition); }
.table-modern tbody tr:hover td { background: var(--bg-hover); }
.table-modern tr.row-hot td:first-child { box-shadow: inset 3px 0 0 var(--hot); }

.lead-name { font-weight: 600; color: var(--text); }
.lead-name:hover { color: #93c5fd; }

/* ─── Badges & chips ─── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}

.badge-hot { background: rgba(249,115,22,.12); color: #fb923c; border: 1px solid rgba(249,115,22,.2); }
.badge-warm { background: rgba(234,179,8,.12); color: #facc15; border: 1px solid rgba(234,179,8,.2); }
.badge-cold { background: rgba(113,113,122,.12); color: #a1a1aa; border: 1px solid rgba(113,113,122,.2); }
.badge-new { background: rgba(59,130,246,.12); color: #60a5fa; border: 1px solid rgba(59,130,246,.2); }
.badge-contacted { background: rgba(34,197,94,.12); color: #4ade80; border: 1px solid rgba(34,197,94,.2); }
.badge-interested { background: rgba(139,92,246,.12); color: #a78bfa; border: 1px solid rgba(139,92,246,.2); }
.badge-proposal { background: rgba(6,182,212,.12); color: #22d3ee; border: 1px solid rgba(6,182,212,.2); }
.badge-won { background: rgba(34,197,94,.15); color: #86efac; }
.badge-lost { background: rgba(239,68,68,.12); color: #f87171; }

.chip {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.chip-primary { background: var(--primary-glow); color: #93c5fd; border-color: rgba(59,130,246,.25); }

/* ─── Forms ─── */
.form-group { margin-bottom: 0; }
.form-stack .form-group { margin-bottom: 18px; }
.form-stack .form-group small { display: block; margin-top: 6px; font-size: 11px; color: var(--text-muted); }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 9px 13px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: rgba(59,130,246,.5);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

select.form-control { cursor: pointer; }

.filter-card { margin-bottom: 20px; padding: 0; overflow: hidden; }

.filter-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: none;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.filter-toggle span { color: var(--text-muted); font-size: 12px; font-weight: 500; }

.filter-body {
    padding: 0 22px 20px;
    border-top: 1px solid var(--border);
}

.filter-body.collapsed { display: none; }

.filter-form .filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 14px;
    padding-top: 16px;
}

.filter-actions { display: flex; align-items: flex-end; }
.filter-actions .btn-group { display: flex; gap: 8px; }

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding: 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px 0;
}

.checkbox-item input { accent-color: var(--primary); }

/* ─── Alerts ─── */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.2); color: #86efac; }
.alert-danger { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); color: #fcd34d; }

.today-actions-list { padding: 0 4px 8px; }
.today-action-item { align-items: center; }
.today-action-icon { font-size: 1.25rem; width: 32px; text-align: center; flex-shrink: 0; }
.alert-error { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); color: #fca5a5; }
.alert-info { background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.2); color: #93c5fd; }

/* ─── Today list ─── */
.today-list { display: flex; flex-direction: column; gap: 8px; }

.today-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    flex-wrap: wrap;
    transition: border-color var(--transition);
}

.today-item:hover { border-color: var(--border-strong); }

.today-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.today-btns { display: flex; gap: 6px; flex-wrap: wrap; }

.empty-hint, .empty-state { color: var(--text-muted); font-size: 14px; }
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state p { margin-bottom: 16px; }

.hint-box {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }

.score-cell { display: flex; align-items: center; gap: 8px; }
.contact-cell { font-size: 12px; color: var(--text-secondary); }

/* ─── Pipeline ─── */
.pipeline-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(200px, 1fr));
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.pipeline-col {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    min-height: 320px;
}

.pipeline-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-secondary);
}

.pipeline-cards { display: flex; flex-direction: column; gap: 8px; max-height: 65vh; overflow-y: auto; }

.pipeline-card {
    display: block;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    transition: all var(--transition);
}

.pipeline-card:hover {
    border-color: rgba(59,130,246,.35);
    background: var(--bg-hover);
    text-decoration: none;
    transform: translateY(-1px);
}

.pipeline-card strong { font-size: 13px; display: block; margin-bottom: 4px; }
.pipeline-card-top { display: flex; gap: 6px; margin-bottom: 6px; }
.pipeline-meta { font-size: 11px; color: var(--text-muted); }
.pipeline-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 24px 8px; }

/* ─── Detail ─── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.score-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-hover);
    border: 1px solid var(--border);
}

.info-table { width: 100%; }
.info-table td { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-table td:first-child { color: var(--text-muted); width: 140px; font-weight: 500; }

.package-box {
    background: linear-gradient(135deg, rgba(59,130,246,.08), rgba(139,92,246,.06));
    border: 1px solid rgba(59,130,246,.15);
    padding: 18px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
}

.package-box .price { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0; }

.feature-list { list-style: none; }
.feature-list li {
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.feature-list li.missing { color: #f87171; }
.feature-list li.found { color: #4ade80; }

/* ─── Tabs ─── */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    transition: all var(--transition);
}
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Pagination ─── */
.pagination {
    display: flex;
    gap: 6px;
    margin-top: 20px;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.pagination a, .pagination span {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.pagination a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

.progress-bar { height: 5px; background: var(--bg-hover); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--success), #4ade80); border-radius: 3px; }

.mail-preview-frame { background: #fff; border-radius: var(--radius); overflow: hidden; }

/* ─── Mobile ─── */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px; right: 16px;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    color: var(--text);
    cursor: pointer;
}

@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .pipeline-board { grid-template-columns: repeat(3, minmax(200px, 1fr)); }
}

@media (max-width: 900px) {
    .menu-toggle { display: flex; }
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition);
    }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; padding: 24px 20px 40px; padding-top: 60px; }
    .grid-2, .detail-grid { grid-template-columns: 1fr; }
    .scan-workspace { grid-template-columns: 1fr; }
    .pipeline-board { grid-template-columns: 1fr; }
    .filter-form .filter-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .grid-4 { grid-template-columns: 1fr; }
}

/* ─── Login ─── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-wrap { width: 100%; max-width: 400px; }

.login-card { padding: 32px; }

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand .logo-mark {
    margin: 0 auto 12px;
}

.login-logo {
    display: block;
    max-width: 180px;
    height: auto;
    margin: 0 auto 16px;
}

.login-brand h1 {
    font-size: 20px;
    margin: 0;
}

.login-brand p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.sidebar-user {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    word-break: break-all;
}

.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 20px;
    align-items: center;
}

.filter-row .form-control { max-width: 200px; }

.pagination {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

/* ─── Marka animasyonu: MÜŞTERİ AVCISI 4000 ─── */
.brand-animated {
    text-align: center;
    line-height: 1.1;
    margin: 8px 0 4px;
}

.brand-animated--compact,
.sidebar-brand .brand-animated {
    text-align: left;
    margin: 6px 0 2px;
}

.brand-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.sidebar-brand .brand-line {
    justify-content: flex-start;
    gap: 4px;
}

.brand-word {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--text);
    opacity: 0;
    transform: translateY(12px);
    animation: brandSlideIn 0.7s ease forwards;
}

.brand-word-delay {
    animation-delay: 0.35s;
}

.sidebar-brand .brand-word {
    font-size: 11px;
    letter-spacing: 0.04em;
}

.brand-4000-wrap {
    position: relative;
    display: inline-block;
    margin-top: 6px;
}

.brand-4000 {
    display: inline-block;
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 0.12em;
    opacity: 0;
    transform: scale(0.3);
    animation: brandExplode 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) 0.85s forwards;
}

.sidebar-brand .brand-4000 {
    font-size: 22px;
    letter-spacing: 0.08em;
}

.brand-fire {
    background: linear-gradient(180deg, #fff7ed 0%, #fdba74 35%, #f97316 55%, #dc2626 80%, #7f1d1d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.7));
    animation: brandExplode 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) 0.85s forwards,
               brandFireFlicker 1.2s ease-in-out 1.8s infinite;
}

.brand-sparks {
    position: absolute;
    inset: -8px -12px;
    pointer-events: none;
    opacity: 0;
    animation: brandSparks 0.6s ease-out 1.5s forwards;
    background:
        radial-gradient(circle at 20% 60%, rgba(251, 146, 60, 0.9) 0 2px, transparent 3px),
        radial-gradient(circle at 80% 40%, rgba(239, 68, 68, 0.8) 0 2px, transparent 3px),
        radial-gradient(circle at 50% 10%, rgba(253, 224, 71, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 30% 90%, rgba(249, 115, 22, 0.7) 0 2px, transparent 3px),
        radial-gradient(circle at 70% 85%, rgba(220, 38, 38, 0.6) 0 2px, transparent 3px);
}

.login-tagline {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 12px;
    opacity: 0;
    animation: brandSlideIn 0.6s ease 1.6s forwards;
}

@keyframes brandSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes brandExplode {
    0% {
        opacity: 0;
        transform: scale(0.2);
        filter: blur(6px);
    }
    55% {
        opacity: 1;
        transform: scale(1.25);
        filter: blur(0);
    }
    75% {
        transform: scale(0.92);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes brandFireFlicker {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.6)); }
    50% { filter: drop-shadow(0 0 22px rgba(239, 68, 68, 0.95)); }
}

@keyframes brandSparks {
    0% { opacity: 0; transform: scale(0.5); }
    40% { opacity: 1; transform: scale(1.3); }
    100% { opacity: 0.3; transform: scale(1); }
}

/* ─── Tarama sayfası ─── */
.scan-page { position: relative; }

.scan-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.scan-pulse { animation: scanPulse 2s ease-in-out infinite; }

@keyframes scanPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,.35); }
    50% { box-shadow: 0 0 0 6px rgba(59,130,246,0); }
}

.scan-stats-row { margin-bottom: 24px; }

.scan-alert-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.scan-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
    align-items: start;
}

.scan-form { padding: 24px; }

.scan-form-section {
    position: relative;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.scan-form-section-last {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.scan-step-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    margin-bottom: 14px;
    color: var(--text-secondary);
}

.scan-step-label span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--primary-glow);
    color: #93c5fd;
    font-size: 12px;
    font-weight: 800;
}

.sector-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 2px;
}

.sector-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    text-align: left;
    min-width: 140px;
}

.sector-pill:hover {
    border-color: var(--border-strong);
    background: var(--bg-hover);
    color: var(--text);
}

.sector-pill.active {
    border-color: rgba(59,130,246,.45);
    background: var(--primary-glow);
    color: var(--text);
    box-shadow: 0 0 0 1px rgba(59,130,246,.2);
}

.sector-pill-name { font-size: 13px; font-weight: 600; }
.sector-pill-price { font-size: 11px; color: #93c5fd; font-weight: 700; }

.scan-sector-select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.scan-region-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 12px;
}

.scan-turkey-toggle { cursor: pointer; margin: 0; flex: 0 0 auto; }

.scan-turkey-toggle input { position: absolute; opacity: 0; pointer-events: none; }

.scan-turkey-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    transition: all var(--transition);
    min-height: 100%;
}

.scan-turkey-toggle input:checked + .scan-turkey-box {
    border-color: rgba(59,130,246,.45);
    background: var(--primary-glow);
}

.scan-turkey-box strong { font-size: 13px; }
.scan-turkey-box small { font-size: 11px; color: var(--text-muted); }

.scan-city-search-wrap {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scan-city-count {
    font-size: 11px;
    color: var(--text-muted);
    padding-left: 2px;
}

.scan-city-grid { max-height: 240px; }

.scan-preview-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 14px 16px;
    margin: 16px 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.scan-preview-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.scan-preview-item strong { font-size: 14px; }

.scan-submit-btn {
    width: 100%;
    padding: 13px 20px;
    font-size: 14px;
}

.scan-aside { display: flex; flex-direction: column; gap: 16px; }

.scan-summary-card { padding: 20px; }
.scan-summary-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

.scan-tip-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.scan-tip-list li {
    padding-left: 14px;
    position: relative;
}

.scan-tip-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.scan-packages-details {
    padding: 0;
    overflow: hidden;
}

.scan-packages-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.scan-packages-summary::-webkit-details-marker { display: none; }

.scan-packages-summary h3 {
    font-size: 15px;
    font-weight: 600;
}

.package-list-compact {
    max-height: 360px;
    overflow-y: auto;
    padding: 0 12px 16px;
    border-top: 1px solid var(--border);
}

.package-item-compact {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.package-item-compact:last-child { border-bottom: none; }
.package-item-compact strong { grid-column: 1; font-size: 13px; }
.package-item-compact span {
    grid-column: 2;
    grid-row: 1 / span 2;
    color: #93c5fd;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}
.package-item-compact small { grid-column: 1; color: var(--text-muted); font-size: 11px; }

.scan-history-card { padding: 0; overflow: hidden; }
.scan-history-card > .card-header { padding: 20px 24px 16px; margin-bottom: 0; }
.scan-history-sub { margin-top: 4px; font-size: 12px; }

.scan-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px 20px;
}

.scan-history-item {
    display: block;
    position: relative;
    padding: 16px 18px 16px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
}

.scan-history-item:hover {
    border-color: rgba(59,130,246,.35);
    background: rgba(59,130,246,.04);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.scan-history-item--running,
.scan-history-item--pending {
    border-color: rgba(59,130,246,.25);
    box-shadow: inset 3px 0 0 var(--primary);
}

.scan-history-item--failed {
    border-color: rgba(239,68,68,.25);
    box-shadow: inset 3px 0 0 var(--danger);
}

.scan-history-item-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 12px;
}

.scan-history-id {
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: .03em;
}

.scan-history-item-head time {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 11px;
}

.scan-history-item-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.scan-history-item-body strong { font-size: 15px; }

.scan-history-region {
    font-size: 12px;
    color: var(--text-muted);
}

.scan-history-item-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12px;
    color: var(--text-secondary);
}

.scan-history-item-stats b { font-size: 14px; color: var(--text); }

.scan-history-item-error {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(239,68,68,.08);
    color: #fca5a5;
    font-size: 12px;
}

.scan-history-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition);
}

.scan-history-item:hover .scan-history-arrow { opacity: 1; color: #93c5fd; }

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 900px) {
    .scan-workspace { grid-template-columns: 1fr; }
    .scan-preview-bar { grid-template-columns: 1fr; }
    .scan-history-arrow { opacity: 1; position: static; transform: none; margin-top: 10px; display: block; }
}

@media (max-width: 700px) {
    .form-row-2 { grid-template-columns: 1fr; }
    .sector-pill { min-width: calc(50% - 4px); flex: 1; }
}

/* ─── Ayarlar & satış etiketleri ─── */
.settings-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.settings-tab {
    padding: 9px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.settings-tab.active, .settings-tab:hover {
    background: var(--primary-glow);
    color: #93c5fd;
}

.settings-panel { display: none; }
.settings-panel.active { display: block; }

.settings-subtitle {
    font-size: 13px;
    font-weight: 700;
    margin: 20px 0 10px;
    color: var(--text-secondary);
}

.settings-form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.mail-test-error p { margin: 8px 0 0; line-height: 1.5; }
.mail-test-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mail-test-hint {
    margin-top: 10px !important;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,.2);
    font-size: 13px;
    line-height: 1.55;
}
.mail-test-detail { margin-top: 10px; font-size: 13px; }
.mail-test-detail summary { cursor: pointer; color: var(--text-muted); }
.mail-test-detail code {
    display: block;
    margin-top: 8px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,.25);
    font-size: 12px;
    word-break: break-all;
    white-space: pre-wrap;
}

.mail-guide {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(59,130,246,.06);
    border: 1px solid rgba(59,130,246,.15);
    font-size: 13px;
    line-height: 1.55;
}
.mail-guide strong { display: block; margin-bottom: 6px; }
.mail-guide ol { margin: 8px 0 0 18px; padding: 0; }
.mail-guide li { margin-bottom: 4px; }
.mail-guide code { font-size: 11px; word-break: break-all; }

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.status-item {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.status-item strong { font-size: 13px; }
.status-ok { border-color: rgba(34,197,94,.3); }
.status-fail { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.05); }
.status-warn { border-color: rgba(234,179,8,.3); }

.sector-admin-list { display: flex; flex-direction: column; gap: 8px; }
.sector-admin-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    font-size: 13px;
}
.sector-admin-item span { color: #93c5fd; font-weight: 700; }
.sector-admin-item small { grid-column: 1 / -1; color: var(--text-muted); font-size: 11px; }

.settings-guide summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 8px 0; }

.sales-tags-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.sales-tag {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(249,115,22,.12);
    color: #fb923c;
    border: 1px solid rgba(249,115,22,.25);
}

.social-links-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.wa-preview {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 13px;
    white-space: pre-wrap;
    margin-bottom: 12px;
    line-height: 1.6;
}

.lead-actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
}

.scan-detail-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.scan-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

.scan-stat-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.scan-stat-value { font-size: 20px; font-weight: 700; }

.scan-meta-card { margin-bottom: 20px; }
.scan-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    font-size: 14px;
}

.scan-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.scan-detail-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.export-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.scan-progress-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

/* ─── v1.3 UI refresh ─── */
.data-source-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 18px;
    margin-bottom: 24px;
    background: rgba(59,130,246,.06);
    border: 1px solid rgba(59,130,246,.18);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.data-source-main { color: var(--text-secondary); line-height: 1.5; }
.data-source-main strong { color: var(--text); }

.cell-truncate {
    display: block;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-truncate-sm { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.compact-table td, .compact-table th { padding: 10px 12px; }

.work-queue-card { padding: 0; overflow: hidden; }
.work-queue-card > .card-header { padding: 18px 22px 0; margin-bottom: 0; }
.work-queue-table td { vertical-align: middle; }
.inline-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.filter-card-v2 { padding: 18px 22px; margin-bottom: 20px; }
.filter-form-inline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
}
.filter-actions-inline .btn-group { display: flex; gap: 8px; }

.leads-table-card { padding: 0; overflow: hidden; }
.leads-table .lead-name { max-width: 320px; }
.chip-mail { background: rgba(34,197,94,.1); color: #86efac; border-color: rgba(34,197,94,.2); }

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--border);
}
.pagination-info { font-size: 13px; color: var(--text-muted); }

/* Pipeline v2 */
.pipeline-board-v2 {
    display: grid;
    grid-template-columns: repeat(6, minmax(220px, 1fr));
    gap: 16px;
    align-items: start;
}

.pipeline-col-v2, .pipeline-col--new, .pipeline-col--contacted,
.pipeline-col--interested, .pipeline-col--proposal, .pipeline-col--won, .pipeline-col--lost {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.pipeline-col--new { border-top: 3px solid #3b82f6; }
.pipeline-col--contacted { border-top: 3px solid #22c55e; }
.pipeline-col--interested { border-top: 3px solid #8b5cf6; }
.pipeline-col--proposal { border-top: 3px solid #06b6d4; }
.pipeline-col--won { border-top: 3px solid #10b981; }
.pipeline-col--lost { border-top: 3px solid #71717a; }

.pipeline-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.pipeline-col-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary);
}

.pipeline-col-count {
    font-size: 12px;
    font-weight: 700;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 8px;
    color: var(--text-muted);
}

.pipeline-cards {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pipeline-card-v2 {
    display: block;
    padding: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    transition: border-color var(--transition), transform var(--transition);
}

.pipeline-card-v2:hover {
    border-color: rgba(59,130,246,.35);
    transform: translateY(-1px);
    text-decoration: none;
}

.pipeline-card-v2-top { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }

.pipeline-card-v2-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.pipeline-card-v2-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: var(--text-muted);
}

.pipeline-empty-v2 {
    text-align: center;
    padding: 32px 12px;
    font-size: 12px;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

/* Scan city picker v2 */
.city-quick-picks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.city-quick-label { font-size: 12px; color: var(--text-muted); margin-right: 4px; }

.city-quick-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.city-quick-btn:hover { border-color: rgba(59,130,246,.4); color: var(--text); }
.city-quick-clear { color: var(--text-muted); }

.scan-selected-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
    margin-bottom: 10px;
}

.city-chip {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-glow);
    color: #93c5fd;
    border: 1px solid rgba(59,130,246,.25);
}

.city-chip-empty { background: var(--bg-hover); color: var(--text-muted); border-color: var(--border); }
.city-chip-all { background: rgba(139,92,246,.12); color: #c4b5fd; border-color: rgba(139,92,246,.25); }

.scan-city-grid-v2 { max-height: 280px; }

.scan-info-panel { padding: 20px; }

.info-dl { display: flex; flex-direction: column; gap: 14px; }
.info-dl div { display: grid; gap: 4px; }
.info-dl dt { font-size: 12px; font-weight: 700; color: var(--text); }
.info-dl dd { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.5; }

.sector-admin-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

@media (max-width: 1100px) {
    .pipeline-board-v2 { grid-template-columns: repeat(3, minmax(200px, 1fr)); }
    .cell-truncate { max-width: 240px; }
}

@media (max-width: 768px) {
    .pipeline-board-v2 { grid-template-columns: 1fr 1fr; }
    .filter-form-inline { grid-template-columns: 1fr 1fr; }
}

/* ─── v1.4 — Lead list & Pipeline readability ─── */
.main-wide {
    max-width: 1560px;
    width: calc(100% - var(--sidebar-w));
}

.main-flush { padding-bottom: 32px; }

/* Dark scrollbars (global) */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.14);
    border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }

/* Lead list — card rows */
.leads-filter-panel {
    padding: 20px 22px;
    margin-bottom: 20px;
}

.leads-filter-form {
    display: grid;
    grid-template-columns: minmax(200px, 1.4fr) repeat(5, minmax(120px, 1fr)) auto;
    gap: 14px 16px;
    align-items: end;
}

.leads-filter-btns .btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

.leads-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lead-card {
    display: grid;
    grid-template-columns: 72px 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 18px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), background var(--transition);
}

.lead-card:hover {
    border-color: var(--border-strong);
    background: var(--bg-hover);
}

.lead-card--hot { border-left: 3px solid var(--hot); }
.lead-card--warm { border-left: 3px solid var(--warning); }
.lead-card--cold { border-left: 3px solid var(--text-muted); }

.lead-card-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.lead-card-score strong {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1;
}

.lead-card-temp {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
}

.lead-card--hot .lead-card-score strong { color: var(--hot); }
.lead-card--warm .lead-card-score strong { color: var(--warning); }

.lead-card-main { min-width: 0; }

.lead-card-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.35;
    word-break: break-word;
}

.lead-card-title:hover { color: #93c5fd; text-decoration: none; }

.lead-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.meta-dot { opacity: .45; user-select: none; }

.lead-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    max-width: 220px;
}

.lead-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    min-width: 108px;
}

.lead-card-actions .btn { width: 100%; justify-content: center; }

/* Pipeline v3 */
.pipeline-header { margin-bottom: 20px; }

.pipeline-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
}

.pipeline-board-v3 {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    min-width: min-content;
    padding-bottom: 8px;
}

.pipeline-col-v3 {
    width: 290px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 180px);
}

.pipeline-col-v3--new { border-top: 3px solid #3b82f6; }
.pipeline-col-v3--contacted { border-top: 3px solid #22c55e; }
.pipeline-col-v3--interested { border-top: 3px solid #8b5cf6; }
.pipeline-col-v3--proposal { border-top: 3px solid #06b6d4; }
.pipeline-col-v3--won { border-top: 3px solid #10b981; }
.pipeline-col-v3--lost { border-top: 3px solid #71717a; }

.pipeline-col-v3-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.pipeline-col-v3-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.pipeline-col-v3-count {
    font-size: 12px;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.pipeline-col-v3-body {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pipeline-card-v3 {
    display: block;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    transition: border-color var(--transition), transform var(--transition);
}

.pipeline-card-v3:hover {
    border-color: rgba(59,130,246,.35);
    transform: translateY(-1px);
    text-decoration: none;
}

.pipeline-card-v3--hot { box-shadow: inset 3px 0 0 var(--hot); }
.pipeline-card-v3--warm { box-shadow: inset 3px 0 0 var(--warning); }

.pipeline-card-v3-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.pipeline-score { font-size: 12px; font-weight: 700; }

.pipeline-card-v3-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 8px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pipeline-card-v3-sub {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
}

.pipeline-empty-v3 {
    padding: 28px 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

@media (max-width: 1100px) {
    .leads-filter-form {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .lead-card {
        grid-template-columns: 64px 1fr;
        grid-template-rows: auto auto;
    }
    .lead-card-tags,
    .lead-card-actions {
        grid-column: 2;
        justify-content: flex-start;
        max-width: none;
    }
    .lead-card-actions {
        flex-direction: row;
        min-width: 0;
    }
    .lead-card-actions .btn { width: auto; }
}

@media (max-width: 640px) {
    .leads-filter-form { grid-template-columns: 1fr; }
    .lead-card { grid-template-columns: 1fr; gap: 12px; }
    .lead-card-score { flex-direction: row; justify-content: flex-start; gap: 10px; }
    .pipeline-col-v3 { width: 260px; }
}

/* ─── Lead detail v2 ─── */
.lead-detail-page { display: flex; flex-direction: column; gap: 16px; }

.lead-hero { padding: 0; overflow: hidden; }
.lead-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,.15);
}
.lead-back { padding-left: 0; }

.lead-hero-body {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 24px 28px;
}

.lead-hero-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}
.lead-hero-score--hot { border-color: rgba(249,115,22,.35); background: rgba(249,115,22,.08); }
.lead-hero-score--warm { border-color: rgba(234,179,8,.35); background: rgba(234,179,8,.08); }
.lead-hero-score-num {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1;
}
.lead-hero-score--hot .lead-hero-score-num { color: var(--hot); }
.lead-hero-score--warm .lead-hero-score-num { color: var(--warning); }
.lead-hero-score-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-top: 6px;
}

.lead-hero-info { min-width: 0; }
.lead-hero-info h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin-bottom: 6px;
    line-height: 1.25;
    word-break: break-word;
}
.lead-hero-meta { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }
.lead-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.lead-hero-package {
    text-align: right;
    padding: 16px 20px;
    background: var(--primary-glow);
    border: 1px solid rgba(59,130,246,.2);
    border-radius: var(--radius-sm);
    min-width: 180px;
}
.lead-hero-package-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.lead-hero-package strong { display: block; color: #93c5fd; font-size: 14px; margin-bottom: 4px; }
.lead-hero-package-price { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }

.lead-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 14px 20px;
}
.lead-toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 4px 16px;
}
.lead-toolbar-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    min-width: 64px;
}
.lead-toolbar-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
    flex-shrink: 0;
}
.lead-inline-form { display: inline; margin: 0; }

.lead-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.lead-tag {
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.lead-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
}
.lead-facts-card { grid-column: 1; }
.lead-analysis-card { grid-column: 2; grid-row: 1 / 3; }
.lead-message-card { grid-column: 1; }

.lead-facts-dl {
    display: grid;
    gap: 0;
}
.lead-facts-dl div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.lead-facts-dl div:last-child { border-bottom: none; }
.lead-facts-dl dt { color: var(--text-muted); font-weight: 600; }
.lead-facts-dl dd { margin: 0; color: var(--text); word-break: break-word; }
.lead-url { font-size: 12px; word-break: break-all; }
.fact-ok { color: #4ade80; font-weight: 600; }
.fact-warn { color: #fbbf24; font-weight: 600; }

.lead-social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.lead-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin: 18px 0 10px;
}
.lead-section-label:first-of-type { margin-top: 0; }

.lead-insight {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.lead-insight--hot {
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.2);
    color: #fca5a5;
}
.lead-insight--info {
    background: rgba(59,130,246,.08);
    border: 1px solid rgba(59,130,246,.2);
    color: #93c5fd;
}

.lead-analysis-list,
.lead-missing-list,
.lead-found-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lead-analysis-item,
.lead-missing-list li,
.lead-found-list li {
    font-size: 13px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    line-height: 1.45;
}
.lead-analysis-item--ok {
    background: rgba(34,197,94,.06);
    border-left: 3px solid #22c55e;
    color: #86efac;
}
.lead-analysis-item--warn {
    background: rgba(249,115,22,.06);
    border-left: 3px solid var(--hot);
    color: #fdba74;
}
.lead-missing-list li {
    background: rgba(239,68,68,.06);
    border-left: 3px solid #ef4444;
    color: #fca5a5;
}
.lead-found-list li {
    background: rgba(34,197,94,.06);
    border-left: 3px solid #22c55e;
    color: #86efac;
}

.lead-message-body {
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    padding: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 320px;
    overflow-y: auto;
}
.lead-message-empty { padding: 8px 0; }
.lead-message-actions { margin-top: 14px; }

.lead-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.lead-pipeline-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.lead-pipeline-form .form-group { flex: 1; min-width: 160px; margin: 0; }

@media (max-width: 1024px) {
    .lead-hero-body { grid-template-columns: 1fr; text-align: left; }
    .lead-hero-score { flex-direction: row; gap: 12px; width: fit-content; }
    .lead-hero-package { text-align: left; }
    .lead-layout { grid-template-columns: 1fr; }
    .lead-analysis-card { grid-column: 1; grid-row: auto; }
    .lead-message-card { grid-column: 1; }
    .lead-toolbar-divider { display: none; }
    .lead-toolbar-group { padding: 8px 0; width: 100%; }
}

@media (max-width: 640px) {
    .lead-bottom-grid { grid-template-columns: 1fr; }
    .lead-facts-dl div { grid-template-columns: 1fr; gap: 4px; }
}

/* ─── Lead detail v3 (ld) ─── */
.ld { display: flex; flex-direction: column; gap: 20px; max-width: 1200px; }

.ld-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.ld-back {
    display: inline-block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-decoration: none;
}
.ld-back:hover { color: var(--primary); }
.ld-head h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
    margin: 0 0 6px;
}
.ld-sub { font-size: 14px; color: var(--text-muted); margin: 0; }

.ld-head-right {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-shrink: 0;
}
.ld-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}
.ld-score span { font-size: 32px; font-weight: 800; line-height: 1; }
.ld-score small { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.ld-score--hot { border-color: rgba(249,115,22,.4); background: rgba(249,115,22,.1); }
.ld-score--hot span { color: var(--hot); }
.ld-score--warm { border-color: rgba(234,179,8,.4); background: rgba(234,179,8,.1); }
.ld-score--warm span { color: var(--warning); }

.ld-package {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: var(--primary-glow);
    border: 1px solid rgba(59,130,246,.25);
    min-width: 160px;
}
.ld-package small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.ld-package strong { font-size: 13px; color: #93c5fd; margin: 4px 0 2px; }
.ld-package em { font-style: normal; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }

.ld-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 4px;
}
.ld-act {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.ld-act:hover { background: var(--bg-elevated); border-color: var(--text-muted); }
.ld-act--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.ld-act--primary:hover { filter: brightness(1.08); }
.ld-act--wa { background: rgba(37,211,102,.15); border-color: rgba(37,211,102,.35); color: #4ade80; }
.ld-act--ok { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.3); color: #86efac; }
.ld-act--muted { opacity: .55; cursor: not-allowed; border-style: dashed; }
.ld-act-form { display: inline; margin: 0; }
.ld-act-form button.ld-act { font-family: inherit; }

.ld-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}
.ld-col-main { display: flex; flex-direction: column; gap: 16px; }
.ld-col-side { position: sticky; top: 20px; }

.ld-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
}
.ld-block--sticky { position: sticky; top: 20px; }
.ld-block--row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.ld-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.ld-block-head .ld-block-title { margin: 0; }
.ld-block-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin: 0 0 14px;
}
.ld-half .ld-block-title { margin-bottom: 12px; }

.ld-tags {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
}
.ld-tags li {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.4;
}

.ld-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.ld-table th {
    text-align: left;
    width: 100px;
    padding: 10px 12px 10px 0;
    color: var(--text-muted);
    font-weight: 600;
    vertical-align: top;
}
.ld-table td {
    padding: 10px 0;
    color: var(--text);
    word-break: break-word;
    border-bottom: 1px solid var(--border);
}
.ld-table tr:last-child td { border-bottom: none; }
.ld-link { display: block; font-size: 12px; color: var(--primary); margin-top: 4px; word-break: break-all; }
.ld-web-type {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(34,197,94,.12);
    color: #86efac;
    margin-bottom: 4px;
}
.ld-web-type--portal { background: rgba(234,179,8,.12); color: #fbbf24; }
.ld-ok { color: #4ade80; font-weight: 600; }
.ld-warn { color: #fbbf24; font-weight: 600; }
.ld-muted { color: var(--text-muted); font-size: 13px; }
.ld-hint {
    margin: 14px 0 0;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: var(--radius-sm);
    background: rgba(234,179,8,.08);
    border: 1px solid rgba(234,179,8,.2);
    color: #fcd34d;
}

.ld-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin: 16px 0 8px;
}
.ld-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ld-list li {
    font-size: 13px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    line-height: 1.45;
}
.ld-list--reasons li {
    background: rgba(59,130,246,.06);
    border-left: 3px solid var(--primary);
    color: var(--text-secondary);
}
.ld-list--missing li {
    background: rgba(239,68,68,.06);
    border-left: 3px solid #ef4444;
    color: #fca5a5;
}
.ld-list--found li {
    background: rgba(34,197,94,.06);
    border-left: 3px solid #22c55e;
    color: #86efac;
}

.ld-message {
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    padding: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 360px;
    overflow-y: auto;
}
.ld-status-form { display: flex; flex-direction: column; }

@media (max-width: 960px) {
    .ld-body { grid-template-columns: 1fr; }
    .ld-col-side, .ld-block--sticky { position: static; }
    .ld-head { flex-direction: column; }
    .ld-head-right { width: 100%; }
    .ld-block--row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ld-tags { grid-template-columns: 1fr; }
    .ld-table th { width: 80px; }
}

/* ─── Dashboard queues + bulk + pipeline drag ─── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1024px) { .grid-3 { grid-template-columns: 1fr; } }

.queue-card { padding: 0; overflow: hidden; }
.queue-card .card-header { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.queue-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 18px; border-bottom: 1px solid var(--border);
}
.queue-item:last-child { border-bottom: none; }
.queue-name { font-weight: 600; font-size: 14px; display: block; color: var(--text); text-decoration: none; }
.queue-name:hover { color: var(--primary); }
.queue-item-main small { color: var(--text-muted); font-size: 12px; }
.queue-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.inline-form { display: inline; margin: 0; }

.bulk-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; margin-bottom: 12px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
}
.lead-card-check { display: flex; align-items: center; padding-left: 4px; }
.lead-card { grid-template-columns: 32px auto 1fr auto auto !important; }

.pipeline-card-v3.dragging { opacity: .5; }
.pipeline-drop-zone.drag-over { background: rgba(59,130,246,.08); border-radius: var(--radius-sm); }
.pipeline-card-v3-title { display: block; color: var(--text); text-decoration: none; font-weight: 600; }
.pipeline-card-v3-title:hover { color: var(--primary); }

.mail-guide {
    margin-bottom: 16px; padding: 14px 16px; border-radius: var(--radius-sm);
    background: rgba(59,130,246,.06); border: 1px solid rgba(59,130,246,.15);
    font-size: 13px; line-height: 1.55;
}
.mail-guide ol { margin: 8px 0 0 18px; }

.radar-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    margin-bottom: 24px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, rgba(16,185,129,.08), rgba(59,130,246,.06));
    border: 1px solid rgba(16,185,129,.22);
    transition: border-color .15s, box-shadow .15s;
}
.radar-banner:hover {
    border-color: rgba(16,185,129,.4);
    box-shadow: 0 4px 20px rgba(16,185,129,.08);
}
.radar-banner-main { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-secondary); }
.radar-banner-main strong { color: var(--text); font-size: 15px; }

.filter-bar { margin-bottom: 20px; padding: 16px 20px; }
.filter-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filter-form .form-group { margin: 0; min-width: 140px; }
