/* ============================================================
   ChatFlow — Design System PREMIUM
   SaaS modern: indigo/violet, umbre stratificate, glassmorphism subtil
   ============================================================ */

:root {
    /* ===== TEMA 1: LIGHT + ALBASTRU (default) ===== */
    --bg: #f4f6fb;
    --bg-soft: #eceff7;
    --surface: #ffffff;
    --surface-2: #f5f7fb;
    --border: #e5e8f1;
    --border-soft: #eef1f7;
    --text: #141824;
    --text-soft: #3f4658;
    --text-muted: #6b7280;

    --primary: #2563eb;
    --primary-2: #3b82f6;
    --primary-hover: #1d4ed8;
    --primary-soft: #eaf0fe;
    --accent-rgb: 37, 99, 235;
    --grad: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
    --grad-accent: linear-gradient(135deg, #2563eb, #3b82f6);
    --on-accent: #ffffff;

    --green: var(--primary-hover);
    --green-soft: #dcfce7;
    --red: #dc2626;
    --red-soft: #fee2e2;
    --amber: #d97706;
    --amber-soft: #fef3c7;
    --blue: #2563eb;
    --blue-soft: #eaf0fe;

    /* suprafete tematizabile */
    --sidebar-bg: linear-gradient(180deg, #ffffff, #f7f9fc);
    --topbar-bg: rgba(255, 255, 255, .82);
    --scrollbar: #cbd2e0;
    --chat-bg: #eef1f7;
    --dot: rgba(20, 24, 36, .05);
    --code: #2563eb;
    --tag-mix: #ffffff;
    --tag-ink: #0b1020;

    /* ===== SIDEBAR (light = alb, stil ManyChat) ===== */
    --side-bg: #ffffff;
    --side-border: #edeef2;
    --side-text: #5b6472;
    --side-text-active: #111827;
    --side-icon: #6b7280;
    --side-hover: #f5f6f8;
    --side-active: #eef0f3;
    --side-logo: #111827;
    --side-label: #9aa1ad;
    --side-foot: #f7f8fa;

    --radius: 14px;
    --radius-sm: 9px;
    --radius-lg: 20px;
    --shadow-xs: 0 1px 2px rgba(20, 24, 36, .06);
    --shadow-sm: 0 1px 3px rgba(20, 24, 36, .08), 0 1px 2px rgba(20, 24, 36, .05);
    --shadow: 0 8px 24px -8px rgba(20, 24, 36, .16), 0 2px 8px -2px rgba(20, 24, 36, .08);
    --shadow-lg: 0 24px 56px -12px rgba(20, 24, 36, .24);
    --shadow-primary: 0 8px 24px -6px rgba(37, 99, 235, .32);
    --sidebar-w: 256px;
    --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color-scheme: light;
}

:root[data-theme="dark"] {
    /* ===== TEMA 2: DARK + ALBASTRU ===== */
    --bg: #0b1020;
    --bg-soft: #10162a;
    --surface: #151b2e;
    --surface-2: #1b2237;
    --border: #232b42;
    --border-soft: #1b2236;
    --text: #e8ecf6;
    --text-soft: #aab2c8;
    --text-muted: #8b93a9;

    --primary: #60a5fa;
    --primary-2: #93c5fd;
    --primary-hover: #3b82f6;
    --primary-soft: rgba(96, 165, 250, .14);
    --accent-rgb: 96, 165, 250;
    --grad: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    --grad-accent: linear-gradient(135deg, #3b82f6, #60a5fa);
    --on-accent: #04152e;

    --green: #34d399;
    --green-soft: rgba(52, 211, 153, .15);
    --red: #f87171;
    --red-soft: rgba(248, 113, 113, .15);
    --amber: #fbbf24;
    --amber-soft: rgba(251, 191, 36, .15);
    --blue: #60a5fa;
    --blue-soft: rgba(96, 165, 250, .16);

    --sidebar-bg: linear-gradient(180deg, #0f1526, #0a0f1e);
    --topbar-bg: rgba(15, 21, 38, .82);
    --scrollbar: #2c3550;
    --chat-bg: #0b1020;
    --dot: rgba(255, 255, 255, .025);
    --code: #93c5fd;
    --tag-mix: #12141b;
    --tag-ink: #ffffff;

    --side-bg: #0d1220;
    --side-border: rgba(255, 255, 255, .06);
    --side-text: #99a0b5;
    --side-text-active: #ffffff;
    --side-icon: #7e879e;
    --side-hover: rgba(255, 255, 255, .04);
    --side-active: rgba(255, 255, 255, .06);
    --side-logo: #ffffff;
    --side-label: #4d556b;
    --side-foot: rgba(255, 255, 255, .035);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .35), 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 6px 20px -6px rgba(0, 0, 0, .5), 0 2px 8px -2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 24px 56px -12px rgba(0, 0, 0, .65);
    --shadow-primary: 0 8px 24px -6px rgba(59, 130, 246, .4);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-hover); }
code {
    background: rgba(var(--accent-rgb), .12); color: var(--code);
    padding: 2px 7px; border-radius: 6px; font-size: 12px;
    font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; word-break: break-all;
}
svg { width: 20px; height: 20px; display: block; }
::selection { background: rgba(var(--accent-rgb), .28); }

/* ---------- scrollbars ---------- */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-muted); background-clip: content-box; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 38px 44px; flex: 1; max-width: 1440px; width: 100%; margin: 0 auto; }
.layout-full { overflow: hidden; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: var(--side-bg);
    color: var(--side-text); display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    border-right: 1px solid var(--side-border);
}
.sidebar-logo {
    display: flex; align-items: center; gap: 12px;
    padding: 22px 20px 16px; font-size: 19px; font-weight: 800; color: var(--side-logo);
    letter-spacing: -.03em;
}
.logo-mark {
    width: 36px; height: 36px; border-radius: 10px; background: var(--grad);
    display: flex; align-items: center; justify-content: center;
}
.logo-mark svg { width: 21px; height: 21px; fill: #fff; stroke: #fff; }
.sidebar-nav { flex: 1; padding: 6px 12px 14px; overflow-y: auto; }
.nav-section-label {
    font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--side-label); padding: 16px 12px 7px;
}
.nav-section-label:first-child { padding-top: 6px; }
.nav-sep { height: 1px; background: var(--side-border); margin: 8px 12px; }
.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin-bottom: 1px;
    border-radius: 9px; color: var(--side-text); font-weight: 500; font-size: 14px;
    position: relative; transition: color .14s, background .14s;
}
.nav-icon { display: grid; place-items: center; flex-shrink: 0; }
.nav-icon svg { width: 18px; height: 18px; color: var(--side-icon); transition: color .14s; }
.nav-item:hover { background: var(--side-hover); color: var(--side-text-active); }
.nav-item:hover .nav-icon svg { color: var(--side-text-active); }
.nav-item.active { background: var(--side-active); color: var(--side-text-active); font-weight: 600; }
.nav-item.active .nav-icon svg { color: var(--side-text-active); }

.sidebar-footer {
    padding: 11px; margin: 10px; border-radius: 12px;
    background: var(--side-foot); border: 1px solid var(--side-border);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.user-chip { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar {
    width: 38px; height: 38px; border-radius: 11px; background: var(--grad); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
    flex-shrink: 0; box-shadow: var(--shadow-primary);
}
.user-meta { min-width: 0; }
.user-meta strong { display: block; color: var(--side-text-active); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: var(--side-label); font-size: 11px; text-transform: capitalize; }
.btn-logout {
    background: transparent; border: 0; cursor: pointer; color: var(--side-icon); padding: 8px;
    border-radius: 9px; display: flex; transition: all .15s;
}
.btn-logout:hover { background: var(--red-soft); color: var(--red); }
.btn-logout svg { width: 18px; height: 18px; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    display: flex; align-items: center; gap: 18px;
    background: var(--topbar-bg); backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0 28px; min-height: 80px; position: sticky; top: 0; z-index: 40;
}
.topbar-heading { flex: 1; min-width: 0; }
.page-title { font-size: 23px; font-weight: 800; margin: 0; letter-spacing: -.03em; line-height: 1.2; }
.page-desc { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; max-width: 720px; }
.sidebar-toggle { display: none; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* butoane iconita premium */
.topbar-icon-btn {
    width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-soft); display: grid; place-items: center;
    cursor: pointer; position: relative; transition: color .16s, border-color .16s, background .16s;
}
.topbar-icon-btn:hover { color: var(--primary); border-color: rgba(var(--accent-rgb), .4); background: var(--primary-soft); }
.topbar-icon-btn svg { width: 19px; height: 19px; }

/* user chip in header */
.topbar-user { display: flex; align-items: center; gap: 10px; padding: 5px 13px 5px 5px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.topbar-user-av { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.topbar-user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.topbar-user-meta strong { font-size: 13px; font-weight: 700; color: var(--text); }
.topbar-user-meta small { font-size: 11px; color: var(--text-muted); text-transform: capitalize; }

/* Notificari */
.notif-wrap { position: relative; }
.notif-badge {
    position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
    background: var(--red); color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px;
    display: grid; place-items: center; border: 2px solid var(--surface);
}
.notif-panel {
    position: absolute; right: 0; top: 52px; width: 384px; max-width: calc(100vw - 32px);
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; animation: pop-in .16s ease-out;
}
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border-soft); }
.notif-head-title { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; color: var(--text); }
.notif-count { background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.notif-count:empty { display: none; }
.notif-mark { background: none; border: 0; color: var(--primary); font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: var(--font); }
.notif-mark:hover { text-decoration: underline; }
.notif-list { max-height: 420px; overflow-y: auto; padding: 6px; }
.notif-item { display: flex; gap: 12px; padding: 11px 12px; border-radius: 12px; text-decoration: none; color: inherit; transition: background .14s; position: relative; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--primary-soft); }
.notif-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 17px; background: var(--surface-2); flex-shrink: 0; }
.notif-item.unread .notif-ico { background: var(--surface); }
.notif-body-wrap { flex: 1; min-width: 0; }
.notif-title { font-size: 13.5px; font-weight: 700; color: var(--text); display: block; }
.notif-text { margin: 3px 0 0; font-size: 12.5px; color: var(--text-soft); line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.notif-unread-dot { position: absolute; top: 15px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.notif-empty { text-align: center; padding: 44px 16px; color: var(--text-muted); font-size: 13px; }
.notif-empty-ico { font-size: 34px; opacity: .4; margin-bottom: 8px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid transparent; cursor: pointer; border-radius: 10px;
    padding: 9px 16px; font-size: 13.5px; font-weight: 600; font-family: var(--font);
    transition: all .16s ease; white-space: nowrap; line-height: 1;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 24px -6px rgba(var(--accent-rgb), .55); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--surface); color: var(--text-soft); border-color: var(--border); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: rgba(var(--accent-rgb), .35); background: var(--surface-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-icon { padding: 9px; border-radius: 10px; }
.btn-icon svg { width: 20px; height: 20px; }
.btn-danger { color: var(--red) !important; }
.btn-danger:hover { background: var(--red-soft) !important; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
.card .btn-row { padding: 14px 26px 22px; }

/* ============================================================
   INPUTS
   ============================================================ */
.input {
    width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px;
    font-size: 14px; font-family: var(--font); background: var(--surface); color: var(--text);
    transition: all .15s; box-shadow: var(--shadow-xs);
}
.input::placeholder { color: var(--text-muted); opacity: .8; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3.5px rgba(var(--accent-rgb), .16); }
.input-sm { padding: 6px 11px; font-size: 13px; width: auto; border-radius: 8px; }
select.input { cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b91a7' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px;
}
textarea.input { resize: vertical; line-height: 1.55; }
.field-label { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-soft); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .4px; }
.field-label small { text-transform: none; font-weight: 400; letter-spacing: 0; color: var(--text-muted); }
.form-stack .input { margin-bottom: 2px; }
.form-stack .btn { margin-top: 18px; }

/* ============================================================
   CARDS & GRIDS
   ============================================================ */
.card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .028), transparent 120px),
        var(--surface);
    border: 1px solid var(--border); border-radius: 20px;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .04);
    margin-bottom: 26px; overflow: hidden; position: relative;
    transition: box-shadow .25s, border-color .25s, transform .25s;
}
.card:hover { border-color: rgba(var(--accent-rgb), .26); box-shadow: var(--shadow), 0 0 0 1px rgba(var(--accent-rgb), .1); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; flex-wrap: wrap; border-bottom: 1px solid var(--border-soft); }
.card-head:last-child { border-bottom: 0; }
.card-head h2 { font-size: 17px; font-weight: 700; margin: 0; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.card-head h2::before {
    content: ''; width: 4px; height: 20px; border-radius: 3px;
    background: var(--grad-accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), .5); flex-shrink: 0;
}
.card-desc { font-size: 13px; color: var(--text-muted); margin: 5px 0 0; width: 100%; line-height: 1.5; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.grid-13 { grid-template-columns: 1.7fr 1fr; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; margin-bottom: 26px; }
.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 90px), var(--surface);
    border: 1px solid var(--border); border-radius: 20px;
    padding: 22px 22px 20px; box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .04);
    position: relative; overflow: hidden;
    transition: transform .22s, box-shadow .22s, border-color .22s;
}
.stat-card::after {
    content: ''; position: absolute; top: -30px; right: -30px; width: 110px; height: 110px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), .16), transparent 70%);
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), .28); box-shadow: var(--shadow), 0 0 0 1px rgba(var(--accent-rgb), .12); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 36px; font-weight: 800; margin-top: 12px; letter-spacing: -.035em; line-height: 1;
    color: var(--text); }
