/* ==========================================================================
   FeedPlanner
   ========================================================================== */

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e8ebf2;
    --border-strong: #d9dee8;
    --text: #0f172a;
    --text-2: #334155;
    --muted: #64748b;
    --muted-2: #94a3b8;

    --brand: #1d6ff2;
    --brand-600: #155fd6;
    --brand-soft: #eaf2ff;
    --brand-soft-2: #d9e7ff;

    --success: #16a34a;
    --success-soft: #e6f7ec;
    --success-text: #15803d;
    --warn: #d97706;
    --warn-soft: #fff4df;
    --warn-text: #b45309;
    --danger: #dc2626;
    --danger-soft: #fdecec;
    --danger-text: #c81e1e;
    --purple: #7c3aed;
    --purple-soft: #f1ebff;

    --surface-hover: #fbfcfe;
    --neutral-soft: #f1f5f9;
    --placeholder-bg: #e2e8f0;
    --success-border: #c4ead2;
    --warn-border: #f6dca5;
    --danger-border: #f5c2c2;
    --wordmark: #0b1437;
    --topbar-bg: rgba(255, 255, 255, .92);
    --promo-bg: linear-gradient(160deg, #f3efff 0%, #eaf1ff 100%);
    --chart: #2a78d6;
    --chart-grid: #eceff4;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, .14);

    --sidebar-w: 248px;
    --topbar-h: 68px;

    color-scheme: light;
}

/*
 * Tema intunecata: aceleasi variabile, alte valori. Se aplica la alegerea
 * explicita (data-theme="dark") sau, fara alegere, dupa setarea sistemului.
 */
:root[data-theme="dark"] {
    --bg: #0b1120;
    --surface: #121a2b;
    --surface-2: #172135;
    --surface-hover: #162034;
    --border: #232e45;
    --border-strong: #2f3c58;
    --text: #e6ebf5;
    --text-2: #c2cadb;
    --muted: #8b97ad;
    --muted-2: #66728a;

    --brand: #3b82f6;
    --brand-600: #5b96f8;
    --brand-soft: #15264a;
    --brand-soft-2: #1d3563;

    --success: #22c55e;
    --success-soft: #0f2a1c;
    --success-text: #4ade80;
    --warn: #f59e0b;
    --warn-soft: #2d2210;
    --warn-text: #fbbf24;
    --danger: #ef4444;
    --danger-soft: #2f1618;
    --danger-text: #f87171;
    --purple: #a78bfa;
    --purple-soft: #231b3d;

    --neutral-soft: #1c2638;
    --placeholder-bg: #1c2638;
    --success-border: #1d4a31;
    --warn-border: #5a4214;
    --danger-border: #5a2428;
    --wordmark: #eef2ff;
    --topbar-bg: rgba(18, 26, 43, .92);
    --promo-bg: linear-gradient(160deg, #211b3b 0%, #15223d 100%);
    --chart: #5b9bff;
    --chart-grid: #1f2a3f;

    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);

    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b1120;
        --surface: #121a2b;
        --surface-2: #172135;
        --surface-hover: #162034;
        --border: #232e45;
        --border-strong: #2f3c58;
        --text: #e6ebf5;
        --text-2: #c2cadb;
        --muted: #8b97ad;
        --muted-2: #66728a;

        --brand: #3b82f6;
        --brand-600: #5b96f8;
        --brand-soft: #15264a;
        --brand-soft-2: #1d3563;

        --success: #22c55e;
        --success-soft: #0f2a1c;
        --success-text: #4ade80;
        --warn: #f59e0b;
        --warn-soft: #2d2210;
        --warn-text: #fbbf24;
        --danger: #ef4444;
        --danger-soft: #2f1618;
        --danger-text: #f87171;
        --purple: #a78bfa;
        --purple-soft: #231b3d;

        --neutral-soft: #1c2638;
        --placeholder-bg: #1c2638;
        --success-border: #1d4a31;
        --warn-border: #5a4214;
        --danger-border: #5a2428;
        --wordmark: #eef2ff;
        --topbar-bg: rgba(18, 26, 43, .92);
        --promo-bg: linear-gradient(160deg, #211b3b 0%, #15223d 100%);
        --chart: #5b9bff;
        --chart-grid: #1f2a3f;

        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
        --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);

        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

/* Plasa de siguranta: nicio imagine nu iese din container, oricare ar fi dimensiunea reala. */
img { max-width: 100%; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 "Plus Jakarta Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font: inherit; color: inherit; }

.icon { flex: none; display: block; }
.brand-icon { flex: none; display: block; }

/* ==========================================================================
   Layout: sidebar + topbar + continut
   ========================================================================== */

.app { display: flex; min-height: 100vh; }

.sidebar {
    position: sticky;
    top: 0;
    flex: none;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    height: 100vh;
    padding: 20px 16px;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 24px;
    color: var(--text);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.logo:hover { text-decoration: none; }

.side-nav { display: flex; flex-direction: column; gap: 4px; }

.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-weight: 500;
}
.side-link .icon { color: var(--muted); }
.side-link:hover { background: var(--surface-2); text-decoration: none; }
.side-link.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side-link.is-active .icon { color: var(--brand); }

.promo {
    position: relative;
    margin-top: auto;
    padding: 16px 16px 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--promo-bg);
}
.promo-text { margin: 0 0 12px; color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.45; }
.promo-icons { display: flex; gap: 6px; }
.promo-art { display: block; width: 100%; height: auto; margin-top: 4px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--topbar-h);
    padding: 0 28px;
    background: var(--topbar-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.topbar-search { position: relative; flex: 1; max-width: 420px; margin: 0; }
.topbar-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.topbar-search input[type="search"] {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
}
.topbar-search input[type="search"]:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }

.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.has-dot::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--danger);
}

.menu-toggle { display: none; }

.user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 4px 4px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
}
.user-btn:hover { background: var(--surface-2); }
.user-btn .icon { color: var(--muted); }

/* Pe ecranele late continutul creste pana la 1600px, apoi se centreaza langa meniu. */
.content { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 28px; }

.guest { min-height: 100vh; padding: 40px 20px; }

.footer-note { width: 100%; max-width: 1600px; margin: 0 auto; color: var(--muted-2); font-size: 12px; padding: 0 28px 24px; }

.sidebar-backdrop { display: none; }

/* ==========================================================================
   Avatare
   ========================================================================== */

.avatar {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 52px; height: 52px; }
.avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 700;
}

/* ==========================================================================
   Antet de pagina
   ========================================================================== */

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.page-title { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.page-sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.page-title .badge { vertical-align: middle; margin-left: 8px; font-size: 13px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
}
.chip .icon { color: var(--muted); }

/* ==========================================================================
   Carduri
   ========================================================================== */

.card {
    margin-bottom: 20px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.card-flush { padding: 0; overflow: hidden; }

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 700;
}
.card-title .icon { color: var(--brand); }

.card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.card-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.card-head .card-title { margin: 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ==========================================================================
   Statistici (panou)
   ========================================================================== */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }

.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stat {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.stat-value { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat-label { margin-top: 4px; color: var(--muted); font-size: 13px; }
.stat-corner { position: absolute; top: 14px; right: 16px; }
.stat-delta { display: inline-flex; align-items: center; gap: 2px; color: var(--success); font-size: 12px; font-weight: 700; }
.stat-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

.tile {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
}
.tile-sm { width: 44px; height: 44px; border-radius: 50%; }
.tone-blue   { background: var(--brand-soft);   color: var(--brand); }
.tone-purple { background: var(--purple-soft);  color: var(--purple); }
.tone-green  { background: var(--success-soft); color: var(--success); }
.tone-red    { background: var(--danger-soft);  color: var(--danger); }
.tone-amber  { background: var(--warn-soft);    color: var(--warn); }

/* ---------- Pasii urmatori ---------- */
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}
.step-body { flex: 1; min-width: 0; }
.step-title { font-weight: 700; }
.step-text { margin-top: 2px; color: var(--muted); font-size: 13px; }

/* ==========================================================================
   Butoane
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--brand-600); text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; font-weight: 500; }

.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: var(--brand-soft-2); }

.btn-ghost,
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text-2); }
.btn-ghost:hover,
.btn-outline:hover { background: var(--surface-2); color: var(--text); }

.btn-danger { background: var(--surface); border-color: var(--danger-border); color: var(--danger-text); }
.btn-danger:hover { background: var(--danger-soft); }

.btn-square { width: 40px; padding: 0; }
.btn-square.btn-sm { width: 34px; }

.inline-form { display: inline; margin: 0; }

/* ==========================================================================
   Badge-uri (pastile de status)
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-ok     { background: var(--success-soft); color: var(--success-text); }
.badge-warn   { background: var(--warn-soft);    color: var(--warn-text); }
.badge-danger { background: var(--danger-soft);  color: var(--danger-text); }
.badge-info   { background: var(--brand-soft);   color: var(--brand); }
.badge-off    { background: var(--neutral-soft);  color: var(--muted); }

/* ==========================================================================
   Alerte si bannere
   ========================================================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 14px;
}
.alert > div { flex: 1; min-width: 0; }
.alert .icon { margin-top: 1px; }
.alert-success { background: var(--success-soft); border-color: var(--success-border); color: var(--success-text); }
.alert-warning { background: var(--warn-soft);    border-color: var(--warn-border); color: var(--warn-text); }
.alert-danger  { background: var(--danger-soft);  border-color: var(--danger-border); color: var(--danger-text); }
.alert-info    { background: var(--brand-soft);   border-color: var(--brand-soft-2); color: var(--brand-600); }

.banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    background: var(--brand-soft);
    color: var(--text-2);
    font-size: 13px;
}
.banner-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
}
.banner strong { display: block; color: var(--brand-600); font-weight: 600; }

/* ==========================================================================
   Tabele
   ========================================================================== */

.table-wrap { overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; }
table.data th {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-hover); }
table.data .num { text-align: right; white-space: nowrap; }
table.data .actions { text-align: right; white-space: nowrap; }
table.data .actions > * { vertical-align: middle; }
table.data .nowrap { white-space: nowrap; }

.cell-main { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.cell-main .grow { min-width: 0; }
.cell-title { color: var(--text); font-weight: 700; }
a.cell-title:hover { color: var(--brand); text-decoration: none; }
.cell-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }

.thumb {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--surface-2);
}
.thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted-2); border: 1px solid var(--border); }