.stat-card.accent-red .stat-value { color: var(--red); }
.stat-card.accent-red::after { background: radial-gradient(circle, rgba(248, 113, 113, .16), transparent 70%); }

/* ============================================================
   DASHBOARD
   ============================================================ */
/* bento grid */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; align-items: stretch; }
.bento-item { grid-column: span var(--span, 12); min-width: 0; }
.bento-item.card { margin-bottom: 0; }

/* bara welcome — plată, ca în ManyChat (text pe pagină, fără cutie) */
.dash-welcome { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    padding: 4px 2px 2px; background: transparent; border: none; box-shadow: none; }
.dash-welcome h2 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 4px; }
.dash-welcome p { color: var(--text-muted); font-size: 13.5px; margin: 0; }
.dash-welcome-act { display: flex; gap: 10px; flex-wrap: wrap; }

/* Start aici */
.start-here .card-head { margin-bottom: 4px; }
.sh-progress { font-size: 12.5px; font-weight: 700; color: var(--primary-2);
    background: var(--primary-soft); padding: 4px 11px; border-radius: 999px; }
.sh-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sh-step { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: 13px;
    border: 1px solid var(--border); background: var(--surface-2); transition: border-color .14s, background .14s; }
.sh-step:hover { border-color: rgba(var(--accent-rgb), .4); background: var(--surface); }
.sh-check { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
    font-size: 13px; font-weight: 800; color: var(--text-muted); background: var(--surface);
    border: 1.5px solid var(--border); }
.sh-step.done .sh-check { color: #fff; background: var(--green); border-color: var(--green); }
.sh-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sh-main strong { font-size: 14px; font-weight: 700; }
.sh-step.done .sh-main strong { color: var(--text-muted); }
.sh-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sh-arrow { color: var(--text-faint); flex-shrink: 0; }
.sh-arrow svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .sh-steps { grid-template-columns: 1fr; } }

/* KPI vertical — plat, calm */
.kpi { display: flex; flex-direction: column; padding: 20px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--border); box-shadow: none;
    transition: border-color .16s ease; }
.kpi:hover { border-color: rgba(var(--accent-rgb), .32); }
.kpi-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px;
    background: var(--primary-soft); color: var(--primary-2); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .2); }
.kpi-ico svg { width: 22px; height: 22px; }
.kpi[data-accent="red"] .kpi-ico { background: rgba(248, 113, 113, .13); color: #fca5a5; box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .25); }
.kpi-val { font-size: 32px; font-weight: 800; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums;
    color: var(--text); }
.kpi[data-accent="red"] .kpi-val { color: var(--red); }
.kpi-lbl { font-size: 12.5px; color: var(--text-muted); font-weight: 600; margin-top: 9px; }

/* icon in card-head */
.ch-ico { display: inline-grid; place-items: center; color: var(--primary-2); }
.ch-ico svg { width: 19px; height: 19px; }
.card-head .btn svg { width: 15px; height: 15px; }

/* stare sistem */
.sys-card { display: flex; flex-wrap: wrap; padding: 6px; }
.sys-item { flex: 1 1 200px; display: flex; align-items: center; gap: 13px; padding: 16px 20px; position: relative; }
.sys-item:not(:last-child)::after { content: ''; position: absolute; right: 0; top: 22%; bottom: 22%; width: 1px; background: var(--border-soft); }
.sys-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
    background: var(--primary-soft); color: var(--primary-2); }