.type { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); white-space: nowrap; }
.type .icon { color: var(--brand); }

.table-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}
.table-foot form { display: flex; align-items: center; gap: 8px; margin: 0; }
.table-foot select { height: 32px; padding: 0 28px 0 10px; }

.pager { display: flex; align-items: center; gap: 6px; }
.pager a,
.pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-2);
    font-weight: 600;
}
.pager a:hover { background: var(--surface-2); text-decoration: none; }
.pager .is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .is-disabled { color: var(--muted-2); }

/* ==========================================================================
   Filtre si formulare
   ========================================================================== */

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.filters .input-icon { flex: 1 1 200px; max-width: 260px; }

.input-icon { position: relative; display: block; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.input-icon input { padding-left: 38px !important; }

input[type="text"],
input[type="url"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="time"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}
textarea { height: auto; min-height: 150px; padding: 12px; resize: vertical; line-height: 1.55; }
select {
    width: auto;
    padding-right: 34px;
    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='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}
input:focus,
select:focus,
textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.date-range {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
}
.date-range input[type="date"] { width: 132px; height: 36px; padding: 0 4px; border: 0; background: transparent; }
.date-range input[type="date"]:focus { box-shadow: none; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; margin: 0 0 8px; font-weight: 600; }
.optional { color: var(--muted); font-weight: 400; }
.field-hint { margin-top: 6px; color: var(--muted); font-size: 12px; }
.field-error { margin-top: 6px; color: var(--danger-text); font-size: 13px; }

/* ==========================================================================
   Meniuri dropdown
   ========================================================================== */

.dropdown { position: relative; display: inline-block; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    min-width: 200px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    text-align: left;
}
.dropdown:not(.is-open) > .dropdown-menu { display: none; }

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-2);
    font: inherit;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}
.menu-item .icon { color: var(--muted); }
.menu-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.menu-danger,
.menu-danger .icon { color: var(--danger-text); }
.menu-sep { height: 1px; margin: 6px 4px; background: var(--border); }
.menu-form { margin: 0; }

.user-menu { width: 260px; }
.user-card { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.user-card > div strong { display: block; }
.user-card > div span { display: block; color: var(--muted); font-size: 12px; }

.notif-menu { width: 360px; padding: 0; }
.menu-head { padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 700; }
.notif {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; }
.notif-title { font-weight: 600; font-size: 13px; }
.notif-text { margin-top: 2px; color: var(--muted); font-size: 12px; }
.menu-empty { display: flex; align-items: center; gap: 10px; padding: 18px 16px; color: var(--muted); font-size: 13px; }
.menu-empty .icon { color: var(--success); }

body.is-dimmed::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(15, 23, 42, .35);
}
body.is-dimmed .topbar { z-index: 40; }

/* ==========================================================================
   Liste (conturi, detaliu postare, rezultate cautare)
   ========================================================================== */

.list { margin: 0; padding: 0; list-style: none; }
.list-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: 0; }
.list-item:first-child { padding-top: 0; }
.list-item .grow { flex: 1; min-width: 180px; }
.name { font-weight: 700; }
.meta { margin-top: 2px; color: var(--muted); font-size: 13px; }
.item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ==========================================================================
   Compunere postare
   ========================================================================== */

.composer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.composer-grid > .card { margin-bottom: 20px; }

.editor { border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); }
.editor:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.editor textarea { min-height: 170px; border: 0; border-radius: 10px 10px 0 0; box-shadow: none; }
.editor-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-top: 1px solid var(--border);
}
.editor-tools { position: relative; display: flex; align-items: center; gap: 2px; }
.tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.tool:hover { background: var(--surface-2); color: var(--text); }
.counter { color: var(--muted-2); font-size: 12px; font-variant-numeric: tabular-nums; }

.emoji-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(8, 32px);
    gap: 2px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.emoji-panel button { width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; font-size: 18px; cursor: pointer; }
.emoji-panel button:hover { background: var(--surface-2); }

.dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 22px;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text-2);
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.dropzone:hover,
.dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone strong { font-weight: 600; font-size: 13px; }
.dropzone span { color: var(--muted); font-size: 12px; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumbs:empty { display: none; }
.thumbs img { width: 88px; height: 88px; object-fit: cover; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.thumbs-lg img { width: 160px; height: 160px; }
.thumb-item { position: relative; }
.thumb-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    cursor: pointer;
}

/* ---------- Previzualizare ---------- */
.preview-title { margin: 0 0 14px; font-weight: 700; }
.platform-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; }
.platform-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 36px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
}
.platform-tab.is-active { border-bottom-color: var(--brand); }
.platform-tab.is-soon { opacity: .35; filter: grayscale(.4); cursor: not-allowed; }

.fb-post { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.fb-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.fb-head .grow { flex: 1; min-width: 0; }
.fb-head .icon { color: var(--muted); }
.fb-page { font-weight: 700; font-size: 13px; }
.fb-when { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.fb-text { padding: 0 14px 10px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-text.is-placeholder { color: var(--muted); }
.fb-link { padding: 0 14px 10px; font-size: 13px; overflow-wrap: anywhere; }
.fb-media { display: grid; gap: 2px; background: var(--surface-2); }
.fb-media.n-1 { grid-template-columns: 1fr; }
.fb-media.n-2,
.fb-media.n-3,
.fb-media.n-4 { grid-template-columns: 1fr 1fr; }
.fb-media.n-3 > :first-child { grid-column: span 2; }
.fb-media img { display: block; width: 100%; height: 100%; aspect-ratio: 1.3; object-fit: cover; }
.fb-media.n-1 img { aspect-ratio: auto; max-height: 360px; }
.fb-media .more { position: relative; }
.fb-media .more::after {
    content: attr(data-more);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .5);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}
.fb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    margin: 0 14px 12px;
    border-radius: 10px;
    background: var(--placeholder-bg);
    color: var(--muted-2);
}
.fb-actions {
    display: flex;
    justify-content: space-around;
    padding: 8px 6px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}
.fb-actions span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Selector pagini ---------- */
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.page-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.page-option:hover { border-color: var(--border-strong); }
.page-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.page-option input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--brand); }
.page-option .grow { flex: 1; min-width: 0; }
.page-option .name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-option .meta { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.check-all { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.check-all input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }

.mode-switch { display: flex; flex-wrap: wrap; gap: 10px; }
.mode-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}
.mode-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.mode-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.mode-option .icon { color: var(--brand); }
#schedule-fields { margin-top: 14px; }
#schedule-fields input { max-width: 280px; }

.compose-actions { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 24px; }

/* ==========================================================================
   Detaliu postare
   ========================================================================== */

.post-message { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-link { margin: 0 0 12px; overflow-wrap: anywhere; }
.error-list { margin: 6px 0 0; padding-left: 18px; }
.error-note { margin: 8px 0 0; }
.error-text { margin-top: 4px; color: var(--danger-text); font-size: 13px; }
.error-code { color: var(--muted); }
.text-danger { color: var(--danger-text); }
.text-ok { color: var(--success-text); }
.text-muted { color: var(--muted); }

/* ==========================================================================
   Stari goale, sectiuni text
   ========================================================================== */

.empty { padding: 48px 20px; color: var(--muted); text-align: center; }
.empty h2 { margin: 12px 0 6px; color: var(--text); font-size: 18px; }
.empty p { max-width: 460px; margin: 0 auto 20px; }
.empty .tile { margin: 0 auto; }

.hint { margin-top: 12px; color: var(--muted); font-size: 13px; }
code { padding: 1px 6px; border-radius: 6px; background: var(--neutral-soft); font-size: 12px; }

.prose h2 { margin: 24px 0 8px; font-size: 17px; }
.prose h2:first-child { margin-top: 0; }
.prose p,
.prose li { color: var(--text-2); }

.faq { margin: 0; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--muted); transition: transform .15s; }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq .answer { padding: 0 0 16px; color: var(--text-2); }

.section-label { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* ==========================================================================
   Login
   ========================================================================== */

.login { max-width: 420px; margin: 8vh auto 0; text-align: center; }
.login .card { padding: 40px 32px; }
.login .logo { justify-content: center; padding: 0 0 20px; font-size: 24px; }
.login h1 { margin: 0 0 8px; font-size: 22px; }
.login p { margin: 0 0 24px; color: var(--muted); }
.btn-facebook { width: 100%; height: 48px; background: #1877f2; }
.btn-facebook:hover { background: #0f65d6; }
.login-remember { justify-content: center; margin: 14px 0 18px; }
.login-buttons { display: grid; gap: 10px; }
.btn-google { width: 100%; height: 48px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.btn-google:hover { background: var(--surface-2); }
.login-links { margin-top: 20px; color: var(--muted-2); font-size: 12px; }
.login-links a { color: var(--muted); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .composer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: 0;
        z-index: 60;
        transform: translateX(-100%);
        transition: transform .2s;
        box-shadow: var(--shadow-lg);
    }
    .sidebar.is-open { transform: none; }
    .sidebar-backdrop.is-open { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(15, 23, 42, .35); }
    .menu-toggle { display: inline-flex; }
    .topbar { padding: 0 16px; gap: 10px; }
    .content { padding: 20px 16px; }
    .user-btn .user-name { display: none; }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .notif-menu { width: min(360px, calc(100vw - 32px)); }
}

@media (max-width: 560px) {
    .stats,
    .stats-3 { grid-template-columns: minmax(0, 1fr); }
    .topbar-search { display: none; }
    .page-title { font-size: 24px; }
    .filters .input-icon { max-width: none; }
}

/* ==========================================================================
   V2: marca, bara de sus
   ========================================================================== */

.wordmark { color: var(--wordmark); font-weight: 800; letter-spacing: -.035em; }
.wordmark span {
    background: linear-gradient(90deg, #1662f5, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.logo .logo-mark { flex: none; }

.topbar-new { height: 38px; padding: 0 14px; }
.topbar-new .icon { margin: 0 -2px; }

.badge-xs { margin-left: 6px; padding: 1px 7px; font-size: 11px; vertical-align: 1px; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: -8px 0 20px; border-bottom: 1px solid var(--border); }
.tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--muted);
    font-weight: 600;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.is-active { border-bottom-color: var(--brand); color: var(--brand); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.card-pad { padding: 24px 24px 8px; }

.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); }
.segmented a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 7px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.segmented a:hover { background: var(--surface-2); text-decoration: none; }
.segmented a.is-active { background: var(--brand-soft); color: var(--brand); }

/* ==========================================================================
   V2: panou
   ========================================================================== */

a.stat-link { color: inherit; transition: border-color .15s, box-shadow .15s; }
a.stat-link:hover { border-color: var(--brand-soft-2); box-shadow: 0 4px 16px rgba(29, 111, 242, .08); text-decoration: none; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.empty-sm { padding: 24px 12px; }
.empty-sm p { margin-bottom: 12px; }

.agenda-day { margin: 16px 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.agenda-day:first-of-type { margin-top: 0; }
.agenda .list-item { padding: 10px 0; flex-wrap: nowrap; }
.agenda .list-item:first-child { padding-top: 10px; }
.agenda-time { width: 44px; flex: none; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.thumb-sm { width: 40px; height: 40px; border-radius: 8px; }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini-stats div { padding: 12px; border-radius: 10px; background: var(--surface-2); }
.mini-stats strong { display: block; font-size: 20px; font-weight: 800; }
.mini-stats span { color: var(--muted); font-size: 12px; }

.status-list { margin: 0; padding: 0; list-style: none; }
.status-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.status-list li:last-child { border-bottom: 0; }
.status-list a { margin-left: auto; font-weight: 600; }
.status-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.status-dot.is-ok   { background: var(--success); }
.status-dot.is-bad  { background: var(--danger); }
.status-dot.is-warn { background: var(--warn); }
.status-dot.is-idle { background: var(--muted-2); }

/* ==========================================================================
   V2: calendar
   ========================================================================== */

.cal-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-heading { margin: 0 0 0 10px; font-size: 18px; font-weight: 800; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.cal-dow span { display: block; color: var(--text); font-size: 18px; font-weight: 800; }

.cal-day {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 118px;
    padding: 6px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: background .1s;
}
.cal-day:nth-child(7n) { border-right: 0; }
.cal-week .cal-day { min-height: 420px; }
.cal-day.is-other { background: var(--surface-hover); }
.cal-day.is-other .cal-num { color: var(--muted-2); }
.cal-day.is-past { background: var(--surface-hover); }
.cal-day.is-drop { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }

.cal-day-head { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.cal-num { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; border-radius: 50%; font-size: 13px; font-weight: 700; }
.cal-day.is-today .cal-num { background: var(--brand); color: #fff; }
.cal-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: auto;
    border-radius: 6px;
    color: var(--muted);
    opacity: 0;
    transition: opacity .1s;
}
.cal-day:hover .cal-add,
.cal-add:focus-visible { opacity: 1; }
.cal-add:hover { background: var(--brand-soft); color: var(--brand); }

.cal-post {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
    padding: 4px 6px 4px 8px;
    border-left: 3px solid var(--muted-2);
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
}
.cal-post:hover { text-decoration: none; filter: brightness(.97); }
.cal-post[draggable="true"] { cursor: grab; }
.cal-post.is-dragging { opacity: .45; }
.cal-post.is-saving { opacity: .6; pointer-events: none; }
.cal-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-week .cal-title { white-space: normal; }
.cal-meta { width: 100%; color: var(--muted); font-size: 11px; }
.cal-thumb { width: 100%; height: 72px; margin-bottom: 4px; border-radius: 4px; object-fit: cover; }
.cal-more { padding: 2px 6px; color: var(--muted); font-size: 12px; font-weight: 600; }

.st-scheduled  { border-left-color: var(--brand) !important; background: var(--brand-soft) !important; }
.st-published  { border-left-color: var(--success) !important; background: var(--success-soft) !important; }
.st-partial,
.st-publishing { border-left-color: var(--warn) !important; background: var(--warn-soft) !important; }
.st-failed     { border-left-color: var(--danger) !important; background: var(--danger-soft) !important; }
.st-draft      { border-left-color: var(--muted-2) !important; border-left-style: dashed !important; background: var(--surface-2) !important; }

/* Pe telefon: buline cu numarul pe stare in luna, lista zilei sub calendar, saptamana pe randuri. */
.cal-dots, .cal-agenda, .cal-day-label { display: none; }
.cal-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 5px; border-left: 0 !important; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; }
.cal-dot.st-scheduled { background: var(--brand) !important; }
.cal-dot.st-published { background: var(--success) !important; }
.cal-dot.st-partial, .cal-dot.st-publishing { background: var(--warn) !important; }
.cal-dot.st-failed { background: var(--danger) !important; }
.cal-dot.st-draft { background: var(--muted-2) !important; }
.cal-agenda { padding: 12px 14px 4px; border-top: 1px solid var(--border); }
.cal-agenda-title { margin: 0 0 10px; font-size: 15px; }
.cal-agenda-item { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 8px 10px; border-left: 3px solid var(--muted-2); border-radius: 10px; color: var(--text); text-decoration: none; }
.cal-agenda-item:hover { text-decoration: none; }
.cal-agenda-item img { width: 44px; height: 44px; flex: none; border-radius: 8px; object-fit: cover; }
.cal-agenda-time { flex: none; width: 42px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cal-agenda-body { display: grid; grid-template-columns: minmax(0, 1fr); flex: 1; gap: 2px; min-width: 0; }
.cal-agenda-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.cal-agenda-meta, .cal-week .cal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; }
.cal-agenda-meta .page-stack .avatar-xs, .cal-meta .page-stack .avatar-xs { width: 24px; height: 24px; border-color: var(--surface-2); }
.cal-agenda-meta .page-stack-more, .cal-meta .page-stack-more { min-width: 24px; height: 24px; border-color: var(--surface-2); }
.cal-meta .page-stack-name { max-width: 110px; font-size: 11px; }
@media (max-width: 640px) {
    .cal-month .cal-post, .cal-month .cal-more, .cal-month .cal-add { display: none; }
    .cal-month .cal-day { min-height: 62px; padding: 4px; cursor: pointer; }
    .cal-month .cal-day.is-selected { box-shadow: inset 0 0 0 2px var(--brand); }
    .cal-month .cal-dow { font-size: 11px; padding: 8px 0; }
    .cal-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
    .cal-agenda { display: block; }
    .cal-week { grid-template-columns: minmax(0, 1fr); }
    .cal-week .cal-dow { display: none; }
    .cal-week .cal-day { min-height: 0; border-right: 0; }
    .cal-week .cal-day-label { display: inline; font-weight: 800; }
    .cal-week .cal-thumb { display: none; }
}
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 16px; color: var(--muted); font-size: 12px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border-left: 3px solid; border-radius: 3px; }

/* ==========================================================================
   V2: grupuri
   ========================================================================== */

.group-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--group, var(--brand)); }
.list-item .group-dot { width: 12px; height: 12px; }

.color-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.color-picker label { position: relative; cursor: pointer; }
.color-picker input { position: absolute; opacity: 0; pointer-events: none; }
.color-picker span {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--swatch);
}
.color-picker input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--swatch); }
.color-picker input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 5px; }