.sys-ico svg { width: 20px; height: 20px; }
.sys-item[data-accent="red"] .sys-ico { background: rgba(248, 113, 113, .13); color: #fca5a5; }
.sys-txt { display: flex; flex-direction: column; }
.sys-txt b { font-size: 20px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.sys-txt small { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* responsive bento */
@media (max-width: 1000px) { .bento-item { grid-column: span 6 !important; } .bento-item.dash-welcome, .bento-item.sys-card { grid-column: span 12 !important; } }
@media (max-width: 620px) { .bento-item { grid-column: span 12 !important; } }

/* bare pe platforma */
.plat-bars { padding: 18px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.plat-bar-row { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 16px; }
.plat-bar-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.plat-bar-track { height: 10px; background: var(--border); border-radius: 999px; overflow: hidden; }
.plat-bar-fill { display: block; height: 100%; border-radius: 999px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.plat-bar-val { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); text-align: right; }
.plat-bar-new { font-size: 11px; font-weight: 700; color: var(--primary-2); }

/* liste dashboard (lead-uri, conversatii) */
.dash-list { padding: 8px; }
.dash-row { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 13px; transition: background .14s; }
.dash-row:hover { background: var(--surface-2); }
.dash-row-main { flex: 1; min-width: 0; }
.dash-row-main strong { font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.dash-row-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.dash-row-time { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   TABLES
   ============================================================ */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 15px 26px; font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.table td { padding: 17px 26px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; font-size: 13.5px; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: var(--surface-2); }
.text-muted { color: var(--text-muted); }
.empty { color: var(--text-muted); text-align: center; padding: 56px 16px !important; font-size: 14px; }

/* ============================================================
   SECȚIUNI FORMULAR + SWITCH (modal automatizare etc.)
   ============================================================ */
.auto-section { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px;
    padding: 15px 18px 18px; margin-top: 14px; }
.auto-section-head { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 14.5px;
    color: var(--text); letter-spacing: -.01em; }
.auto-section-head .step-num { width: 25px; height: 25px; border-radius: 8px; background: var(--primary-soft);
    color: var(--primary); display: grid; place-items: center; font-size: 12.5px; font-weight: 800; flex-shrink: 0; }
.auto-section-head .statetoggle { margin-left: auto; }
.auto-section .field-label:first-of-type { margin-top: 14px; }

/* pastila de stare — Pornit (verde) / Oprit (gri). Imposibil de confundat. */
.statetoggle { display: inline-flex; cursor: pointer; }
.statetoggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.statetoggle-ui {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px 7px 9px; border-radius: 999px;
    font-weight: 800; font-size: 12.5px; letter-spacing: .3px; user-select: none; white-space: nowrap;
    background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); transition: all .18s ease;
}
.statetoggle-ui::before {
    content: ''; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
    background: transparent; box-shadow: inset 0 0 0 2.5px #8a93a8; transition: all .18s ease;
}
.statetoggle-ui::after { content: 'Oprit'; }
.statetoggle:hover .statetoggle-ui { border-color: #5a6278; }
.statetoggle input:checked + .statetoggle-ui {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary)); color: var(--on-accent); border-color: transparent;
    box-shadow: 0 5px 16px -5px rgba(var(--accent-rgb), .7);
}
.statetoggle input:checked + .statetoggle-ui::before { background: var(--on-accent); box-shadow: inset 0 0 0 2.5px var(--on-accent); }
.statetoggle input:checked + .statetoggle-ui::after { content: 'Pornit'; }
.statetoggle input:focus-visible + .statetoggle-ui { outline: 2px solid rgba(var(--accent-rgb), .55); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 14px; color: var(--text); font-weight: 500; }

/* thumbnail postare in tabel */
.auto-thumb { background-size: cover; background-position: center; background-color: var(--surface-2); }

/* ============================================================
   WIZARD (pași orizontali — modal automatizare)
   ============================================================ */
.wiz-steps { display: flex; gap: 6px; margin: 18px 0 20px; }
.wiz-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 8px;
    border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 700; color: var(--text-muted); transition: all .16s; }
.wiz-tab .wiz-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
    background: var(--border); color: var(--text-muted); font-size: 12px; font-weight: 800; flex-shrink: 0; transition: all .16s; }
.wiz-tab:hover { border-color: rgba(var(--accent-rgb), .3); color: var(--text); }
.wiz-tab.done { color: var(--text); }
.wiz-tab.done .wiz-n { background: rgba(var(--accent-rgb), .85); color: var(--on-accent); font-size: 0; }
.wiz-tab.done .wiz-n::after { content: '✓'; font-size: 12px; }
.wiz-tab.active { border-color: transparent; background: linear-gradient(135deg, var(--primary-hover), var(--primary)); color: var(--on-accent);
    box-shadow: 0 6px 16px -6px rgba(var(--accent-rgb), .6); }
.wiz-tab.active .wiz-n { background: rgba(0, 0, 0, .18); color: var(--on-accent); }

.wiz-body { min-height: 210px; }
.wiz-panel { display: none; animation: wiz-in .22s ease; }
.wiz-panel.active { display: block; }
@keyframes wiz-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.wiz-hint { color: var(--text-muted); font-size: 13px; margin: 0 0 14px; line-height: 1.5; }
.wiz-panel .field-label:first-of-type { margin-top: 4px; }

.wiz-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px; margin-bottom: 8px; }
.wiz-toggle-row strong { display: block; font-size: 14px; color: var(--text); }
.wiz-toggle-row small { color: var(--text-muted); font-size: 12px; }

.wiz-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.wiz-footer-right { display: flex; gap: 8px; }
@media (max-width: 560px) { .wiz-tab .wiz-lbl { display: none; } .wiz-tab { padding: 11px 6px; } }

/* ============================================================
   HERO CONTACT (pagina editare/profil)
   ============================================================ */
.contact-hero {
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(var(--accent-rgb), .1), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 140px),
        var(--surface);
}
.hero-top { display: flex; align-items: center; gap: 18px; padding: 26px 28px 22px; flex-wrap: wrap; }
.hero-av { width: 60px; height: 60px; border-radius: 17px; font-size: 23px; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .5); }
.hero-id { flex: 1; min-width: 180px; }
.hero-id h2 { font-size: 23px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 7px; }
.hero-meta-row { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.hero-meta-row strong { color: var(--text); }
.hero-score { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.score-lg .score-track { width: 130px; height: 8px; }
.score-lg b { font-size: 22px; font-weight: 800; }
.hero-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
    background: var(--border-soft); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.hero-facts .fact { background: var(--surface); padding: 15px 20px; }
.hero-facts .fact label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 700; margin-bottom: 5px; }
.hero-facts .fact b { font-size: 14px; font-weight: 600; color: var(--text); word-break: break-word; }
.hero-actions { padding: 18px 28px !important; }

/* ============================================================
   LISTĂ ÎMBOGĂȚITĂ (avatar, canal, scor, temperatură, acțiuni)
   ============================================================ */
/* avatar cu inițiale */
.av { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    font-weight: 800; font-size: 14px; color: var(--on-accent); flex-shrink: 0; letter-spacing: -.02em; }
.av-g0 { background: linear-gradient(135deg, var(--primary-2), var(--primary-hover)); }
.av-g1 { background: linear-gradient(135deg, #f472b6, #db2777); color: #2a0716; }
.av-g2 { background: linear-gradient(135deg, #60a5fa, #2563eb); color: #04152e; }
.av-g3 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #2a1a02; }
.av-g4 { background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #17032e; }
/* avatar canal (logo platforma) */
.chan-av { font-size: 17px; color: #fff; }
.av.chan-messenger { background: linear-gradient(135deg, #0084ff, #0064d1); }
.av.chan-instagram { background: linear-gradient(135deg, #f9ce34, #ee2a7b 45%, #6228d7); }
.av.chan-whatsapp  { background: linear-gradient(135deg, #25d366, #128c7e); }
.av.chan-webchat   { background: linear-gradient(135deg, #a78bfa, #7c3aed); }

/* celula persoana: avatar + nume + sub-linie */
.who { display: flex; align-items: center; gap: 12px; }
.who .who-main strong { font-weight: 700; display: block; color: var(--text); }
.who .who-main a { color: var(--text); }
.who .who-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

/* punct canal */
.chan { display: inline-flex; align-items: center; gap: 6px; }
.chan .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.chan-messenger .dot { background: #3b82f6; }
.chan-instagram .dot { background: #ec4899; }
.chan-whatsapp .dot  { background: var(--primary); }
.chan-webchat .dot   { background: #a78bfa; }

/* bara de scor */
.score { display: flex; align-items: center; gap: 9px; }
.score b { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 22px; color: var(--text); }
.score-track { width: 60px; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.score-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary-hover), var(--primary-2)); }

/* cip temperatura */
.temp { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
    padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.temp-cold { color: var(--blue); background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); }
.temp-warm { color: var(--amber); background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.temp-hot  { color: var(--red); background: var(--red-soft); border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); }

/* actiuni la hover pe rand */
.row-act { display: inline-flex; gap: 6px; opacity: 0; transition: opacity .14s; }
.table tbody tr:hover .row-act { opacity: 1; }
.ico-btn { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
    color: var(--text-muted); display: inline-grid; place-items: center; cursor: pointer; font-size: 14px;
    text-decoration: none; transition: all .14s; }
.ico-btn:hover { color: var(--primary); border-color: rgba(var(--accent-rgb), .4); background: var(--primary-soft); }
.ico-btn.danger:hover { color: var(--red); border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .1); }

/* ============================================================
   BADGES & PILLS
   ============================================================ */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .01em; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-slate { background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--border); }

.platform-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 7px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--border); }
.p-messenger { background: rgba(59, 130, 246, .18); color: #93c5fd; }
.p-instagram { background: rgba(219, 39, 119, .18); color: #f9a8d4; }
.p-whatsapp { background: rgba(var(--accent-rgb), .18); color: var(--code); }
.p-webchat { background: rgba(45, 212, 191, .18); color: #7be3d5; }

.tag-cell { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
    background: color-mix(in srgb, var(--tag-color, var(--primary)) 22%, var(--tag-mix)); color: color-mix(in srgb, var(--tag-color, var(--primary)) 72%, var(--tag-ink));
    border: 1px solid color-mix(in srgb, var(--tag-color, var(--primary)) 40%, var(--tag-mix));
}
.tag-x { background: none; border: 0; cursor: pointer; color: inherit; font-size: 14px; padding: 0; line-height: 1; opacity: .7; }
.tag-x:hover { opacity: 1; }

/* ============================================================
   ALERTS / PAGINATION / TABS
   ============================================================ */
.alert { padding: 13px 18px; border-radius: 11px; margin-bottom: 18px; font-size: 13.5px; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; }
.alert-info { background: var(--blue-soft); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 32%, transparent); }
.alert-error { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 32%, transparent); }

.pagination { display: flex; align-items: center; gap: 6px; padding: 16px 20px; flex-wrap: wrap; }
.page-link { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); color: var(--text-soft); font-size: 13px; font-weight: 600; transition: all .14s; }
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-primary); }

.tabs { display: flex; gap: 4px; padding: 12px 14px 0; border-bottom: 1px solid var(--border); }
.tab { padding: 10px 18px; border-radius: 9px 9px 0 0; color: var(--text-muted); font-weight: 600; font-size: 13.5px; transition: all .14s; }
.tab.active { background: var(--primary-soft); color: var(--primary); }
.tab:hover { color: var(--text); }

.filter-bar { display: flex; gap: 12px; padding: 20px 26px; flex-wrap: wrap; border-bottom: 1px solid var(--border-soft); }
.filter-bar .input { width: auto; flex: 1; min-width: 150px; }
.filter-bar input[type="search"] { flex: 2; }

/* ============================================================
   MODALS
   ============================================================ */
.modal {
    background:
        radial-gradient(120% 100% at 50% -20%, rgba(var(--accent-rgb), .1), transparent 50%),
        var(--surface);
    border: 1px solid rgba(var(--accent-rgb), .22); border-radius: 22px;
    box-shadow: var(--shadow-lg), 0 0 80px -24px rgba(var(--accent-rgb), .35), inset 0 1px 0 rgba(255, 255, 255, .06);
    padding: 28px; width: 460px; max-width: 94vw; max-height: 90vh; overflow-y: auto; color: var(--text);
    animation: modal-in .24s cubic-bezier(.2, .8, .2, 1);
}
.modal-lg { width: 700px; }
.modal::backdrop { background: rgba(6, 8, 12, .72); backdrop-filter: blur(8px) saturate(140%); animation: fade-in .2s; }
.modal h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.modal h3::before {
    content: ''; width: 5px; height: 22px; border-radius: 3px;
    background: var(--grad-accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), .5);
}
.modal-sub { color: var(--text-muted); font-size: 13.5px; margin: 0 0 20px; padding-left: 15px; line-height: 1.55; }

@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; padding: 14px 26px 20px; }
.profile-grid .field-label { margin: 0 0 4px; }
.notes-list { padding: 0 26px 22px; }
.note-item { padding: 12px 0; border-top: 1px solid var(--border-soft); font-size: 13px; }
.note-meta { color: var(--text-muted); font-size: 12px; margin-bottom: 3px; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
    position: fixed; bottom: 26px; right: 26px; background: #171a2b; color: #fff;
    padding: 13px 20px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 200;
    font-size: 14px; font-weight: 500; animation: toast-in .22s cubic-bezier(.2, .8, .2, 1);
    display: flex; align-items: center; gap: 9px; max-width: 380px;
}
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.toast.error { background: #7a271a; }
.toast.error::before { background: #ff8078; }
@keyframes toast-in { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
    background: radial-gradient(1200px 600px at 20% -10%, rgba(var(--accent-rgb), .16), transparent 60%),
                radial-gradient(900px 500px at 100% 100%, rgba(var(--accent-rgb), .12), transparent 55%),
                var(--bg-soft);
    padding: 20px;
}
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 40px; width: 420px; max-width: 100%; }
.auth-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; margin-bottom: 22px; }
.auth-logo .logo-mark { width: 34px; height: 34px; }
.auth-card h1 { font-size: 24px; font-weight: 800; margin: 0 0 5px; letter-spacing: -.03em; }
.auth-sub { color: var(--text-muted); margin: 0 0 22px; font-size: 14px; }
.auth-card .btn-block { margin-top: 20px; padding: 12px; font-size: 14.5px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; }

/* ============================================================
   LIVE CHAT
   ============================================================ */
/* ============================================================
   /conversations — LIVE CHAT (redesign curat, stil ManyChat)
   Iconite: Lucide (.licon). Culori din tokenii --mc-* (definiti mai jos).
   ============================================================ */
.chat-layout {
    display: grid; grid-template-columns: 232px 385px 1fr 300px;
    height: calc(100vh - 74px - 52px);
    background: var(--mc-n0); border: 1px solid var(--mc-n75); border-radius: 14px; overflow: hidden;
}
.chat-layout .licon { width: 18px; height: 18px; display: block; flex-shrink: 0; }

/* ---- Col 1: subnav ---- */
.chat-subnav { border-right: 1px solid var(--mc-n75); background: var(--mc-n0); padding: 14px 12px;
    overflow-y: auto; display: flex; flex-direction: column; gap: 1px; min-height: 0; }
.subnav-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 12px; border: none;
    background: transparent; border-radius: 10px; color: var(--mc-n700); font-size: 14px; font-weight: 500;
    cursor: pointer; text-align: left; transition: background .14s, color .14s; }
.subnav-item:hover { background: var(--mc-n50); }
.subnav-item.active { color: var(--mc-n800); font-weight: 600; }
.subnav-ico { display: grid; place-items: center; color: var(--mc-n500); flex-shrink: 0; }
.subnav-item.active .subnav-ico { color: inherit; }
.subnav-heart { color: #e0219b; }
.subnav-heart .licon { fill: currentColor; }
.subnav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subnav-count { font-size: 12px; font-weight: 600; color: var(--mc-n400); }
.subnav-section { margin-top: 14px; }
.subnav-section-head { display: flex; align-items: center; justify-content: space-between; }
.subnav-section-toggle { display: flex; align-items: center; gap: 8px; flex: 1; border: none; background: transparent;
    cursor: pointer; padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--mc-n700); }
.subnav-section-toggle:hover { background: var(--mc-n50); }
.subnav-section-toggle > span:nth-child(2) { flex: 1; text-align: left; }
.subnav-chevron { display: grid; place-items: center; color: var(--mc-n400); transition: transform .16s; }
.subnav-chevron .licon { width: 15px; height: 15px; }
.subnav-section.open .subnav-chevron { transform: rotate(90deg); }
.subnav-add { display: grid; place-items: center; text-decoration: none; color: var(--mc-n400);
    width: 28px; height: 28px; border-radius: 8px; }
.subnav-add .licon { width: 16px; height: 16px; }
.subnav-add:hover { color: var(--mc-blue); background: var(--mc-n50); }
.subnav-taglist { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; }
.subnav-taglist.collapsed { display: none; }
.subnav-empty { padding: 6px 12px; font-size: 12.5px; color: var(--mc-n400); }
.subnav-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.subnav-tag { font-weight: 500; font-size: 13.5px; }

/* ---- Col 2: lista conversatii ---- */
.chat-list-pane { border-right: 1px solid var(--mc-n75); display: flex; flex-direction: column;
    min-width: 0; min-height: 0; background: var(--mc-n0); }
.chat-list { flex: 1; overflow-y: auto; padding: 6px 8px; }
.chat-list .empty { padding: 40px 16px; text-align: center; color: var(--mc-n400); font-size: 13.5px; }
.chat-list-item { display: flex; gap: 12px; padding: 12px; cursor: pointer; align-items: center;
    transition: background .12s; position: relative; border-radius: 10px; }
.chat-list-item:hover { background: var(--mc-n50); }
.chat-list-item .avatar { width: 44px; height: 44px; font-size: 16px; border-radius: 50%; color: #fff; flex-shrink: 0; }
.chat-list-item.unread .cli-name { font-weight: 700; color: var(--mc-n800); }
.cli-fav { display: inline-flex; color: #f5b301; margin-right: 4px; vertical-align: -2px; }
.cli-fav .licon { width: 13px; height: 13px; fill: currentColor; }
.cli-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mc-blue); flex-shrink: 0; }
.cli-del { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 7px; border: 0;
    background: var(--mc-n0); color: var(--mc-n400); font-size: 18px; line-height: 1; cursor: pointer; opacity: 0;
    transition: opacity .14s, background .14s, color .14s; display: flex; align-items: center; justify-content: center; }
.chat-list-item:hover .cli-del { opacity: 1; }
.cli-del:hover { background: var(--red-soft); color: var(--red); }
.cli-body { flex: 1; min-width: 0; }
.cli-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cli-name { font-weight: 600; font-size: 14px; color: var(--mc-n800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cli-time { font-size: 12px; color: var(--mc-n400); flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; }
.cli-preview { font-size: 13px; color: var(--mc-n500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.chat-list-item.unread .cli-preview { color: var(--mc-n700); }
.unread-count { background: var(--mc-blue); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }

/* ---- Col 3: panoul central ---- */
.chat-main-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--mc-n50); }
.chat-main-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px;
    border-bottom: 1px solid var(--mc-n75); background: var(--mc-n0); flex-wrap: wrap; }
.chat-head-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chat-head-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 700; font-size: 15px; color: #fff; flex-shrink: 0; }
.chat-head-meta { min-width: 0; }
.chat-head-meta strong { font-size: 15px; font-weight: 600; display: block; color: var(--mc-n800); }
.chat-head-sub { margin-top: 2px; }
.platform-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--mc-n500); font-weight: 500; }
.platform-badge .licon { width: 14px; height: 14px; }
.chat-head-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.chat-head-icon { width: 34px; height: 34px; flex-shrink: 0; border: none; background: transparent; border-radius: 8px;
    color: var(--mc-n500); cursor: pointer; display: grid; place-items: center; transition: color .14s, background .14s; }
.chat-head-icon:hover { color: var(--mc-n800); background: var(--mc-n50); }
.chat-head-icon.danger:hover { color: var(--red); background: var(--red-soft); }
#btnFavorite.active { color: #f5b301; }
#btnFavorite.active .licon { fill: currentColor; }
.chat-flow-select { width: auto; max-width: 155px; border: 1px solid var(--mc-n100); background: var(--mc-n0);
    color: var(--mc-n700); font-size: 12.5px; border-radius: 8px; }

.chat-reminders { display: flex; flex-direction: column; gap: 6px; padding: 10px 20px; background: #fff7ed; border-bottom: 1px solid #fed7aa; }
.chat-reminders[hidden] { display: none; }
.reminder-chip { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--mc-n800); }
.reminder-chip.overdue .rem-txt b { color: #b45309; }
.rem-ic { display: inline-flex; color: #d97706; }
.rem-ic .licon { width: 16px; height: 16px; }
.rem-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rem-done, .rem-del { flex-shrink: 0; width: 26px; height: 26px; border: none; background: transparent; border-radius: 7px;
    cursor: pointer; font-size: 15px; color: var(--mc-n500); }
.rem-done:hover { color: var(--green); background: rgba(0,0,0,.05); }
.rem-del:hover { color: var(--red); background: rgba(0,0,0,.05); }
.reminder-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }

.chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 26px; display: flex; flex-direction: column; gap: 8px; }
.chat-placeholder { margin: auto; text-align: center; max-width: 340px; padding: 24px; }
.mc-empty-ico { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 20px;
    background: var(--mc-blue-soft); color: var(--mc-blue); margin: 0 auto 20px; }
.mc-empty-ico .licon { width: 32px; height: 32px; }

/* bule mesaj */
.msg { max-width: 66%; padding: 10px 14px; border-radius: 16px; font-size: 14px; white-space: pre-wrap;
    word-break: break-word; line-height: 1.45; position: relative; }
.msg-in { background: var(--mc-n0); border: 1px solid var(--mc-n75); color: var(--mc-n800); align-self: flex-start; border-bottom-left-radius: 5px; }
.msg-out { background: var(--mc-blue); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.msg-out.msg-agent { background: #0d9488; }
.msg-meta { font-size: 10.5px; opacity: .7; margin-top: 5px; }
.msg-failed { outline: 2px solid var(--red); }
.msg-sys { align-self: center; background: var(--mc-n0); border: 1px solid var(--mc-n75); color: var(--mc-n500);
    font-size: 12px; padding: 5px 14px; border-radius: 999px; }
.msg-img { max-width: 250px; max-height: 250px; border-radius: 12px; display: block; cursor: pointer; object-fit: cover; }
.msg-file { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: inherit;
    background: rgba(0,0,0,.06); padding: 9px 13px; border-radius: 10px; max-width: 250px; }
.msg-out .msg-file { background: rgba(255,255,255,.18); }
.msg-file-ic { display: inline-flex; flex-shrink: 0; }
.msg-file-ic .licon { width: 18px; height: 18px; }
.msg-file-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; }
.msg-audio { max-width: 250px; height: 40px; }

/* nota interna in fir */
.msg-note { align-self: stretch; max-width: 100%; background: #fff7ed; border: 1px solid #fed7aa; border-left: 3px solid #f59e0b;
    border-radius: 10px; padding: 10px 14px; margin: 3px 0; }
.msg-note-head { font-size: 11.5px; font-weight: 700; color: #b45309; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .3px; }
.msg-note-body { font-size: 13.5px; color: var(--mc-n800); white-space: pre-wrap; word-break: break-word; }
.msg-note-time { font-size: 10.5px; opacity: .6; margin-top: 4px; color: var(--mc-n500); }

/* composer */
.chat-composer-wrap { border-top: 1px solid var(--mc-n75); background: var(--mc-n0); }
.composer-tabs { display: flex; gap: 4px; padding: 8px 16px 0; }
.composer-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: none; background: transparent;
    color: var(--mc-n500); font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent;
    transition: color .14s, border-color .14s; }
.composer-tab .licon { width: 15px; height: 15px; }
.composer-tab:hover { color: var(--mc-n800); }
.composer-tab.active { color: var(--mc-blue); border-bottom-color: var(--mc-blue); }
.chat-composer-wrap.note-mode .composer-tab.active { color: #b45309; border-bottom-color: #f59e0b; }
.chat-composer { display: flex; gap: 8px; padding: 12px 16px 14px; align-items: flex-end; }
.composer-tools { display: flex; align-items: center; gap: 2px; position: relative; }
.composer-tool { width: 36px; height: 36px; display: grid; place-items: center; border: none; background: transparent;
    color: var(--mc-n500); border-radius: 9px; cursor: pointer; transition: background .14s, color .14s; }
.composer-tool:hover { background: var(--mc-n50); color: var(--mc-blue); }
.composer-tool:disabled { opacity: .45; cursor: default; }
.composer-tool .licon { width: 20px; height: 20px; }
.chat-composer .input { flex: 1; border-radius: 12px; resize: none; }
.composer-send { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; }
.composer-send .licon { width: 17px; height: 17px; }
.chat-composer-wrap.note-mode .chat-composer .input { border-color: #fdba74; }
.composer-note-hint { display: flex; align-items: center; gap: 7px; margin: 0; padding: 0 16px 12px; font-size: 12px; color: #b45309; }
.composer-note-hint .licon { width: 14px; height: 14px; }
.emoji-panel { position: absolute; bottom: 46px; left: 0; z-index: 40; width: 300px; max-height: 220px; overflow-y: auto;
    background: var(--mc-n0); border: 1px solid var(--mc-n100); border-radius: 14px; box-shadow: var(--shadow-lg);
    padding: 10px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-panel[hidden] { display: none; }
.emoji-item { border: none; background: transparent; font-size: 20px; line-height: 1; padding: 5px; border-radius: 8px; cursor: pointer; }
.emoji-item:hover { background: var(--mc-n50); }
.chat-window-warning { display: flex; align-items: center; gap: 8px; padding: 11px 20px; background: #fff7ed; color: #b45309;
    font-size: 13px; border-top: 1px solid #fed7aa; }
.chat-window-warning .licon { width: 17px; height: 17px; flex-shrink: 0; }

/* ---- Col 4: profil ---- */
.chat-profile-pane { border-left: 1px solid var(--mc-n75); padding: 26px 22px; overflow-y: auto; text-align: center; background: var(--mc-n0); }
.profile-avatar { width: 76px; height: 76px; border-radius: 50%; background: var(--mc-blue); color: #fff; font-size: 30px;
    font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.chat-profile-pane h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--mc-n800); }
.side-section { text-align: left; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--mc-n75); }
.side-section:first-of-type { border-top: 0; }
.side-section h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--mc-n400); margin: 0 0 11px; font-weight: 700; }
.score-bar { height: 8px; background: var(--mc-n75); border-radius: 999px; overflow: hidden; }
.score-fill { height: 100%; background: var(--mc-blue); width: 0; transition: width .4s ease; }
.temp { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.temp-cold { background: #e0f2fe; color: #0369a1; }
.temp-warm { background: #fef3c7; color: #b45309; }
.temp-hot { background: #fee2e2; color: #b91c1c; }
.pf-messenger { background: linear-gradient(135deg, #0084ff, #0064d1); color: #fff; }
.pf-instagram { background: linear-gradient(135deg, #f9ce34, #ee2a7b 45%, #6228d7); color: #fff; }
.pf-whatsapp  { background: linear-gradient(135deg, #25d366, #128c7e); color: #fff; }
.pf-webchat   { background: linear-gradient(135deg, #64748b, #475569); color: #fff; }
.c-av { width: 38px; height: 38px; border-radius: 11px; object-fit: cover; flex-shrink: 0; background: var(--mc-n50); }
.chat-list-item .avatar, .chat-head-av, .profile-avatar { display: grid; place-items: center; }
.chat-list-item .avatar svg { width: 20px; height: 20px; }
.chat-head-av svg { width: 19px; height: 19px; }
.profile-avatar svg { width: 34px; height: 34px; }
#profileScoreText { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--mc-n500); }
#profileScoreText .score-num { font-weight: 700; color: var(--mc-n800); font-variant-numeric: tabular-nums; }
.cf-list { margin: 0; font-size: 13px; }
.cf-list dt { color: var(--mc-n400); font-size: 11px; margin-top: 10px; text-transform: uppercase; letter-spacing: .3px; }
.cf-list dd { margin: 0; font-weight: 600; color: var(--mc-n800); }

/* ============================================================
   FLOW BUILDER
   ============================================================ */
.fb-wrap { display: flex; flex-direction: column; height: 100vh; }
.fb-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; box-shadow: var(--shadow-xs); z-index: 5; }
.fb-name { width: 290px; font-weight: 700; }
.fb-toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.fb-save-state { font-size: 12px; color: var(--text-muted); min-width: 74px; }

.fb-body { flex: 1; display: flex; min-height: 0; }
.fb-palette { width: 200px; background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px; overflow-y: auto; flex-shrink: 0; }
.fb-palette h4 { margin: 0 0 12px; font-size: 11px; text-transform: uppercase; color: var(--text-muted); letter-spacing: .5px; font-weight: 700; }
.fb-palette-item {
    display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 9px 11px; margin-bottom: 5px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
    font-size: 13px; font-weight: 600; font-family: var(--font); color: var(--text-soft); transition: all .14s;
}
.fb-palette-item:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); transform: translateX(2px); }
.fb-hint { font-size: 11.5px; color: var(--text-muted); line-height: 1.55; margin-top: 16px; padding: 10px; background: var(--surface-2); border-radius: 10px; }

.fb-canvas-wrap { flex: 1; position: relative; overflow: auto; background-image: radial-gradient(circle, var(--dot) 1.2px, transparent 1.2px); background-size: 24px 24px; background-color: var(--bg-soft); }
.fb-canvas { position: relative; width: 3000px; height: 3000px; }
.fb-edges { position: absolute; top: 0; left: 0; width: 3000px; height: 3000px; pointer-events: none; }
.fb-edges path { stroke: #a9b0c7; stroke-width: 2.5; fill: none; }
.fb-edges path.edge-labeled { stroke: var(--primary); }
.fb-edges text { font-size: 10px; fill: var(--text-soft); font-weight: 700; }

.fb-node { position: absolute; width: 216px; background: var(--surface); border: 2px solid var(--border); border-radius: 13px; box-shadow: var(--shadow); cursor: grab; user-select: none; font-size: 12px; transition: box-shadow .15s, border-color .15s; }
.fb-node:hover { box-shadow: var(--shadow-lg); }
.fb-node.selected { border-color: var(--primary); box-shadow: 0 0 0 3.5px rgba(var(--accent-rgb), .2); }
.fb-node-head { display: flex; align-items: center; gap: 7px; padding: 9px 12px; font-weight: 700; border-bottom: 1px solid var(--border-soft); border-radius: 11px 11px 0 0; font-size: 12.5px; }
.fb-node-body { padding: 9px 12px; color: var(--text-muted); max-height: 74px; overflow: hidden; line-height: 1.45; }
.fb-port { position: absolute; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--primary); cursor: crosshair; z-index: 5; transition: transform .12s; }
.fb-port:hover { transform: scale(1.3); }
.fb-port-out { right: -8px; top: 50%; transform: translateY(-50%); }
.fb-port-in { left: -8px; top: 50%; transform: translateY(-50%); border-color: #a9b0c7; }
.fb-node[data-type="start"] .fb-node-head { background: rgba(var(--accent-rgb), .18); }
.fb-node[data-type="send_message"] .fb-node-head { background: rgba(96, 165, 250, .18); }
.fb-node[data-type="question"] .fb-node-head { background: rgba(167, 139, 250, .18); }
.fb-node[data-type="condition"] .fb-node-head { background: rgba(251, 191, 36, .18); }
.fb-node[data-type="add_tag"] .fb-node-head, .fb-node[data-type="remove_tag"] .fb-node-head { background: rgba(244, 114, 182, .18); }
.fb-node[data-type="delay"] .fb-node-head { background: rgba(45, 212, 191, .18); }
.fb-node[data-type="end_flow"] .fb-node-head { background: rgba(248, 113, 113, .18); }
.fb-node[data-type="webhook_action"] .fb-node-head { background: rgba(132, 204, 22, .18); }

.fb-config { width: 320px; background: var(--surface); border-left: 1px solid var(--border); padding: 16px; overflow-y: auto; flex-shrink: 0; }
.fb-config-head { display: flex; align-items: center; justify-content: space-between; }
.fb-config-head h4 { margin: 0; font-size: 15px; font-weight: 700; }
.fb-config .input { margin-bottom: 8px; }
.fb-btn-item { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.fb-trigger-row { display: grid; grid-template-columns: 160px 1fr 38px; gap: 8px; margin-bottom: 8px; align-items: center; }

.copy-code { cursor: pointer; display: inline-block; margin-bottom: 6px; transition: outline .12s; }
.copy-code:hover { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Onboarding builder */
.fb-onboard { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 3; }
.fb-onboard-card {
    pointer-events: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 28px 30px; max-width: 440px; margin: 20px;
}
.fb-onboard-icon { font-size: 34px; margin-bottom: 6px; }
.fb-onboard-card h3 { margin: 0 0 14px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.fb-onboard-card ol { margin: 0 0 18px; padding-left: 20px; font-size: 13.5px; line-height: 1.7; color: var(--text-soft); }
.fb-onboard-card ol strong { color: var(--text); }
.fb-onboard-card .btn { margin-right: 8px; }

.detail-cell { display: flex; flex-wrap: wrap; gap: 5px; }
.detail-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 600; background: var(--bg-soft); color: var(--text-soft); white-space: nowrap; }

.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; padding: 4px 20px 20px; }

/* ============================================================
   PREMIUM++ : animatii, dropdown custom, tooltip, hover
   ============================================================ */

/* ---- Entrance animations (stagger) ---- */
@keyframes cfUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cf-reveal { opacity: 0; animation: cfUp .55s cubic-bezier(.2, .8, .2, 1) forwards; }

.topbar { position: sticky; }

/* ---- Nav item hover ---- */
.nav-item:active { transform: scale(.98); }

/* ---- Card hover lift + glow ---- */
.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.card:hover { box-shadow: var(--shadow), 0 0 0 1px rgba(var(--accent-rgb), .1); border-color: rgba(var(--accent-rgb), .26); }

/* ---- Button shine on hover ---- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .5s; }
.btn-primary:hover::after { left: 130%; }

/* ---- Ripple ---- */
.cf-ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .5); transform: scale(0); animation: ripple .55s ease-out; pointer-events: none; }
@keyframes ripple { to { transform: scale(3.5); opacity: 0; } }

/* ---- Row hover shift ---- */
.table tbody tr td:first-child { transition: padding-left .16s; }
.table tbody tr:hover td:first-child { padding-left: 26px; }

/* ============================================================
   CUSTOM DROPDOWN (inlocuieste select-ul nativ)
   ============================================================ */
.cf-select { position: relative; display: block; width: 100%; }
.cf-select-sm { display: inline-block; width: auto; min-width: 150px; vertical-align: middle; }
.filter-bar .cf-select { flex: 1 1 160px; }
.btn-row .cf-select, .card-head .cf-select { width: auto; min-width: 150px; }
.cf-select .cf-native { position: absolute; opacity: 0; width: 100%; height: 100%; pointer-events: none; }
.cf-select-trigger {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
    font-size: 14px; font-family: var(--font); color: var(--text); cursor: pointer; text-align: left;
    box-shadow: var(--shadow-xs); transition: all .15s;
}
.cf-select-trigger:hover { border-color: rgba(var(--accent-rgb), .4); }
.cf-select.open .cf-select-trigger { border-color: var(--primary); box-shadow: 0 0 0 3.5px rgba(var(--accent-rgb), .16); }
.cf-select-trigger svg { width: 16px; height: 16px; color: var(--text-muted); transition: transform .2s; flex-shrink: 0; }
.cf-select.open .cf-select-trigger svg { transform: rotate(180deg); color: var(--primary); }
.cf-select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-select-sm .cf-select-trigger { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.cf-select-menu {
    position: fixed; z-index: 9998;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow-lg); padding: 6px; max-height: 280px; overflow-y: auto;
    opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none;
    transition: opacity .16s, transform .16s; transform-origin: top;
}
.cf-select-menu.cf-menu-open { opacity: 1; transform: none; pointer-events: auto; }
.cf-select-opt { padding: 9px 11px; border-radius: 8px; font-size: 13.5px; cursor: pointer; transition: background .12s; display: flex; align-items: center; justify-content: space-between; }
.cf-select-opt:hover { background: var(--bg-soft); }
.cf-select-opt.selected { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.cf-select-opt.selected::after { content: '✓'; font-size: 12px; }

/* ============================================================
   CUSTOM TOOLTIP (hover arata info)
   ============================================================ */
.cf-tip {
    position: fixed; z-index: 9999; background: #171a2b; color: #fff; font-size: 12.5px; font-weight: 500;
    padding: 8px 12px; border-radius: 9px; max-width: 280px; line-height: 1.5; pointer-events: none;
    box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(4px); transition: opacity .16s, transform .16s;
}
.cf-tip.show { opacity: 1; transform: none; }
.cf-tip::after { content: ''; position: absolute; bottom: -5px; left: var(--tip-arrow, 50%); transform: translateX(-50%) rotate(45deg); width: 9px; height: 9px; background: #171a2b; }
.cf-tip.below::after { bottom: auto; top: -5px; }

/* ---- info chip (i) care arata descriere la hover ---- */
.info-dot { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-soft); color: var(--text-muted); font-size: 11px; font-weight: 700; cursor: help; margin-left: 4px; vertical-align: middle; transition: all .15s; }
.info-dot:hover { background: var(--primary); color: #fff; }

/* ============================================================
   SWITCH (toggle premium) + CONTROL BOT
   ============================================================ */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; inset: 0; cursor: pointer; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; transition: background .25s; }
.switch-slider::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .25s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 1px 3px rgba(16, 19, 34, .3); }
.switch input:checked + .switch-slider { background: var(--grad); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }
.switch-lg { width: 56px; height: 31px; }
.switch-lg .switch-slider::before { height: 25px; width: 25px; }
.switch-lg input:checked + .switch-slider::before { transform: translateX(25px); }

.bot-control-body { padding: 4px 20px 20px; }
.bot-master { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-radius: 12px; background: linear-gradient(135deg, rgba(var(--accent-rgb),.14), var(--surface-2)); border: 1px solid rgba(var(--accent-rgb),.28); margin-bottom: 16px; }
.bot-platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.bot-plat { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); transition: all .15s; }
.bot-plat:hover { border-color: rgba(var(--accent-rgb), .35); }
.bot-plat-name { font-weight: 600; font-size: 13.5px; }
.bot-control.bot-off .bot-platforms { opacity: .45; pointer-events: none; filter: grayscale(.5); transition: opacity .2s; }
.bot-control.bot-off .card-head h2::after { content: ' — OPRIT'; color: var(--red); font-size: 13px; font-weight: 700; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1300px) {
    .chat-layout { grid-template-columns: 190px 300px 1fr; }
    .chat-profile-pane { display: none; }
}
@media (max-width: 1100px) {
    .chat-layout { grid-template-columns: 300px 1fr; }
    .chat-profile-pane, .chat-subnav { display: none; }
    .grid-2, .grid-13 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .sidebar { position: fixed; left: calc(-1 * var(--sidebar-w)); z-index: 100; transition: left .22s ease; }
    .sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
    .sidebar-toggle { display: inline-flex; }
    .content { padding: 16px; }
    .topbar { padding: 0 16px; }
    .chat-layout { grid-template-columns: 1fr; height: calc(100vh - 74px - 32px); }
    .chat-list-pane { display: none; }
    .chat-layout.list-mode .chat-list-pane { display: flex; }
    .chat-layout.list-mode .chat-main-pane { display: none; }
    .fb-palette { width: 160px; }
    .fb-config { position: fixed; right: 0; top: 0; height: 100vh; z-index: 90; box-shadow: var(--shadow-lg); }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   COMUTATOR TEMA (Light / Dark)
   ============================================================ */
.theme-ico { display: inline-flex; }
.theme-ico-dark { display: none; }
:root[data-theme="dark"] .theme-ico-light { display: none; }
:root[data-theme="dark"] .theme-ico-dark { display: inline-flex; }
#themeToggle svg { width: 20px; height: 20px; }

/* ============================================================
   BROADCAST / CAMPANII
   ============================================================ */
.bc-segment { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px 16px; margin-top: 16px; }
.bc-seg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.bc-estimate { font-size: 12.5px; font-weight: 800; color: var(--primary); background: var(--primary-soft); padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.bc-seg-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.bc-seg-filters .field-label { margin-top: 8px; }
.bc-note { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin: 14px 0 0; background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent); color: var(--amber); padding: 10px 13px; border-radius: 10px; }
.bc-progress { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; margin: 6px 0 4px; }
.bc-progress-fill { display: block; height: 100%; border-radius: 999px; background: var(--grad); transition: width .5s ease; }
.bc-msg-preview { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; font-size: 14px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
.bc-row .av { font-size: 18px; }

/* ============================================================
   RAPOARTE / GRAFICE
   ============================================================ */
.chart-wrap { padding: 10px 22px 20px; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-grid { stroke: var(--border-soft); stroke-width: 1; }
.chart-ytick, .chart-xtick { fill: var(--text-muted); font-size: 10px; font-family: var(--font); }
.chart-area { fill: rgba(var(--accent-rgb), .13); }
.chart-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart-line-in { stroke: var(--primary); }
.chart-line-out { stroke: #14b8a6; }
.chart-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-muted); }
.cl-item { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.cl-dot { width: 10px; height: 10px; border-radius: 3px; }
.cl-in { background: var(--primary); }
.cl-out { background: #14b8a6; }

/* ============================================================
   /conversations — TEMĂ MANYCHAT (scoped)
   Doar aspect. Remapează tokenii de culoare/font pe paleta reală
   ManyChat, DOAR pe pagina de conversații. Nu schimbă structura,
   JS-ul sau restul aplicației.
   Sursă paletă: pagina reală ManyChat (design tokens --color-*).
   ============================================================ */
.chat-layout,
#reminderModal {
    /* --- paleta primitivă ManyChat --- */
    --mc-blue:        #006be2;  /* blue-500 (brand) */
    --mc-blue-hover:  #0059be;  /* blue-600 */
    --mc-blue-soft:   #eff6ff;  /* blue-50  */
    --mc-n0:   #ffffff;         /* neutral-0   */
    --mc-n50:  #f5f5f5;         /* neutral-50  */
    --mc-n75:  #e5e5e5;         /* neutral-75  */
    --mc-n100: #d6d6d6;         /* neutral-100 */
    --mc-n400: #878787;         /* neutral-400 */
    --mc-n500: #707070;         /* neutral-500 */
    --mc-n700: #414141;         /* neutral-700 */
    --mc-n800: #292929;         /* neutral-800 */

    /* --- remap peste tokenii folosiți de CSS-ul de chat --- */
    --primary:       var(--mc-blue);
    --primary-2:     var(--mc-blue);
    --primary-hover: var(--mc-blue-hover);
    --primary-soft:  var(--mc-blue-soft);
    --accent-rgb:    0, 107, 226;
    --grad:          linear-gradient(135deg, #0059be, #006be2);
    --on-accent:     #ffffff;
    --surface:       var(--mc-n0);
    --surface-2:     var(--mc-n50);
    --border:        var(--mc-n100);
    --border-soft:   var(--mc-n75);
    --text:          var(--mc-n800);
    --text-soft:     var(--mc-n700);
    --text-muted:    var(--mc-n500);
    --text-faint:    var(--mc-n400);
    --chat-bg:       var(--mc-n50);
}

/* --- retușuri de aspect specifice ManyChat (doar în .chat-layout) --- */
.chat-layout { box-shadow: 0 1px 2px rgba(41,41,41,.06); border-radius: 12px; }
/* conversația selectată: fundal albastru-deschis + bară de accent (ca la ManyChat) */
.chat-layout .chat-list-item.active { background: var(--mc-blue-soft); }
.chat-layout .chat-list-item.active::before {
    content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 3px 3px 0; background: var(--mc-blue);
}
.chat-layout .chat-list-item.active .cli-name { color: var(--mc-n800); }
/* item de subnav activ: accent albastru discret */
.chat-layout .subnav-item.active { color: var(--mc-blue); background: var(--mc-blue-soft); }
.chat-layout .subnav-item.active .subnav-count { color: var(--mc-blue); background: var(--mc-n0); }
/* badge necitite / punct: albastru ManyChat (deja via --primary, aici doar contrast text) */
.chat-layout .unread-count { background: var(--mc-blue); color: #fff; }

/* --- bara de filtre a listei (pastile stil ManyChat) --- */
.chat-layout .chat-list-head { padding: 11px 12px; gap: 9px; border-bottom: 1px solid var(--mc-n75); }
.chat-layout .mc-search {
    display: flex; align-items: center; gap: 8px; width: 100%;
    background: var(--mc-n50); border: 1px solid var(--mc-n75); border-radius: 9px; padding: 8px 11px;
    transition: border-color .14s, background .14s;
}
.chat-layout .mc-search:focus-within { background: var(--mc-n0); border-color: var(--mc-blue); }
.chat-layout .mc-search svg { width: 16px; height: 16px; color: var(--mc-n400); flex-shrink: 0; }
.chat-layout .mc-search input {
    border: none; background: transparent; outline: none; width: 100%; min-width: 0;
    font-size: 13.5px; color: var(--text); font-family: var(--font);
}
.chat-layout .mc-search input::placeholder { color: var(--mc-n400); }
.chat-layout .mc-toolbar { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-layout .mc-pill {
    appearance: none; -webkit-appearance: none;
    border: 1px solid var(--mc-n100); background-color: var(--mc-n0); color: var(--text);
    font-size: 12.5px; font-weight: 600; font-family: var(--font);
    padding: 6px 27px 6px 13px; border-radius: 999px; cursor: pointer; line-height: 1.3;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
    background-repeat: no-repeat; background-position: right 9px center; background-size: 11px;
    transition: border-color .14s, background-color .14s;
}
.chat-layout .mc-pill:hover { border-color: var(--mc-n400); background-color: var(--mc-n50); }
.chat-layout .mc-pill:focus { outline: none; border-color: var(--mc-blue); }

/* --- stare goală (ilustrație centrală stil ManyChat) --- */
.chat-layout .chat-placeholder { max-width: 360px; padding: 24px; }
.chat-layout .mc-empty-illu { width: 210px; height: auto; display: block; margin: 0 auto 24px; }
.chat-layout .mc-empty-title { font-size: 18px; font-weight: 700; color: var(--mc-n800); margin: 0 0 9px; letter-spacing: -.01em; }
.chat-layout .mc-empty-sub { font-size: 13.5px; color: var(--mc-n500); line-height: 1.6; margin: 0; }
/* ============================================================
   /conversations v2 — bara de filtre (rand de pastile ca ManyChat)
   + ilustratia bulelor. Override final (castiga prin ordine).
   ============================================================ */
.chat-layout .chat-list-head { padding: 12px 12px 10px; gap: 10px; display: flex; flex-direction: column; }
.chat-layout .mc-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.chat-layout .mc-check { display: inline-flex; align-items: center; padding: 0 2px; }
.chat-layout .mc-check input { width: 16px; height: 16px; accent-color: var(--mc-blue); cursor: pointer; }
.chat-layout .mc-pill {
    appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--mc-n100); background-color: var(--mc-n0); background-image: none; color: var(--mc-n800);
    font-size: 13px; font-weight: 500; font-family: var(--font); padding: 7px 13px; border-radius: 999px;
    cursor: pointer; line-height: 1.2; white-space: nowrap; transition: background-color .14s, border-color .14s;
}
.chat-layout .mc-pill:hover { background-color: var(--mc-n50); border-color: var(--mc-n400); }
.chat-layout .mc-pill:focus { outline: none; border-color: var(--mc-blue); }
.chat-layout .mc-pill .licon { width: 15px; height: 15px; color: var(--mc-n500); }
.chat-layout .mc-pill-ghost { color: var(--mc-n700); }
.chat-layout select.mc-pill {
    padding-right: 30px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 11px;
}
.chat-layout .mc-empty-illu { width: 232px; margin: 0 auto 26px; }
.chat-layout .mc-empty-title { font-size: 19px; }
.chat-layout .chat-placeholder { max-width: 380px; }

/* ============================================================
   CHROME GLOBAL — stil ManyChat. Bara stanga se restrange/extinde
   (buton #navCollapseBtn -> clasa .nav-collapsed pe <html>).
   ============================================================ */
/* header compact + full-bleed conversatii (mereu) */
.topbar { min-height: 62px; gap: 14px; padding: 0 22px; }
.page-title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.page-desc { display: none; }
.topbar-icon-btn { width: 38px; height: 38px; border-radius: 10px; }
.content-flush { padding: 0; max-width: none; margin: 0; }
.content-flush .chat-layout { border: none; border-radius: 0; box-shadow: none; height: calc(100vh - 62px); }

/* buton restrangere / extindere meniu */
.nav-collapse-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: calc(100% - 20px);
    margin: 4px 10px; padding: 9px; border: 1px solid var(--side-border); background: transparent; color: var(--side-icon);
    border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; transition: background .14s, color .14s; }
.nav-collapse-btn:hover { background: var(--side-hover); color: var(--side-text-active); }
.nav-collapse-btn .licon { width: 18px; height: 18px; transition: transform .2s; }
.nav-collapse-label { color: var(--side-text); }

/* ---- MOD RESTRANS (ingust, doar iconite) ---- */
.nav-collapsed { --sidebar-w: 70px; }
.nav-collapsed .sidebar-logo { justify-content: center; padding: 16px 0 10px; gap: 0; }
.nav-collapsed .logo-text { display: none; }
.nav-collapsed .logo-mark { width: 40px; height: 40px; border-radius: 12px; }
.nav-collapsed .sidebar-nav { padding: 6px 10px 14px; }
.nav-collapsed .nav-section-label { display: none; }
.nav-collapsed .nav-sep { margin: 8px 16px; }
.nav-collapsed .nav-item { justify-content: center; padding: 11px; gap: 0; border-radius: 12px; }
.nav-collapsed .nav-label { display: none; }
.nav-collapsed .nav-icon svg { width: 21px; height: 21px; }
.nav-collapsed .sidebar-footer { flex-direction: column; gap: 10px; padding: 10px 6px; margin: 8px; background: transparent; border: none; }
.nav-collapsed .user-chip { justify-content: center; }
.nav-collapsed .user-meta { display: none; }
.nav-collapsed .sidebar-footer .avatar { width: 36px; height: 36px; border-radius: 50%; }
.nav-collapsed .nav-collapse-btn { width: 46px; margin: 4px auto; padding: 10px; }
.nav-collapsed .nav-collapse-label { display: none; }
.nav-collapsed .nav-collapse-btn .licon { transform: rotate(180deg); }

/* ---- bara de filtre conversatii: functionala + iconite ---- */
.chat-layout .mc-pill.active { background-color: var(--mc-blue); border-color: var(--mc-blue); color: #fff; }
.chat-layout select.mc-pill-status, .chat-layout select.mc-pill-sort {
    padding-left: 33px; background-repeat: no-repeat, no-repeat;
    background-position: left 11px center, right 10px center; background-size: 15px, 11px;
}
.chat-layout select.mc-pill-status {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/></svg>"), url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
}
.chat-layout select.mc-pill-sort {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 16 4 4 4-4'/><path d='M7 20V4'/><path d='M11 4h10'/><path d='M11 8h7'/><path d='M11 12h4'/></svg>"), url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
}
/* ============================================================
   /conversations — fix antet: ascunde avatar+nume+badge (cerut) si
   repara [hidden] (regulile display:flex/grid anulau atributul hidden,
   deci antetul/avertismentul/butoanele apareau si in starea goala).
   ============================================================ */
.chat-layout .chat-head-id { display: none; }
.chat-layout .chat-head-actions { margin-left: auto; }
.chat-layout .chat-main-head[hidden],
.chat-layout .chat-window-warning[hidden],
.chat-layout .chat-head-icon[hidden] { display: none !important; }
/* ============================================================
   SETTINGS — al doilea sidebar (tab-uri). Canale/Utilizatori/Jurnale mutate aici.
   ============================================================ */
.settings-shell { display: grid; grid-template-columns: 234px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-subnav { position: sticky; top: 22px; display: flex; flex-direction: column; gap: 3px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px; box-shadow: var(--shadow-sm); }
.settings-subnav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); font-weight: 700; padding: 8px 12px 8px; }
.settings-tab { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--text-soft);
    font-size: 14px; font-weight: 500; text-decoration: none; transition: background .14s, color .14s; }
.settings-tab:hover { background: var(--surface-2); color: var(--text); }
.settings-tab.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.settings-tab-ico { display: grid; place-items: center; flex-shrink: 0; }
.settings-tab-ico svg { width: 18px; height: 18px; }
.settings-body { min-width: 0; }
@media (max-width: 900px) { .settings-shell { grid-template-columns: 1fr; } .settings-subnav { position: static; flex-direction: row; flex-wrap: wrap; } }

/* ============================================================
   SIDEBAR — iconite social cu culorile de brand
   ============================================================ */
.nav-item[href$="/instagram"] .nav-icon svg { stroke: url(#igGrad); }
.nav-item[href$="/facebook"] .nav-icon svg  { stroke: #1877f2; }
.nav-item[href$="/tiktok"] .nav-icon svg    { color: #fe2c55; fill: #fe2c55; }

/* ============================================================
   HEADER — versiune moderna (curat, fara chenare grele)
   ============================================================ */
.topbar { min-height: 62px; gap: 14px; padding: 0 24px; background: var(--surface);
    border-bottom: 1px solid var(--border-soft); box-shadow: 0 1px 2px rgba(16,19,34,.03); backdrop-filter: none; }
.page-title { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.topbar-icon-btn { width: 40px; height: 40px; border-radius: 11px; border: none; background: transparent; color: var(--text-soft); }
.topbar-icon-btn:hover { background: var(--surface-2); color: var(--text); border: none; }
.topbar-user { border: none; background: var(--surface-2); padding: 5px 12px 5px 6px; border-radius: 999px; transition: background .14s; }
.topbar-user:hover { background: var(--border-soft); }
.topbar-user-av { background: var(--grad); }

/* ============================================================
   DASHBOARD — full width + spacing corect
   ============================================================ */
.content-wide { max-width: none; }
.content-wide .bento { gap: 20px; }
.content-wide .dash-welcome { padding: 26px 30px; border-radius: 18px; }
.content-wide .card { border-radius: 16px; }
.content-wide .kpi { padding: 22px 24px; border-radius: 16px; }
.content-wide .sys-card { padding: 8px; }
/* ============================================================
   DASHBOARD v2 — grupare pe sectiuni + spacing corect + Lucide
   ============================================================ */
.bento-section { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 12px 2px 0; }
.bento-section h3 { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .9px; margin: 0; white-space: nowrap; }
.bento-section::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }

/* Start aici — pasii nu mai ating marginile cardului */
.start-here .card-head { margin-bottom: 0; border-bottom: 0; padding-bottom: 6px; }
.sh-steps { padding: 4px 24px 24px; gap: 14px; }
.sh-step { padding: 16px 18px; }
.sh-check svg { width: 15px; height: 15px; }
.card-head h2 .ch-ico { display: inline-grid; place-items: center; }
.card-head h2 .ch-ico svg { width: 19px; height: 19px; }

/* Control Bot — iconite platforme cu culorile de brand */
.bot-plat-name { display: flex; align-items: center; gap: 9px; }
.bot-plat-ic { display: inline-grid; place-items: center; }
.bot-plat-ic svg { width: 18px; height: 18px; }
.bot-plat-ic.p-messenger { color: #1877f2; }
.bot-plat-ic.p-instagram svg { stroke: url(#igGrad); }
.bot-plat-ic.p-whatsapp { color: #25d366; }
.bot-plat-ic.p-webchat { color: #64748b; }
/* ============================================================
   HEADER v3 — modern: comanda centrala (Ctrl+K), meniu user, paleta
   ============================================================ */
.topbar { min-height: 62px; gap: 14px; padding: 0 20px; background: var(--surface);
    border-bottom: 1px solid var(--border-soft); box-shadow: 0 1px 2px rgba(16,19,34,.03); backdrop-filter: none; }
.topbar-heading { flex: 0 0 auto; }
.page-title { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.topbar-right { position: relative; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* comanda centrala */
.topbar-cmd { flex: 1 1 auto; max-width: 440px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
    height: 40px; padding: 0 10px 0 13px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text-muted); font: inherit; font-size: 13.5px; cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s; }
.topbar-cmd:hover { border-color: rgba(var(--accent-rgb), .5); background: var(--surface); box-shadow: 0 3px 14px rgba(var(--accent-rgb), .1); }
.topbar-cmd svg { width: 17px; height: 17px; flex-shrink: 0; }
.topbar-cmd-txt { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd, .topbar-cmd-kbd { font: inherit; font-size: 11px; font-weight: 700; color: var(--text-muted);
    background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 2px 6px; white-space: nowrap; }

/* butoane iconita header — ghost */
.topbar-icon-btn { width: 40px; height: 40px; border-radius: 11px; border: none; background: transparent; color: var(--text-soft); }
.topbar-icon-btn:hover { background: var(--surface-2); color: var(--text); border: none; }

/* chip user + meniu */
.topbar-user { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 5px; border-radius: 999px;
    border: 1px solid transparent; background: var(--surface-2); cursor: pointer; transition: background .14s, border-color .14s; }
.topbar-user:hover { background: var(--surface); border-color: var(--border); }
.topbar-user-av { background: var(--grad); }
.topbar-user-chev { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.user-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 70; width: 224px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
    padding: 8px; animation: cmdkPop .14s ease; }
.user-menu[hidden] { display: none; }
.user-menu-head { padding: 8px 12px 11px; border-bottom: 1px solid var(--border-soft); margin-bottom: 6px; }
.user-menu-head strong { display: block; font-size: 14px; color: var(--text); }
.user-menu-head small { color: var(--text-muted); font-size: 12px; text-transform: capitalize; }
.user-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: none;
    background: transparent; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.user-menu-item:hover { background: var(--red-soft); color: var(--red); }
.user-menu-item svg { width: 17px; height: 17px; }

/* ---- paleta de comenzi ---- */
.cmdk { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.cmdk[hidden] { display: none; }
.cmdk-backdrop { position: absolute; inset: 0; background: rgba(10,12,20,.5); backdrop-filter: blur(3px); animation: cmdkFade .15s ease; }
.cmdk-panel { position: relative; width: min(600px, 92vw); background: var(--surface); border: 1px solid var(--border);
    border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.4); overflow: hidden; animation: cmdkPop .17s cubic-bezier(.2,.8,.2,1); }
@keyframes cmdkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmdkPop { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
.cmdk-search { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border-soft); }
.cmdk-search svg { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.cmdk-search input { flex: 1; border: none; background: transparent; outline: none; font: inherit; font-size: 16px; color: var(--text); }
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: 8px; }
.cmdk-item { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: 11px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; }
.cmdk-item-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); color: var(--text-soft); flex-shrink: 0; }
.cmdk-item-ico svg { width: 18px; height: 18px; }
.cmdk-item.active, .cmdk-item:hover { background: var(--primary-soft); color: var(--primary); }
.cmdk-item.active .cmdk-item-ico, .cmdk-item:hover .cmdk-item-ico { background: var(--primary); color: #fff; }
.cmdk-empty { padding: 30px; text-align: center; color: var(--text-muted); font-size: 14px; }
.cmdk-foot { display: flex; align-items: center; gap: 7px; padding: 11px 16px; border-top: 1px solid var(--border-soft); font-size: 11.5px; color: var(--text-muted); }
/* ============================================================
   Overlay de incarcare (pagini lente) + logo GChat
   ============================================================ */
.nav-loader { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
    background: rgba(10,12,20,.55); backdrop-filter: blur(4px); animation: cmdkFade .15s ease; }
.nav-loader[hidden] { display: none; }
.nav-loader-card { width: min(340px, 86vw); background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0,0,0,.4); padding: 28px 28px 24px; text-align: center; animation: cmdkPop .18s cubic-bezier(.2,.8,.2,1); }
.nav-loader-spinner { width: 44px; height: 44px; margin: 0 auto 16px; border-radius: 50%;
    border: 3px solid var(--border); border-top-color: var(--primary); animation: navSpin .7s linear infinite; }
@keyframes navSpin { to { transform: rotate(360deg); } }
.nav-loader-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.nav-loader-track { height: 8px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 999px; overflow: hidden; }
.nav-loader-bar { height: 100%; width: 8%; background: var(--grad); border-radius: 999px; transition: width .25s ease; }
.nav-loader-pct { margin-top: 10px; font-size: 13px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }

/* logo-ul GChat (imagine) in sidebar */
img.logo-mark { width: 40px; height: 40px; border-radius: 12px; object-fit: contain; background: transparent; box-shadow: none; padding: 0; flex-shrink: 0; }
/* ============================================================
   DASHBOARD v3 — curat: mai putine carduri, umbre, KPI colorate
   ============================================================ */
.dash-clean { gap: 22px; }
.dash-clean .card { box-shadow: 0 6px 22px rgba(16,19,34,.06); border: 1px solid var(--border-soft); border-radius: 18px; }

/* KPI cu fundaluri diferite + umbra */
.dash-clean .kpi { border: 1px solid var(--border-soft); border-radius: 18px; padding: 22px 24px; box-shadow: 0 6px 22px rgba(16,19,34,.06); }
.dash-clean .kpi-ico { width: 46px; height: 46px; border-radius: 14px; box-shadow: none; }
.dash-clean .kpi-val { color: var(--text); }
.dash-clean .kpi[data-accent="blue"]   { background: linear-gradient(160deg, rgba(37,99,235,.10), var(--surface) 60%); }
.dash-clean .kpi[data-accent="blue"] .kpi-ico   { background: rgba(37,99,235,.15); color: #2563eb; }
.dash-clean .kpi[data-accent="green"]  { background: linear-gradient(160deg, rgba(16,163,74,.10), var(--surface) 60%); }
.dash-clean .kpi[data-accent="green"] .kpi-ico  { background: rgba(16,163,74,.15); color: #12a34a; }
.dash-clean .kpi[data-accent="violet"] { background: linear-gradient(160deg, rgba(124,58,237,.10), var(--surface) 60%); }
.dash-clean .kpi[data-accent="violet"] .kpi-ico { background: rgba(124,58,237,.15); color: #7c3aed; }
.dash-clean .kpi[data-accent="amber"]  { background: linear-gradient(160deg, rgba(217,119,6,.12), var(--surface) 60%); }
.dash-clean .kpi[data-accent="amber"] .kpi-ico  { background: rgba(217,119,6,.16); color: #d97706; }

/* card lateral „Stare & bot" */
.side-card-body { padding: 16px 20px 20px; }
.side-card-body .bot-master { margin-bottom: 12px; }
.side-card-body .btn-block { display: block; width: 100%; text-align: center; margin-bottom: 6px; }
.mini-stats { margin-top: 8px; }
.mini-stat { display: flex; align-items: center; gap: 11px; padding: 11px 4px; border-top: 1px solid var(--border-soft); }
.mini-stat-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.mini-stat-ic svg { width: 16px; height: 16px; }
.mini-stat-ic.acc-blue { background: rgba(37,99,235,.12); color: #2563eb; }
.mini-stat-ic.acc-green { background: rgba(16,163,74,.12); color: #12a34a; }
.mini-stat-ic.acc-amber { background: rgba(217,119,6,.14); color: #d97706; }
.mini-stat-lbl { flex: 1; font-size: 13px; color: var(--text-soft); font-weight: 500; }
.mini-stat b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
#botControl.bot-off .bot-master { opacity: .65; }
/* ============================================================
   /conversations — fara coloana goala de profil pana la selectare,
   + lightbox imagini in chat
   ============================================================ */
.chat-layout:has(#chatProfile[hidden]) { grid-template-columns: 232px 385px 1fr; }

.cf-lightbox { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center;
    background: rgba(8,10,18,.85); backdrop-filter: blur(4px); padding: 40px; cursor: zoom-out; }
.cf-lightbox.open { display: flex; }
.cf-lightbox-img { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); object-fit: contain; }
.cf-lightbox-close { position: absolute; top: 22px; right: 26px; width: 44px; height: 44px; border: none; border-radius: 50%;
    background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.cf-lightbox-close:hover { background: rgba(255,255,255,.25); }
.msg-img { cursor: zoom-in; }
/* collapse / expand panou profil (buton pe panou; strans = bara ingusta) */
.chat-profile-pane { position: relative; }
.profile-collapse { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border: none;
    background: transparent; color: var(--mc-n500); border-radius: 8px; cursor: pointer; display: grid; place-items: center; z-index: 2; }
.profile-collapse:hover { background: var(--mc-n50); color: var(--mc-n800); }
.profile-collapse svg { width: 18px; height: 18px; transition: transform .2s; }
.chat-layout.profile-collapsed { grid-template-columns: 232px 385px 1fr 46px; }
.chat-layout.profile-collapsed .chat-profile-pane { padding: 12px 0; overflow: hidden; text-align: center; }
.chat-layout.profile-collapsed .chat-profile-pane > *:not(.profile-collapse) { display: none; }
.chat-layout.profile-collapsed .profile-collapse { position: static; margin: 0 auto; }
.chat-layout.profile-collapsed .profile-collapse svg { transform: rotate(180deg); }
/* ============================================================
   /conversations — avatare din poze de profil + selectie bulk
   ============================================================ */
.av-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

.chat-layout .cli-check { display: inline-flex; align-items: center; align-self: center; opacity: 0; transition: opacity .12s; flex-shrink: 0; }
.chat-layout .chat-list-item:hover .cli-check,
.chat-layout .chat-list-item.selected .cli-check { opacity: 1; }
.chat-layout .cli-check input { width: 17px; height: 17px; accent-color: var(--mc-blue); cursor: pointer; margin: 0; }
.chat-layout .chat-list-item.selected { background: var(--mc-blue-soft); }

.chat-bulk { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--mc-n75); background: var(--mc-blue-soft); }
.chat-bulk[hidden] { display: none; }
.chat-bulk .mc-check { display: inline-flex; align-items: center; }
.chat-bulk .mc-check input { width: 16px; height: 16px; accent-color: var(--mc-blue); cursor: pointer; }
.chat-bulk-count { flex: 1; font-size: 13px; font-weight: 600; color: var(--mc-n800); }
.chat-bulk-del { border: none; background: var(--red); color: #fff; font-weight: 600; font-size: 13px; padding: 6px 14px; border-radius: 8px; cursor: pointer; }
.chat-bulk-del:hover { background: #b91c1c; }
.chat-bulk-del:disabled { opacity: .6; cursor: default; }
.chat-bulk-cancel { border: none; background: transparent; color: var(--mc-n500); font-weight: 600; font-size: 13px; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.chat-bulk-cancel:hover { color: var(--mc-n800); background: var(--mc-n50); }
/* ============================================================
   /contacts — selectie bulk + card, si dropdown custom (pastila) la /conversations
   ============================================================ */
.content-wide .card { box-shadow: 0 6px 22px rgba(16,19,34,.06); }
.th-check, .td-check { width: 44px; text-align: center; }
.c-check, #contactsAll { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; vertical-align: middle; }
.table tr.row-selected td { background: var(--primary-soft); }
.contacts-bulk { display: flex; align-items: center; gap: 10px; margin: 0 20px 12px; padding: 11px 16px;
    background: var(--primary-soft); border: 1px solid rgba(var(--accent-rgb),.28); border-radius: 12px; }
.contacts-bulk[hidden] { display: none; }
.contacts-bulk-count { flex: 1; font-weight: 600; font-size: 13.5px; color: var(--text); }
.contacts-bulk-del { border: none; background: var(--red); color: #fff; font-weight: 600; font-size: 13px; padding: 7px 15px; border-radius: 8px; cursor: pointer; }
.contacts-bulk-del:hover { background: #b91c1c; }
.contacts-bulk-del:disabled { opacity: .6; cursor: default; }
.contacts-bulk-cancel { border: none; background: transparent; color: var(--text-muted); font-weight: 600; font-size: 13px; padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.contacts-bulk-cancel:hover { color: var(--text); background: var(--surface-2); }

/* dropdown custom stil pastila (filtrele din /conversations) */
.cf-select.cf-pill { display: inline-block; width: auto; min-width: 0; vertical-align: middle; }
.cf-select.cf-pill .cf-select-trigger { border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 500; box-shadow: none; }
.chat-layout .cf-select.cf-pill .cf-select-trigger { border: 1px solid var(--mc-n100); background: var(--mc-n0); color: var(--mc-n800); }
.chat-layout .cf-select.cf-pill .cf-select-trigger:hover { border-color: var(--mc-n400); background: var(--mc-n50); }
.chat-layout .cf-select.cf-pill.open .cf-select-trigger { border-color: var(--mc-blue); box-shadow: none; }
.chat-layout .cf-select.cf-pill .cf-select-trigger svg { color: var(--mc-n500); }
/* ============================================================
   /conversations — TEMA DARK (remapeaza tokenii --mc-* pe paleta dark)
   ============================================================ */
:root[data-theme="dark"] .chat-layout,
:root[data-theme="dark"] #reminderModal {
    --mc-blue:       #2e86fd;
    --mc-blue-hover: #4f9bff;
    --mc-blue-soft:  #182742;
    --mc-n0:   #151b2e;
    --mc-n50:  #1a2238;
    --mc-n75:  #232b42;
    --mc-n100: #2c3550;
    --mc-n400: #7681a0;
    --mc-n500: #98a1bd;
    --mc-n700: #c6cce0;
    --mc-n800: #e8ecf6;
}
/* casute cu accent cald (nota/avertisment) — variante dark ca sa nu fie prea aprinse */
:root[data-theme="dark"] .chat-layout .msg-note,
:root[data-theme="dark"] .chat-layout .chat-reminders,
:root[data-theme="dark"] .chat-layout .chat-window-warning,
:root[data-theme="dark"] .chat-layout .composer-note-hint { background: #2a2213; border-color: #4a3b16; color: #f0c674; }
:root[data-theme="dark"] .chat-layout .msg-note-body { color: var(--mc-n800); }

/* toolbar filtre — incapere pe un rand */
.chat-layout .mc-toolbar { gap: 6px; }
.chat-layout .cf-select.cf-pill .cf-select-trigger { padding: 6px 12px; }

/* optiunile din dropdown-urile custom nu se rup pe randuri */
.cf-select-opt { white-space: nowrap; }
/* ============================================================
   /instagram + /facebook — carduri moderne + iconite Lucide
   ============================================================ */
.ig-grid article { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.ig-grid article:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -12px rgba(16,19,34,.35); }
.ig-stats .ig-stat { display: inline-flex; align-items: center; gap: 5px; }
.ig-stats .ig-stat svg { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }
.igp-open { display: inline-flex; align-items: center; }
.igp-open svg { width: 15px; height: 15px; }
.igp-play { display: grid; place-items: center; }
.igp-play svg { width: 22px; height: 22px; }
.igp-flag { display: inline-flex; align-items: center; gap: 5px; }
.igp-flag svg { width: 12px; height: 12px; }
.igp-foot .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.igp-foot .btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.card-head h2 svg { vertical-align: -3px; }