.page-grid-compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); max-height: 360px; overflow-y: auto; padding: 2px; }

.group-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.group-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.group-chip:hover { border-color: var(--group); }
.group-chip.is-active { border-color: var(--group); background: var(--brand-soft); color: var(--text); }
.group-count { color: var(--muted); font-weight: 500; }
.group-manage { margin-left: 4px; font-size: 13px; }

/* ==========================================================================
   V2: editor (ciorne, coada, biblioteca)
   ========================================================================== */

.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.field-row .field-label { margin: 0; }

.autosave { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; color: var(--muted-2); font-size: 13px; }
.autosave .icon { color: var(--success); }

.mode-option.is-disabled { opacity: .5; cursor: not-allowed; }
#queue-fields { margin-top: 14px; }
.queue-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.queue-next { color: var(--brand-600); font-size: 13px; font-weight: 600; }
.queue-next.is-error { color: var(--danger-text); }

.thumb-item.is-uploading img { opacity: .45; }
.thumb-item.is-uploading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 2px solid var(--brand-soft-2);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.preview-card { position: sticky; top: calc(var(--topbar-h) + 16px); }

body.has-modal { overflow: hidden; }
.modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .45);
}
.modal-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: min(880px, 100%);
    max-height: calc(100vh - 40px);
    padding: 20px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.modal-foot .meta { margin: 0 auto 0 0; }

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    min-height: 140px;
    overflow-y: auto;
}
.library-item {
    position: relative;
    padding: 0;
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--surface-2);
    overflow: hidden;
    cursor: pointer;
}
.library-item img { width: 100%; height: 100%; object-fit: cover; }
.library-item:hover { border-color: var(--brand-soft-2); }
.library-item.is-picked { border-color: var(--brand); }
.library-item.is-in-post { opacity: .4; cursor: not-allowed; }
.library-check {
    position: absolute;
    top: 6px;
    right: 6px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
}
.library-item.is-picked .library-check { display: inline-flex; }

/* ==========================================================================
   V2: biblioteca media
   ========================================================================== */

.upload-card { padding: 16px; }
.dropzone.is-busy { opacity: .6; pointer-events: none; }

.tag-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); }
.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
}
.tag-chip:hover { border-color: var(--brand-soft-2); text-decoration: none; }
.tag-chip.is-active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; padding: 16px; }
.media-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.media-thumb { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius) var(--radius) 0 0; background: var(--surface-2); overflow: hidden; }

/* Lista de postari: paginile fiecarei postari, ca poze de profil suprapuse */
.post-pages { white-space: nowrap; }
.page-stack { display: inline-flex; align-items: center; }
.page-stack .avatar-wrap + .avatar-wrap { margin-left: -8px; }
.page-stack .avatar-xs { width: 28px; height: 28px; border: 2px solid var(--surface); font-size: 12px; }
.page-stack .avatar-badge { right: -3px; bottom: -3px; }
.page-stack .avatar-wrap.is-failed .avatar-xs { border-color: var(--danger); }
.page-stack-more { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; margin-left: -8px; padding: 0 6px; border: 2px solid var(--surface); border-radius: 999px; background: var(--neutral-soft); color: var(--text-2); font-size: 11px; font-weight: 700; }
.page-stack-name { flex: none; max-width: 160px; margin-left: 8px; overflow: hidden; color: var(--text-2); font-size: 13px; text-overflow: ellipsis; }

/* Pagina blocata cat se incarca fisiere */
.upload-lock { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.upload-lock-card { display: grid; justify-items: center; gap: 10px; width: min(360px, 100%); padding: 28px 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); text-align: center; }
.upload-lock-card .usage-bar { width: 100%; }
.upload-lock-card .meta { margin: 0; font-size: 13px; }
.upload-lock-status { color: var(--text-2); font-size: 14px; font-weight: 600; }
.upload-lock-spinner { width: 32px; height: 32px; border: 3px solid var(--brand-soft-2); border-top-color: var(--brand); border-radius: 50%; animation: upload-spin .8s linear infinite; }
@keyframes upload-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .upload-lock-spinner { animation-duration: 2.4s; } }

/* Semnul de video peste miniatura: ▶ si durata */
.video-badge { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(15, 23, 42, .78); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.4; pointer-events: none; }
.video-badge-sm { left: 4px; bottom: 4px; padding: 2px 5px; font-size: 10px; }
.thumb-item, .library-item { position: relative; }
.thumb-video-loading { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 72px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.thumb-video-loading svg { width: 22px; height: 22px; }
.post-video { display: block; width: 100%; max-height: 560px; border-radius: var(--radius); background: #000; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-body { padding: 10px 12px 12px; }
.media-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-body .meta { font-size: 12px; }
.media-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tag-chip-pool { gap: 4px; }

/* Administrare */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.admin-stat-text { font-size: 20px; }
.admin-table td { vertical-align: top; }
.admin-message { min-width: 280px; max-width: 720px; overflow-wrap: anywhere; }
.admin-message details { margin-top: 6px; }
.admin-message summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.admin-pre { max-height: 360px; margin: 6px 0 0; padding: 10px 12px; overflow: auto; border-radius: var(--radius-sm); background: var(--surface-2); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-values { margin-top: 0; }
.admin-changed { color: var(--brand); font-weight: 600; }
.admin-chip-bad { border-color: var(--danger-border); background: var(--danger-soft); color: var(--danger-text); }
.upload-tags { margin-bottom: 12px; }
.media-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.tag-menu { width: 260px; }
.tag-form { padding: 8px; }
.tag-form input { height: 36px; }
.tag-form .btn { margin-top: 8px; }

/* ==========================================================================
   V2: program coada
   ========================================================================== */

.slot-table { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.slot-row { display: grid; grid-template-columns: 110px repeat(7, 36px) 40px; align-items: center; gap: 6px; }
.slot-head { color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }
.slot-head span:first-child { text-align: left; }
.slot-row input[type="time"] {
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    font: inherit;
}
.day-toggle { position: relative; display: flex; justify-content: center; cursor: pointer; }
.day-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.day-toggle span {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface);
}
.day-toggle input:checked + span {
    border-color: var(--brand);
    background: var(--brand) 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='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.day-toggle input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.slot-list .list-item { padding: 10px 0; }
.slot-list .meta a { margin-right: 8px; }

/* ==========================================================================
   V2: statistici si grafice
   ========================================================================== */

.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.banner-spaced { margin-bottom: 20px; }

.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-kpi { align-items: flex-start; }
.stat-kpi .tile { width: 44px; height: 44px; border-radius: 12px; }
.kpi-delta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-top: 6px; font-size: 12px; font-weight: 700; }
.kpi-delta span { color: var(--muted); font-weight: 500; }
.kpi-delta.is-up   { color: var(--success-text); }
.kpi-delta.is-down { color: var(--danger-text); }
.kpi-delta.is-flat { color: var(--muted); }
.narrow-card { max-width: 520px; margin: 40px auto; }
.nl-stats { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 12px; color: var(--text-2); }
.nl-stats span { display: inline-flex; align-items: center; gap: 4px; }
.nl-stats .nl-premium { color: #b45309; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.input-prefix { display: flex; align-items: center; gap: 6px; }
.input-prefix span { color: var(--text-2); font-size: 13px; white-space: nowrap; }
.input-prefix input { flex: 1; min-width: 0; }
.folder-pool { padding: 12px 0; border-top: 1px solid var(--border); }
.folder-pool > .list-item { flex-wrap: wrap; }
.folder-articles { margin: 4px 0 8px 12px; }
.folder-edit > form { margin-top: 12px; }
.code-box { width: 100%; margin: 8px 0; font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; overflow: auto; }
.segmented-spaced { margin-bottom: 16px; }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.choice:hover { border-color: var(--border-strong); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.choice strong { display: block; font-size: 14px; }
.choice .meta { display: block; }
.team-settings .is-muted { opacity: .45; pointer-events: none; }
.kpi-note { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.chart-card .card-title { margin-bottom: 4px; }
.chart-sub { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.chart-wrap { position: relative; }
.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 20px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-gridline { stroke: var(--chart-grid); stroke-width: 1; }
.chart-base { stroke: var(--border-strong); stroke-width: 1; }
.chart-tick { fill: var(--muted-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-area { fill: var(--chart); fill-opacity: .1; }
.chart-line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot,
.chart-hover-dot { fill: var(--chart); stroke: var(--surface); stroke-width: 2; }
.chart-end { fill: var(--text); font-size: 12px; font-weight: 700; }
.chart-cross { stroke: var(--muted-2); stroke-width: 1; }
.chart-hit { cursor: crosshair; }
.chart-bar { fill: var(--chart); }
.chart-bar-hit { outline: none; }
.chart-bar-hit.is-hover,
.chart-bar-hit:focus { fill: rgba(42, 120, 214, .07); }

.chart-table { margin-top: 10px; }
.chart-table summary { color: var(--brand); font-size: 13px; font-weight: 600; cursor: pointer; }
.chart-table table { margin-top: 8px; }
.chart-table table.data td,
.chart-table table.data th { padding: 6px 10px; }
.chart-table tbody { display: block; max-height: 260px; overflow-y: auto; }
.chart-table thead,
.chart-table tbody tr { display: table; width: 100%; table-layout: fixed; }

.chart-tip {
    position: fixed;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    pointer-events: none;
}
.chart-tip strong { font-size: 15px; font-weight: 800; }
.chart-tip span { color: var(--muted); font-size: 12px; }

.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: center; gap: 16px; outline: none; }
.hbar:focus-visible { box-shadow: 0 0 0 2px var(--brand-soft-2); border-radius: 6px; }
.hbar-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.hbar-label .icon { color: var(--brand); }
.hbar-label span { color: var(--muted); font-weight: 500; font-size: 12px; }
.hbar-track { display: flex; align-items: center; gap: 8px; }
.hbar-fill { height: 18px; min-width: 3px; border-radius: 0 4px 4px 0; background: var(--chart); }
.hbar-value { color: var(--text); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

td.rank { width: 36px; color: var(--muted); font-weight: 800; }

.target-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--text-2); font-size: 12px; }
.target-stats span { display: inline-flex; align-items: center; gap: 4px; }
.target-stats .icon { color: var(--muted); }

/* ==========================================================================
   V2: responsive
   ========================================================================== */

@media (max-width: 1100px) {
    .stats-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dash-grid,
    .chart-grid,
    .split { grid-template-columns: minmax(0, 1fr); }
    .preview-card { position: static; }
}

@media (max-width: 900px) {
    .topbar-new span { display: none; }
    .topbar-new { width: 38px; padding: 0; }
    .cal-month .cal-day { min-height: 84px; }
    .cal-month .cal-title { display: none; }
    .hbar { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

@media (max-width: 560px) {
    .stats-5 { grid-template-columns: minmax(0, 1fr); }
    .cal-week { grid-template-columns: minmax(0, 1fr); }
    .cal-week .cal-dow { display: none; }
    .cal-week .cal-day { min-height: 0; border-right: 0; }
    .slot-row { grid-template-columns: 90px repeat(7, 28px) 32px; gap: 4px; }
    .day-toggle span { width: 26px; height: 26px; }
}

/* ==========================================================================
   V3: Instagram / X / TikTok, text pe pagina, sabloane, AI, import, recurente
   ========================================================================== */

.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Editor ---------- */
.field-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.btn-ai .icon { color: var(--purple); }
.editor-bar .counter.is-over,
.counter.is-over { color: var(--danger-text); font-weight: 700; }

.platform-tab { cursor: pointer; border-radius: 8px 8px 0 0; }
.platform-tab:not(.is-soon):hover { background: var(--surface-2); }

/* Previzualizarea isi schimba forma dupa retea. */
.fb-post[data-platform="instagram"] .fb-head .fb-when { display: none; }
.fb-post[data-platform="instagram"] .fb-media { order: 2; }
.fb-post[data-platform="instagram"] { display: flex; flex-direction: column; }
.fb-post[data-platform="instagram"] .fb-head { order: 1; }
.fb-post[data-platform="instagram"] .fb-placeholder { order: 2; }
.fb-post[data-platform="instagram"] .fb-actions { order: 3; justify-content: flex-start; gap: 16px; padding: 10px 14px 4px; border-top: 0; font-size: 18px; }
.fb-post[data-platform="instagram"] .fb-text { order: 4; padding-top: 4px; }
.fb-post[data-platform="instagram"] .fb-link { order: 5; }
.fb-post[data-platform="instagram"] .fb-media.n-1 img { aspect-ratio: 1; max-height: none; }
.fb-post[data-platform="instagram"] .fb-head .avatar,
.fb-post[data-platform="instagram"] .fb-head .avatar-fallback { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #d62976; }

.fb-post[data-platform="x"] .fb-text { font-size: 14px; }
.fb-post[data-platform="x"] .fb-media { margin: 0 14px 10px; border-radius: 14px; overflow: hidden; }
.fb-post[data-platform="x"] .fb-actions { border-top: 0; justify-content: space-between; padding: 6px 40px 12px; font-size: 15px; }

.fb-post[data-platform="tiktok"] { display: grid; background: #111; color: #fff; border-color: #111; }
.fb-post[data-platform="tiktok"] > * { grid-area: 1 / 1; }
.fb-post[data-platform="tiktok"] .fb-media,
.fb-post[data-platform="tiktok"] .fb-placeholder { margin: 0; border-radius: 0; background: #222; color: #555; height: auto; min-height: 380px; }
.fb-post[data-platform="tiktok"] .fb-media.n-1 img { aspect-ratio: 9 / 16; max-height: 460px; }
.fb-post[data-platform="tiktok"] .fb-head { z-index: 1; align-self: end; margin-bottom: 64px; padding: 0 60px 0 14px; }
.fb-post[data-platform="tiktok"] .fb-head .avatar,
.fb-post[data-platform="tiktok"] .fb-head .avatar-fallback,
.fb-post[data-platform="tiktok"] .fb-head > .icon,
.fb-post[data-platform="tiktok"] .fb-when { display: none; }
.fb-post[data-platform="tiktok"] .fb-text,
.fb-post[data-platform="tiktok"] .fb-link { z-index: 1; align-self: end; max-height: 60px; overflow: hidden; padding: 0 60px 14px 14px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.fb-post[data-platform="tiktok"] .fb-text.is-placeholder { color: #cbd5e1; }
.fb-post[data-platform="tiktok"] .fb-actions { z-index: 1; flex-direction: column; justify-self: end; align-self: end; gap: 18px; margin: 0 10px 20px 0; padding: 0; border: 0; color: #fff; font-size: 20px; }

.pv-checks { display: grid; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 12px; }
.pv-checks li { padding: 8px 10px; border-radius: var(--radius-sm); }
.pv-checks .is-ok { background: var(--success-soft); color: var(--success-text); }
.pv-checks .is-bad { background: var(--danger-soft); color: var(--danger-text); }

.avatar-wrap { position: relative; flex: none; }
.avatar-badge { position: absolute; right: -4px; bottom: -4px; padding: 1px; border-radius: 6px; background: var(--surface); line-height: 0; }

.network-chip { --group: var(--brand); }
.network-chip .brand-icon { margin-left: -4px; }

/* ---------- Text diferit pe pagina ---------- */
.custom-block > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.custom-block > summary::-webkit-details-marker { display: none; }
.custom-block > summary .card-title { margin: 0; }
.custom-block[open] .custom-chevron { transform: rotate(180deg); }
.custom-block[open] > summary { margin-bottom: 8px; }
.custom-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 10px; }
.custom-item { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.custom-head { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.custom-head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-item textarea,
.custom-item input { width: 100%; }

/* ---------- Sabloane ---------- */
.template-list { display: grid; gap: 8px; max-height: 340px; overflow-y: auto; }
.template-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.template-row .grow { flex: 1; min-width: 0; }
.template-row .name { font-weight: 600; font-size: 13px; }
.template-excerpt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.template-save { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.template-save-title { font-weight: 600; font-size: 13px; }
.template-save-row { display: flex; flex-wrap: wrap; gap: 8px; }
.template-save-row input { flex: 1 1 180px; min-width: 0; }
.field-hint.is-error { color: var(--danger-text); }

.templates-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.template-card { display: grid; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.template-card:last-child { border-bottom: 0; }
.template-card .row { display: flex; align-items: center; gap: 10px; }
.template-card .row .grow { flex: 1; min-width: 0; }
.template-text { color: var(--text-2); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 90px; overflow: hidden; }

/* ---------- Asistent AI ---------- */
#ai-modal .modal-box { width: min(640px, 100%); overflow-y: auto; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-actions .mode-option { padding: 8px 12px; font-size: 13px; }
.ai-options { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 13px; }
.ai-options label { display: inline-flex; align-items: center; gap: 8px; }
.ai-result textarea { width: 100%; }

/* ---------- Conturi pe retele ---------- */
.network-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.network-card { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.network-card-head { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.network-card p { margin: 0; color: var(--muted); font-size: 13px; }
.network-card .btn { justify-self: start; }
.platform-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

/* ---------- Import ---------- */
.import-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.import-table-wrap { overflow-x: auto; }
.import-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.import-table th,
.import-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.import-table th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.import-table td { font-variant-numeric: tabular-nums; }
.import-table .import-text { max-width: 360px; white-space: pre-wrap; overflow-wrap: anywhere; }
.import-table tr.is-bad td { background: var(--danger-soft); }
.import-errors { margin: 4px 0 0; padding-left: 16px; color: var(--danger-text); }
.import-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
code.inline { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; }

/* ---------- Recurente ---------- */
.recurrence-form { display: grid; gap: 12px; }
.recurrence-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.recurrence-row label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.recurrence-row input,
.recurrence-row select { min-width: 0; }
.recurrence-item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.recurrence-item:last-child { border-bottom: 0; }
.recurrence-item .grow { flex: 1 1 260px; min-width: 0; }
.recurrence-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recurrence-item form { margin: 0; }

/* ---------- Limba ---------- */
.lang-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.lang-switch button { height: 26px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.lang-switch button.is-active { background: var(--brand-soft); color: var(--brand); }
.lang-switch form { margin: 0; display: contents; }

@media (max-width: 900px) {
    .templates-layout { grid-template-columns: 1fr; }
    .custom-list { grid-template-columns: 1fr; }
}

.side-label { margin: 14px 12px 4px; color: var(--muted-2); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.side-link-sm { font-size: 13px; }
.menu-lang { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; color: var(--muted); }
.guest-lang { display: flex; justify-content: flex-end; gap: 8px; max-width: 1080px; margin: -20px auto 12px; }
.post-message-sm { margin: 6px 0 0; padding: 8px 10px; border-left: 3px solid var(--border-strong); background: var(--surface-2); font-size: 13px; }
.stack { display: grid; gap: 14px; }
.stack .field { margin: 0; }
.stack input[type="text"],
.stack input[type="url"],
.stack textarea { width: 100%; }
.recurrence-item .tile { width: 40px; height: 40px; }

/* ---------- Programare in serie ---------- */
.bulk-list { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.bulk-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.bulk-item img { flex: none; width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; }
.bulk-item.is-uploading img { opacity: .45; }
.bulk-item.is-late { border-color: var(--danger); background: var(--danger-soft); }
.bulk-num { flex: none; width: 24px; padding-top: 2px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.bulk-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.bulk-body textarea { width: 100%; }
.bulk-when { font-size: 13px; font-weight: 700; color: var(--brand-600); font-variant-numeric: tabular-nums; }
.bulk-item.is-late .bulk-when { color: var(--danger-text); }
.bulk-actions { display: flex; flex-direction: column; gap: 2px; }
.bulk-actions .icon-btn:disabled { opacity: .3; cursor: default; }
.bulk-ai { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bulk-timing { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin-top: 14px; }
.bulk-timing > label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.bulk-timing .field-hint { flex-basis: 100%; margin: 0; }
.bulk-timing .check-inline { display: inline-flex; align-items: center; gap: 6px; padding-bottom: 10px; color: var(--text-2); font-size: 13px; }
.bulk-window { display: inline-flex; align-items: center; gap: 6px; }
.bulk-window.is-off { opacity: .45; }
.input-suffix { display: inline-flex; align-items: center; gap: 6px; }
.input-suffix input { width: 90px; }
.input-suffix span { color: var(--text-2); font-size: 13px; font-weight: 500; }
.bulk-plan { margin-top: 14px; font-size: 13px; }
.bulk-plan p { margin: 0 0 4px; }
@media (max-width: 560px) {
    .bulk-item img { width: 56px; height: 56px; }
}

/* ---------- Distribuire pe alte pagini ---------- */
.reshare-row { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin: 10px 0 14px; }
.reshare-row > label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.page-option.is-disabled { opacity: .4; cursor: not-allowed; }
[data-reshare] .field { margin-top: 14px; }
[data-reshare] textarea { width: 100%; }

/* Zonele de text secundare: mai mici decat editorul principal (min-height global 150px). */
.bulk-body textarea { min-height: 64px; padding: 8px 10px; }
.custom-item textarea { min-height: 84px; }
[data-reshare] textarea { min-height: 64px; }
.snippets-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; color: var(--text-2); font-size: 13px; }
.snippets-toggle input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); }

.story-options { display: grid; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.story-options .field-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.story-options .field-hint { margin: 0; }
.check-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.check-inline[hidden] { display: none; }
.check-inline input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.settings-section .check-inline { color: var(--text); font-size: 14px; }
form.card > .compose-actions { margin: 20px 0 0; }
.mode-switch-compact { gap: 8px; }
.mode-switch-compact .mode-option { padding: 8px 12px; font-size: 13px; }
.settings-section + .settings-section { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------- Statistici suplimentare ---------- */
.stats-more { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stats-more .stat-value { font-size: 20px; }
.earnings-row { display: flex; flex-wrap: wrap; gap: 32px; margin: 6px 0 16px; font-variant-numeric: tabular-nums; }
.reaction-emoji { font-size: 16px; line-height: 1; }

/* Randurile de campuri mici (repetare, serie, distribuire): aceeasi inaltime, latimi pe masura. */
.recurrence-row input[type="number"],
.bulk-timing input[type="number"],
.reshare-row input[type="number"],
.input-suffix input[type="number"] { width: 96px; }
.recurrence-row input[type="time"],
.bulk-timing input[type="time"] { width: 120px; }
.recurrence-row input[type="date"] { width: 170px; }
.recurrence-row select,
.bulk-timing select,
.reshare-row select { min-width: 180px; }
.recurrence-row > label > span,
.bulk-timing > label > span:not(.input-suffix),
.reshare-row > label > span:not(.input-suffix) { white-space: nowrap; }
.recurrence-row .btn,
.bulk-timing .btn { height: 40px; }

/* Conturi: patru retele pe un rand, butonul mereu jos, la aceeasi inaltime. */
.network-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.network-card { display: flex; flex-direction: column; }
.network-card .btn { margin-top: auto; align-self: flex-start; }
.network-card .network-hint { font-size: 12px; color: var(--muted-2); }
@media (max-width: 1200px) { .network-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .network-grid { grid-template-columns: 1fr; } }

/* Statistici: cardurile se aseaza uniform, oricate ar fi (fara randuri rupte 3+2). */
.stats-5,
.stats-more { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stats-more .stat-value { font-size: inherit; }
.import-table td:first-child { white-space: nowrap; }

/* Telefon: perioadele din Statistici si randurile programului cozii incap pe ecran. */
@media (max-width: 560px) {
    .filter-row .segmented { display: flex; width: 100%; }
    .filter-row .segmented a { flex: 1; justify-content: center; padding-left: 4px; padding-right: 4px; font-size: 12px; white-space: nowrap; }
    .filter-row select { width: 100%; }
    .slot-row { grid-template-columns: minmax(0, 1fr) repeat(7, 26px) 28px; gap: 3px; }
    .slot-row input[type="time"] { padding-left: 6px; padding-right: 2px; font-size: 13px; }
}
@media (max-width: 560px) {
    .recurrence-row > label,
    .bulk-timing > label,
    .reshare-row > label { flex: 1 1 140px; }
    .recurrence-row > label > input,
    .recurrence-row > label > select,
    .bulk-timing > label > input,
    .bulk-timing > label > select,
    .reshare-row > label > select { width: 100%; min-width: 0; }
    .recurrence-row .btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   Tema: comutator Luminos / Intunecat / Sistem
   ========================================================================== */

.theme-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.theme-switch button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button.is-active { background: var(--brand-soft); color: var(--brand); }
.menu-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; color: var(--muted); }

:root[data-theme="dark"] .brand-x > rect,
:root[data-theme="dark"] .brand-tiktok > rect { stroke: var(--border-strong); stroke-width: 1; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .brand-x > rect,
    :root:not([data-theme="light"]) .brand-tiktok > rect { stroke: var(--border-strong); stroke-width: 1; }
}

/* ==========================================================================
   Abonament: consum, planuri, functii blocate
   ========================================================================== */

.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.usage-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--text-2); font-size: 13px; }
.usage-head strong { color: var(--text); font-variant-numeric: tabular-nums; }
.usage-bar { height: 8px; overflow: hidden; border-radius: 999px; background: var(--neutral-soft); }
.usage-bar span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.usage-bar.is-near span { background: var(--warn); }
.usage-bar.is-full span { background: var(--danger); }
.usage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

.plans-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 16px; }
.plans-head .card-title { margin: 0; }
.plans-head .badge { margin-left: 4px; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.plan-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.plan-card.is-current { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.plan-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 18px; font-weight: 700; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price strong { font-size: 32px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan-price span { color: var(--muted); }
.plan-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--text-2); font-size: 13px; }
.plan-list li { display: flex; align-items: center; gap: 8px; }
.plan-list .icon { color: var(--success); }
.plan-list li.is-missing { color: var(--muted-2); }
.plan-list li.is-missing .icon { color: var(--muted-2); }
.plan-actions { display: grid; gap: 8px; margin-top: auto; }
.plan-actions form { margin: 0; }
.plan-actions .btn { width: 100%; justify-content: center; }
.btn-paypal { background: #ffc439; border-color: #ffc439; color: #111; }
.btn-paypal:hover { background: #f2b52e; border-color: #f2b52e; color: #111; }

.locked { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-2); font-size: 13px; }
.locked .icon { color: var(--muted); }
.locked .grow { flex: 1; min-width: 200px; }

.menu-badge { margin-left: auto; }

/* ==========================================================================
   Prima pagina (landing)
   ========================================================================== */

:root {
    --lp-gradient: linear-gradient(90deg, #1662f5 0%, #7c3aed 100%);
    --lp-glow-1: rgba(29, 111, 242, .12);
    --lp-glow-2: rgba(124, 58, 237, .12);
}

body.lp {
    background:
        radial-gradient(900px 500px at 85% -5%, var(--lp-glow-2), transparent 70%),
        radial-gradient(800px 500px at 5% 10%, var(--lp-glow-1), transparent 70%),
        var(--bg);
    background-repeat: no-repeat;
}

.lp-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.lp h1, .lp h2, .lp h3 { text-wrap: balance; }

.lp-btn-gradient { border: 0; background: var(--lp-gradient); color: #fff; box-shadow: 0 8px 24px rgba(79, 70, 229, .28); }
.lp-btn-gradient:hover { background: var(--lp-gradient); color: #fff; filter: brightness(1.06); }
.lp-btn-light { background: #fff; border-color: #fff; color: #1e1b4b; }
.lp-btn-light:hover { background: #eef2ff; color: #1e1b4b; }

.lp-gradient-text { background: var(--lp-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.lp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* Bara de sus */
.lp-header { position: sticky; top: 0; z-index: 40; background: var(--topbar-bg); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.lp-nav { display: flex; align-items: center; gap: 24px; height: 76px; }
.lp-nav .logo { padding: 0; }
.lp-links { display: flex; gap: 28px; margin: 0 auto; }
.lp-links a { color: var(--text-2); font-weight: 500; }
.lp-links a:hover { color: var(--text); text-decoration: none; }
.lp-actions { display: flex; align-items: center; gap: 10px; }
.lp-actions .lang-switch, .lp-actions .theme-switch { flex: none; }
.lp-menu { display: none; }

/* Prezentare */
.lp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 48px; padding-top: 56px; padding-bottom: 56px; }
.lp-hero h1 { margin: 18px 0 20px; font-size: clamp(36px, 5vw, 58px); font-weight: 800; line-height: 1.05; letter-spacing: -.035em; }
.lp-lead { max-width: 520px; margin: 0 0 28px; color: var(--text-2); font-size: 17px; line-height: 1.6; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-cta .btn-lg { height: 52px; padding: 0 26px; border-radius: 14px; font-size: 16px; }
.lp-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.lp-checks li { display: flex; align-items: center; gap: 6px; }
.lp-checks .icon { padding: 2px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.lp-networks { display: flex; gap: 10px; margin-top: 28px; }

/* Ilustratia: panoul aplicatiei, in perspectiva */
.lp-hero-art { perspective: 1600px; }
.lp-screen {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 30px 80px rgba(79, 70, 229, .18), 0 8px 24px rgba(15, 23, 42, .08);
    transform: rotateY(-12deg) rotateX(6deg) rotateZ(1deg);
    font-size: 11px;
}
.lp-screen-side { display: grid; align-content: start; gap: 4px; padding: 14px 10px; border-right: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); }
.lp-screen-side button { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.lp-screen-side button:hover { background: var(--surface); }
.lp-screen-side button.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.lp-screen-logo { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 12px; }
.lp-screen-main { display: grid; padding: 16px; }
.lp-slide { display: grid; align-content: start; gap: 12px; grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateX(12px); transition: opacity .35s ease, transform .35s ease, visibility .35s; }
.lp-slide.is-active { opacity: 1; visibility: visible; transform: none; }
.lp-screen-title { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 800; }
.lp-screen-title small { color: var(--muted); font-size: 10px; font-weight: 500; }
.lp-screen-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lp-screen-kpis > div { display: grid; gap: 2px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.lp-screen-kpis .tile { width: 22px; height: 22px; border-radius: 7px; }
.lp-screen-kpis strong { font-size: 16px; }
.lp-screen-kpis small, .lp-screen-posts small { color: var(--muted); font-size: 10px; }
.lp-screen-chart { height: 70px; padding: 6px 0; border: 1px solid var(--border); border-radius: 12px; }
.lp-screen-chart svg { display: block; width: 100%; height: 100%; }
.lp-chart-area { fill: var(--chart); fill-opacity: .12; }
.lp-chart-line { fill: none; stroke: var(--chart); stroke-width: 2; vector-effect: non-scaling-stroke; }
.lp-screen-posts { display: grid; gap: 6px; }
.lp-screen-posts > div { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; }
.lp-screen-posts strong { display: block; font-size: 11px; }
.lp-screen-posts small { display: inline-flex; align-items: center; gap: 4px; }
.lp-screen-posts .badge { font-size: 9px; }
.lp-thumb { width: 30px; height: 30px; border-radius: 8px; }
.lp-thumb-1 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.lp-thumb-2 { background: linear-gradient(135deg, #22c55e, #0ea5e9); }
.lp-thumb-3 { background: linear-gradient(135deg, #7c3aed, #ec4899); }

.lp-screen-kpis em { font-size: 10px; font-style: normal; font-weight: 700; }
.lp-screen-kpis em.is-up { color: var(--success-text); }

.lp-cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.lp-cal-day { display: grid; align-content: start; gap: 4px; min-height: 150px; padding: 8px 6px; border: 1px solid var(--border); border-radius: 10px; }
.lp-cal-day.is-today { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.lp-cal-name { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.lp-cal-num { font-size: 14px; font-weight: 800; }
.lp-cal-post { display: flex; align-items: center; gap: 4px; padding: 4px 5px; border-left: 3px solid var(--brand); border-radius: 5px; background: var(--brand-soft); font-size: 9px; font-weight: 600; }
.lp-cal-post.is-published { border-left-color: var(--success); background: var(--success-soft); }

.lp-compose { display: grid; grid-template-rows: auto minmax(86px, 1fr) auto auto; gap: 10px; }
.lp-compose-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-compose-pages span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 10px; }
.lp-compose-pages span.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.lp-compose-text { min-height: 86px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-2); font-size: 11px; line-height: 1.5; }
.lp-compose-tags { display: block; margin-top: 4px; color: var(--brand); }
.lp-compose-media { display: flex; align-items: center; gap: 8px; }
.lp-compose-media .lp-thumb { width: 44px; height: 44px; }
.lp-compose-ai { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 4px 8px; border-radius: 999px; background: var(--purple-soft); color: var(--purple); font-size: 10px; font-weight: 600; }
.lp-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 10px; }
.lp-compose-foot > span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.lp-compose-btn { padding: 6px 12px; border-radius: 8px; background: var(--lp-gradient); color: #fff; font-weight: 700; }

.lp-bars { display: flex; align-items: flex-end; gap: 6px; height: 80px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; }
.lp-bars span { flex: 1; border-radius: 4px 4px 0 0; background: var(--chart); opacity: .85; }

.lp-pages { display: grid; gap: 6px; }
.lp-pages > div { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; }
.lp-pages strong { display: block; font-size: 11px; }
.lp-pages small { color: var(--muted); font-size: 10px; }
.lp-page-avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--lp-gradient); color: #fff; font-weight: 800; text-transform: uppercase; }
.lp-page-avatar .brand-icon { position: absolute; right: -3px; bottom: -3px; border-radius: 4px; box-shadow: 0 0 0 2px var(--surface); }
.lp-pages .badge { font-size: 9px; }

.lp-dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.lp-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: var(--border-strong); cursor: pointer; transition: width .25s ease, background .25s ease; }
.lp-dots button:hover { background: var(--muted-2); }
.lp-dots button.is-active { width: 26px; background: var(--lp-gradient); }

@media (prefers-reduced-motion: reduce) {
    .lp-slide, .lp-dots button { transition: none; }
}

/* Sectiuni */
.lp-section { padding-top: 72px; padding-bottom: 8px; scroll-margin-top: 80px; }
.lp-section-head { display: grid; justify-items: center; gap: 12px; max-width: 640px; margin: 0 auto 36px; text-align: center; }
.lp-section-head h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.03em; }
.lp-section-head p { margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.lp-section-head .segmented { margin-top: 8px; }
.lp-section-head .segmented .badge { margin-left: 4px; }

.lp-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lp-feature { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.lp-feature h3 { margin: 18px 0 8px; font-size: 18px; font-weight: 700; }
.lp-feature p { margin: 0; color: var(--text-2); line-height: 1.6; }

.lp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.lp-steps li { position: relative; padding: 24px; border-radius: var(--radius-lg); background: var(--surface-2); }
.lp-step-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--lp-gradient); color: #fff; font-weight: 800; }
.lp-steps h3 { margin: 14px 0 6px; font-size: 17px; }
.lp-steps p { margin: 0; color: var(--text-2); line-height: 1.6; }

/* Preturi */
.lp-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: stretch; }
.lp-plan { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 28px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.lp-plan.is-popular { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--lp-gradient) border-box; box-shadow: 0 20px 50px rgba(79, 70, 229, .18); }
.lp-popular { position: absolute; top: -13px; left: 50%; display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; background: var(--lp-gradient); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; transform: translateX(-50%); }
.lp-plan-name { font-size: 20px; font-weight: 800; }
.lp-plan-price strong { font-size: 40px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.lp-plan-price small { color: var(--muted); font-size: 15px; }
.lp-plan .plan-list { font-size: 14px; }
.lp-plan .btn { justify-content: center; width: 100%; margin-top: auto; height: 46px; }
.lp-note { max-width: 720px; margin: 18px auto 0; color: var(--muted); font-size: 13px; text-align: center; }

.lp-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.lp-quote { margin: 0; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.lp-quote blockquote { margin: 0 0 14px; color: var(--text-2); line-height: 1.6; }
.lp-quote figcaption span { display: block; color: var(--muted); font-size: 13px; }

.lp-faq { display: grid; gap: 10px; max-width: 760px; margin: 0 auto; }
.lp-faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.lp-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-weight: 600; cursor: pointer; list-style: none; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary .icon { color: var(--muted); transition: transform .15s; }
.lp-faq details[open] summary .icon { transform: rotate(180deg); }
.lp-faq p { margin: 0; padding: 0 18px 16px; color: var(--text-2); line-height: 1.6; }

.lp-final {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 72px;
    padding: 40px 44px;
    border-radius: 24px;
    background: var(--lp-gradient);
    color: #fff;
}
.lp-final h2 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; }
.lp-final p { margin: 0; opacity: .9; }

/* Subsol */
.lp-footer { margin-top: 64px; border-top: 1px solid var(--border); }
.lp-footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-top: 28px; padding-bottom: 28px; color: var(--muted); font-size: 13px; }
.lp-footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lp-footer-brand .logo { padding: 0; font-size: 16px; }
.lp-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 auto; }
.lp-footer-links a { color: var(--muted); }
.lp-social { display: flex; gap: 10px; }
.lp-copy { width: 100%; text-align: center; }

@media (max-width: 1000px) {
    .lp-hero { grid-template-columns: 1fr; padding-top: 32px; }
    .lp-screen { transform: none; }
    .lp-features, .lp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    .lp-nav { gap: 10px; height: 64px; }
    .lp-menu { display: inline-flex; }
    .lp-links {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 8px 16px 16px;
        border-bottom: 1px solid var(--border);
        background: var(--surface);
        box-shadow: var(--shadow-lg);
    }
    .lp-links.is-open { display: flex; }
    .lp-links a { padding: 12px 4px; border-bottom: 1px solid var(--border); }
    .lp-actions { margin-left: auto; }
}

@media (max-width: 760px) {
    .lp-wrap { padding: 0 16px; }
    .lp-hide-sm, .lp-actions .lang-switch, .lp-actions .theme-switch { display: none; }
    .lp-actions .btn { height: 40px; padding: 0 14px; font-size: 14px; }
    .lp-features, .lp-steps { grid-template-columns: 1fr; }
    .lp-screen { grid-template-columns: 1fr; }
    .lp-screen-side { display: none; }
    .lp-final { padding: 28px 22px; }
    .lp-final .btn { width: 100%; justify-content: center; }
}
.lp-slide-fill { grid-template-rows: auto minmax(0, 1fr); }

/* Pools */
.pool-add { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.pool-add input[type="file"], .pool-add select { flex: 1; min-width: 200px; }
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 0 20px 20px; }
.pool-item { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pool-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); }
.pool-item.is-waiting img { opacity: .5; }
.pool-item .video-badge { top: 6px; bottom: auto; }
.pool-item-meta { display: grid; gap: 2px; padding: 8px; font-size: 12px; color: var(--text-2); }
.pool-item-meta small { color: var(--muted); }
.pool-item-remove { position: absolute; top: 6px; right: 6px; margin: 0; }
.pool-item-remove .icon-btn { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); }
.pool-upload { margin: 0 0 12px; }
.upload-progress { display: grid; gap: 6px; margin: 0 0 12px; }
.upload-result { display: grid; gap: 8px; margin: 12px 0; padding: 14px 16px; border: 1px solid var(--danger-border, var(--border-strong)); border-radius: 10px; background: var(--danger-soft, var(--surface-2, var(--surface))); }
.upload-result ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.upload-result .form-actions { margin: 0; }

/* Actiuni pe mai multe postari */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--brand-soft); }
.bulk-bar strong { color: var(--brand); font-size: 13px; }
.bulk-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bulk-bar [data-bulk-clear] { margin-left: auto; }
.bulk-bar.is-busy { opacity: .6; pointer-events: none; }
table.data .check-col { width: 44px; padding-right: 0; }
table.data .check-col input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); cursor: pointer; }
table.data tbody tr.is-selected { background: var(--brand-soft); }

/* Echipa */
.team-link { display: flex; gap: 8px; margin: 8px 0 6px; }
.team-link input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.team-member { align-items: flex-start; }
.team-edit { margin-top: 8px; }
.team-edit summary { cursor: pointer; color: var(--brand); font-size: 13px; font-weight: 600; }
.team-edit form { margin-top: 10px; }
.card-subtitle { margin: 20px 0 8px; font-size: 14px; font-weight: 700; }

/* Statistici: titlul fiecarui grup de cifre (paginile, postarile din FeedPlanner). */
.stats-head { margin: 4px 0 12px; }
.stats-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 800; }
.stats-head h2 .icon { color: var(--brand); }
.stats-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* Statistici: in carduri, iconita deasupra cifrei, iar cifra se potriveste latimii
   cardului (cifrele de 7-8 cifre incap la orice latime: desktop, tableta, telefon
   tinut orizontal). Pe telefon, doua carduri pe rand. */
.stats-5 .stat-kpi,
.stats-more .stat-kpi { flex-direction: column; align-items: flex-start; gap: 12px; }
.stats-5 .stat-kpi > div,
.stats-more .stat-kpi > div { container-type: inline-size; min-width: 0; width: 100%; }
.stats-5 .stat-value { font-size: clamp(18px, 15cqi, 28px); overflow-wrap: anywhere; }
.stats-more .stat-value { font-size: clamp(16px, 12cqi, 22px); overflow-wrap: anywhere; }
@media (max-width: 560px) {
    .stats-5,
    .stats-more { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stats-5 .stat-kpi,
    .stats-more .stat-kpi { gap: 10px; padding: 14px; }
    .stats-5 .stat-kpi .tile,
    .stats-more .stat-kpi .tile { width: 36px; height: 36px; border-radius: 10px; }
    .stats-5 .kpi-delta span { display: none; }
    /* Ultimul card, cand ramane singur pe rand, ia tot randul. */
    .stats-5 > .stat-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---- Duplicatele dintr-un pool ---------------------------------------------- */
.dup-group { border-top: 1px solid var(--border); padding-top: 14px; }
.dup-group > .badge { margin: 0 20px 10px; }

/* ---- Sortarea fisierelor dintr-un pool ---------------------------------------- */
.pool-item-pick { display: none; }
.is-sorting .pool-item-pick { display: block; position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.is-sorting .pool-item-pick input { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; accent-color: var(--brand); }
.is-sorting .pool-item-remove { display: none; }
.pool-item.is-picked { outline: 3px solid var(--brand); outline-offset: -3px; }
.pool-item.is-picked img { opacity: .75; }
/* Fixa jos pe ecran, langa meniul lateral (pe telefon, pe toata latimea). */
.pool-sortbar {
    position: fixed; bottom: 0; right: 0; left: var(--sidebar-w); z-index: 40;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -6px 16px rgba(0, 0, 0, .12);
}
.pool-sortbar[hidden] { display: none; }
.pool-sortbar select { flex: 1 1 160px; min-width: 0; }
.is-sorting { padding-bottom: 72px; }
@media (max-width: 900px) {
    .pool-sortbar { left: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
    .is-sorting { padding-bottom: 120px; }
}

/* ---- Comentarii ------------------------------------------------------------------ */
.comment-list { display: grid; gap: 12px; }
.comment-card { display: grid; gap: 10px; }
.comment-card.is-answered { opacity: .8; }
.comment-head { display: flex; align-items: center; gap: 10px; }
.comment-head .grow { min-width: 0; }
.comment-actions { display: flex; gap: 2px; flex: none; }
.comment-pick { width: 20px; height: 20px; flex: none; accent-color: var(--brand); }
.comment-card.is-picked { outline: 2px solid var(--brand); outline-offset: -2px; }
/* Cand sunt bifate suspecte, lista ramane doar cu ele. */
.comment-list.only-suspect .comment-card:not(.is-suspect) { display: none; }
.comments-bulk[data-bulk-moderate] { position: sticky; top: 0; z-index: 5; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.comment-card.is-removed { opacity: .45; }
.comment-removed { color: var(--muted); font-size: 13px; }
.comment-head strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-text { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.comment-post {
    display: flex; align-items: center; gap: 10px; padding: 8px; min-width: 0;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
    color: var(--muted); font-size: 13px; text-decoration: none;
}
.comment-post img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; flex: none; }
.comment-post span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-reply { display: flex; gap: 8px; align-items: flex-end; }
.comment-sent { display: flex; align-items: center; gap: 6px; color: var(--success-text); font-weight: 600; }
.comment-error { color: var(--danger); font-size: 13px; }
.comments-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.comment-reply textarea { flex: 1; min-width: 0; resize: vertical; min-height: 40px; }
@media (max-width: 560px) {
    .comment-reply { flex-wrap: wrap; }
    .comment-reply textarea { flex-basis: 100%; }
}
