/* Social Scheduler — sistem vizual: sidebar alb, fundal gri deschis, carduri albe, albastru pentru actiuni. */
:root {
  --bg: #f5f6fa; --card: #ffffff; --text: #141a3a; --muted: #6b7280; --faint: #9ca3af; --line: #e5e8ef;
  --line-strong: #d6dbe5; --hover: #f3f5f9;
  --brand: #6d3df2; --brand-600: #5b2ee0; --brand-50: #f1edfe; --brand-ink: #ffffff;  /* violet */
  --ok: #0a8f5a; --ok-bg: #e6f6ee; --err: #d12d2d; --err-bg: #fdeeee; --warn: #b45309; --warn-bg: #fff6e5;
  --warn-line: #f5d08a; --info-bg: #eef3ff; --purple: #6d28d9; --purple-bg: #f1ebff;
  --yt: #ff0033; --fb: #1877f2; --tt: #111111;
  --r: 12px; --r-sm: 8px; --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --sidebar: 248px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1218; --card: #161b23; --text: #e8ecf3; --muted: #9aa4b5; --faint: #6b7586; --line: #262d39;
    --line-strong: #323a48; --hover: #1d2430; --brand: #a58bff; --brand-600: #9174ff; --brand-50: #261f45;
    --ok: #3ccf8e; --ok-bg: #12301f; --err: #ff6b6b; --err-bg: #3a1a1a; --warn: #f5b942; --warn-bg: #332810;
    --warn-line: #6b5420; --info-bg: #162441; --purple: #b79cff; --purple-bg: #2a2142; --tt: #e8ecf3;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 14.5px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0; }
h3 { font-size: 15px; margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hidden { display: none !important; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex: none; background: var(--card); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--text);
  padding: 2px 8px 18px; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; }
.brand .logo svg { width: 16px; height: 16px; fill: #fff; stroke: none; }
.proj-label { font-size: 12px; color: var(--muted); margin: 0 8px 6px; }
.proj-select { position: relative; margin: 0 0 16px; }
.proj-select select { width: 100%; appearance: none; -webkit-appearance: none; padding: 10px 36px 10px 34px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; }
.proj-select .dot { position: absolute; left: 13px; top: 50%; width: 11px; height: 11px; border-radius: 50%;
  transform: translateY(-50%); pointer-events: none; }
.proj-select .chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none;
  color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; color: var(--text);
  font-weight: 500; }
.nav a:hover { background: var(--hover); text-decoration: none; }
.nav a.on { background: var(--brand-50); color: var(--brand); }
.nav hr { border: 0; border-top: 1px solid var(--line); margin: 12px 4px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 6px 0; display: flex; align-items: center;
  gap: 10px; }
.avatar-ini { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid;
  place-items: center; font-weight: 700; flex: none; }
.main { flex: 1; min-width: 0; }
.content { max-width: 1720px; margin: 0 auto; padding: 24px 28px 60px; }
.topbar { display: none; }
.scrim { display: none; }

.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .titles { flex: 1; min-width: 220px; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 15px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- componente ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card.pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px 0; }
.card-head h2 { flex: 1; }
.card-body { padding: 14px 20px 18px; }
.grid { display: grid; gap: 16px; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong);
  background: var(--card); color: var(--text); padding: 9px 15px; border-radius: 10px; font: inherit; font-weight: 600;
  cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-600); }
.btn.outline { border-color: var(--brand); color: var(--brand); background: var(--card); }
.btn.outline:hover { background: var(--brand-50); }
.btn.warn { border-color: var(--warn); color: var(--warn); background: transparent; }
.btn.danger { color: var(--err); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 7px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }

label.lbl { display: block; font-weight: 600; font-size: 13.5px; margin: 14px 0 6px; }
.field { width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--card);
  color: var(--text); font: inherit; }
.field:focus, .btn:focus-visible, .proj-select select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
textarea.field { min-height: 96px; resize: vertical; }
select.field { appearance: auto; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .field { padding-left: 36px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.counter { float: right; color: var(--faint); font-weight: 400; font-size: 12px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--brand); }

.flash { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; margin-bottom: 14px;
  background: var(--ok-bg); color: var(--ok); font-weight: 500; }
.flash.err { background: var(--err-bg); color: var(--err); }
.note { padding: 12px 14px; border-radius: 10px; background: var(--info-bg); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.alert { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r);
  background: var(--warn-bg); border: 1px solid var(--warn-line); margin-bottom: 16px; }
.alert .t { flex: 1; min-width: 0; }
.alert b { color: var(--warn); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px;
  font-weight: 600; background: var(--hover); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.ready { background: var(--hover); color: #4b5563; }
.badge.scheduled { background: var(--warn-bg); color: var(--warn); }
.badge.processing { background: var(--info-bg); color: var(--brand); }
.badge.published, .badge.done, .badge.active { background: var(--ok-bg); color: var(--ok); }
.badge.partial { background: var(--purple-bg); color: var(--purple); }
.badge.failed { background: var(--err-bg); color: var(--err); }
.badge.cancelled { background: var(--hover); color: var(--faint); }

.plat-ic { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; flex: none; }
.plat-ic svg { width: 22px; height: 22px; }
.plat-ic.lg, .plat-ic.lg svg { width: 30px; height: 30px; }
.acc-chips { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.acc-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px;
  padding: 3px 8px 3px 4px; font-size: 12.5px; background: var(--card); max-width: 180px; }
.acc-chip .plat-ic, .acc-chip .plat-ic svg { width: 18px; height: 18px; }
.acc-chips.implicit { opacity: .6; }

.thumb { width: 64px; height: 40px; border-radius: 7px; object-fit: cover; background: var(--line); display: block; flex: none; }
.thumb.v { width: 40px; height: 56px; }
.thumb-wrap { position: relative; flex: none; }
.thumb-wrap .dur { position: absolute; right: 3px; bottom: 3px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 10.5px;
  padding: 0 4px; border-radius: 4px; }

/* tabel */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover { background: var(--hover); }
table.t tr.sel { background: var(--brand-50); }
.vcell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vcell .title { font-weight: 600; color: var(--text); }
.col-check { width: 36px; }

/* meniu */
details.menu { position: relative; display: inline-block; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu .menu-list { position: absolute; right: 0; top: calc(100% + 4px); min-width: 200px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(16, 24, 40, .12); padding: 6px; z-index: 20; }
details.menu .menu-list a, details.menu .menu-list button { display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; border-radius: 7px;
  cursor: pointer; }
details.menu .menu-list a:hover, details.menu .menu-list button:hover { background: var(--hover); text-decoration: none; }
details.menu .menu-list .danger { color: var(--err); }

/* statistici */
.stat { display: flex; gap: 14px; padding: 18px; }
.stat .ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50);
  color: var(--brand); flex: none; }
.stat .ic.gray { background: var(--hover); color: var(--muted); }
.stat .ic.warn { background: var(--warn-bg); color: var(--warn); }
.stat .lab { font-weight: 600; }
.stat .num { font-size: 28px; font-weight: 700; line-height: 1.15; margin: 2px 0; }
.stat .num.warn { color: var(--warn); }

/* saptamana compacta */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week .d { border-radius: 10px; background: var(--hover); text-align: center; padding: 10px 4px 12px; color: var(--text);
  display: block; }
.week .d:hover { text-decoration: none; outline: 1px solid var(--line-strong); }
.week .d .wd { font-size: 12.5px; color: var(--muted); }
.week .d .n { font-size: 20px; font-weight: 700; }
.week .d .m { font-size: 12px; color: var(--muted); }
.week .d .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin: 6px auto 0; }
.week .d .dot.none { background: transparent; border: 1px dashed var(--faint); box-sizing: border-box; }
.week .d.today { background: var(--brand); color: #fff; }
.week .d.today .wd, .week .d.today .m { color: #e6eeff; }
.week .d.today .dot { background: #fff; }

.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.acc-row:last-child { border-bottom: 0; }
.acc-row .name { flex: 1; min-width: 0; }
.bordered { border: 1px solid var(--line); border-radius: 10px; }
.thumb-strip { display: flex; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.thumb-strip img, .thumb-strip .more { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--line); }
.thumb-strip .more { display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.activity { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0; }
.activity .ev { display: flex; gap: 12px; padding: 12px 14px; border-left: 1px solid var(--line); }
.activity .ev .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--brand-50); color: var(--brand); }
.activity .ev .ic.ok { background: var(--ok-bg); color: var(--ok); }
.activity .ev .ic.err { background: var(--err-bg); color: var(--err); }
.activity .ev .ic.warn { background: var(--warn-bg); color: var(--warn); }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; }
.empty .big { width: 44px; height: 44px; border-radius: 50%; background: var(--hover); display: grid; place-items: center;
  margin: 0 auto 10px; color: var(--muted); }

/* biblioteca */
.proj-banner { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--brand-50);
  border: 1px solid var(--line); border-radius: var(--r); flex-wrap: wrap; margin-bottom: 16px; }
.proj-banner .mark { width: 52px; height: 52px; border-radius: 12px; color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 22px; flex: none; }
.proj-banner .acc-card { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 14px 8px 10px; min-width: 150px; }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 22px; display: flex; gap: 18px;
  align-items: center; flex-wrap: wrap; background: var(--card); }
.dropzone.over { border-color: var(--brand); background: var(--brand-50); }
.dropzone .dz-main { flex: 1; min-width: 240px; display: flex; gap: 14px; align-items: center; justify-content: center;
  cursor: pointer; }
.dropzone .dz-progress { width: 360px; max-width: 100%; border-left: 1px solid var(--line); padding-left: 18px; }
.bar { height: 7px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.bar.ok > div { background: var(--ok); }
.bar.err > div { background: var(--err); }
.upl-list { max-height: 260px; overflow: auto; margin-top: 10px; }
.upl-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 8px 0;
  border-bottom: 1px solid var(--line); font-size: 13px; }
.upl-item .bar { grid-column: 1 / -1; height: 5px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .search { flex: 1; min-width: 200px; max-width: 360px; }
.selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--brand-50);
  border-bottom: 1px solid var(--line); }
.pager { display: flex; gap: 6px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager a, .pager span.cur { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--line); color: var(--text); padding: 0 8px; }
.pager span.cur { background: var(--brand); color: #fff; border-color: var(--brand); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.seg a, .seg button { padding: 8px 14px; color: var(--text); border: 0; background: var(--card); font: inherit; cursor: pointer; }
.seg a + a, .seg button + button { border-left: 1px solid var(--line-strong); }
.seg .on { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 9px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a.on { color: var(--brand); border-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs .cnt { background: var(--hover); border-radius: 99px; padding: 0 7px; font-size: 12px; margin-left: 4px; }

/* panou lateral */
.drawer { position: fixed; inset: 0; z-index: 60; display: none; }
.drawer.open { display: block; }
.drawer .shade { position: absolute; inset: 0; background: rgba(15, 20, 30, .35); }
.drawer .panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(920px, 100%); background: var(--card);
  display: flex; flex-direction: column; box-shadow: -20px 0 40px rgba(16, 24, 40, .15); }
.drawer .p-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer .p-body { flex: 1; overflow: auto; padding: 18px 22px; }
.drawer .p-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center;
  flex-wrap: wrap; }
.mode-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; margin-bottom: 8px; }
.mode-opt.on { border-color: var(--brand); background: var(--brand-50); }
.order-list { border: 1px solid var(--line); border-radius: 10px; }
.order-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line);
  background: var(--card); }
.order-item:last-child { border-bottom: 0; }
.order-item.drag { opacity: .4; }
.order-item .grip { cursor: grab; color: var(--faint); }
.order-item .idx { width: 22px; text-align: center; color: var(--muted); font-size: 12px; }
.wd-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.wd-pick label { border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 9px; cursor: pointer; font-size: 13px; }
.wd-pick input { display: none; }
.wd-pick label.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.summary { display: flex; gap: 12px; padding: 12px 14px; background: var(--hover); border-radius: 10px; align-items: center; }
.warn-text { color: var(--warn); font-size: 12.5px; }
.err-text { color: var(--err); font-size: 13px; white-space: pre-wrap; word-break: break-word; }

/* postare noua */
.pick-acc { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pick-acc label { position: relative; display: flex; gap: 12px; align-items: center; border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 14px; cursor: pointer; }
.pick-acc label.on { border-color: var(--brand); background: var(--brand-50); }
.pick-acc input { position: absolute; right: 12px; top: 12px; }
.preview-tabs { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.preview-tabs button { flex: 1; display: flex; gap: 8px; justify-content: center; align-items: center; padding: 10px;
  border: 0; background: var(--card); font: inherit; cursor: pointer; color: var(--text); }
.preview-tabs button + button { border-left: 1px solid var(--line); }
.preview-tabs button.on { background: var(--brand-50); outline: 1.5px solid var(--brand); outline-offset: -1.5px; }
.phone { position: relative; margin: 0 auto; width: 270px; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden;
  background: #000; }
.phone.wide { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; }
.phone video { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone .ov { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 14px; color: #fff; font-size: 13px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75)); pointer-events: none; }
.phone .ov .acc { font-weight: 700; margin-bottom: 4px; }
.phone .empty-ph { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa4b5; font-size: 13px; padding: 20px;
  text-align: center; }
.text-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-bottom: 6px; }
.text-tabs button { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 10px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--card); font: inherit; cursor: pointer; color: var(--text); }
.text-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.when-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.when-tabs button { padding: 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card);
  font: inherit; cursor: pointer; color: var(--text); }
.when-tabs button.on { background: var(--brand-50); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.video-box { display: flex; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  flex-wrap: wrap; }
.video-box .poster { width: 200px; max-width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; object-fit: cover;
  background: var(--line); }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line);
  border-top: 1px solid var(--line); }
.cal .hd { padding: 8px 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line); background: var(--card); }
.cal .cell { min-height: 120px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--card); display: flex; flex-direction: column; gap: 5px; }
.cal.week-view .cell { min-height: 420px; }
.cal .cell.out { background: var(--bg); }
.cal .cell.past { background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
.cal .cell.drop { outline: 2px dashed var(--brand); outline-offset: -3px; background: var(--brand-50); }
.cal .dn { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; }
.cal .dn .today { background: var(--brand); color: #fff; border-radius: 99px; padding: 0 7px; font-weight: 700; }
.ev-card { display: flex; gap: 7px; align-items: flex-start; padding: 6px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 12.5px; }
.ev-card:hover { text-decoration: none; border-color: var(--line-strong); }
.ev-card[draggable=true] { cursor: grab; }
.ev-card.st-scheduled { border-left: 3px solid var(--warn); }
.ev-card.st-processing { border-left: 3px solid var(--brand); }
.ev-card.st-published { border-left: 3px solid var(--ok); }
.ev-card.st-partial { border-left: 3px solid var(--purple); }
.ev-card.st-failed { border-left: 3px solid var(--err); }
.ev-card img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; flex: none; background: var(--line); }
.ev-card .tt { font-weight: 600; line-height: 1.25; }
.ev-card .plat-ic, .ev-card .plat-ic svg { width: 15px; height: 15px; }

/* publicari */
.pub-row { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pub-row:last-child { border-bottom: 0; }
.pub-dest { display: grid; grid-template-columns: minmax(170px, 1.2fr) 120px minmax(140px, 1fr) minmax(0, 2fr) auto;
  gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; }
.pub-dest:nth-child(odd) { background: var(--hover); }

/* proiecte */
.proj-card { border-top: 4px solid var(--brand); }

pre.log { white-space: pre-wrap; font-size: 12px; background: var(--hover); padding: 10px; border-radius: 8px; max-height: 260px;
  overflow: auto; }
code { background: var(--hover); padding: 2px 6px; border-radius: 6px; font-size: 13px; word-break: break-all; }
.secret { -webkit-text-security: disc; }
details > summary { cursor: pointer; }
.center-box { max-width: 400px; margin: 8vh auto; padding: 0 16px; }
.legal { max-width: 760px; margin: 0 auto; padding: 30px 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: none; }
  body.nav-open .sidebar { transform: none; box-shadow: 20px 0 40px rgba(16, 24, 40, .2); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 20, 30, .35); z-index: 25; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .topbar .brand { padding: 0; font-size: 17px; }
  .topbar .proj { margin-left: auto; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
  .content { padding: 18px 16px 50px; }
  h1 { font-size: 22px; }
  .dropzone .dz-progress { border-left: 0; padding-left: 0; width: 100%; }
  .pub-dest { grid-template-columns: 1fr auto; }
  .pub-dest > :nth-child(3), .pub-dest > :nth-child(4) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat .ic { display: none; }
  .stat .num { font-size: 24px; }
  .stat .lab { font-size: 13px; }
  .stat { padding: 14px; }
  .week { gap: 4px; }
  .week .d { padding: 8px 2px; }
  .week .d .n { font-size: 16px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  /* tabelul devine lista de carduri */
  table.t.responsive thead { display: none; }
  table.t.responsive tr { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 10px;
    padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.t.responsive td { padding: 0; border: 0; }
  table.t.responsive td.c-video { grid-column: 2 / 3; }
  table.t.responsive td.c-menu { grid-column: 3; grid-row: 1; }
  table.t.responsive td.c-acc, table.t.responsive td.c-state, table.t.responsive td.c-when, table.t.responsive td.c-now,
  table.t.responsive td.c-meta { grid-column: 2 / -1; }
  table.t.responsive td.c-meta:empty, table.t.responsive td.c-when:empty, table.t.responsive td.c-now:empty { display: none; }
  .cal .cell { min-height: 74px; padding: 4px; }
  .cal.week-view { grid-template-columns: minmax(0, 1fr); }
  .cal.week-view .hd { display: none; }
  .cal.week-view .cell { min-height: 0; }
  .ev-card img { display: none; }
  .cal.month-view .ev-card .tt, .cal.month-view .ev-card .meta { display: none; }
  .cal.month-view .ev-card { padding: 3px; justify-content: center; }
  .drawer .panel { width: 100%; }
  .text-tabs { grid-auto-flow: row; }
}

/* activitate recenta: titluri lungi fara spatii (nume de fisier) nu mai ies din card */
.activity .ev > div { min-width: 0; }
.activity .ev a { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere; }
.title, .tt { overflow-wrap: anywhere; }

/* ---------- statistici ---------- */
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; padding: 4px 18px 16px; margin-bottom: 16px; }
.stats-filters > div { min-width: 200px; }
.stat-card { display: block; padding: 16px 18px; color: var(--text); border-top: 3px solid var(--line); }
.stat-card:hover { text-decoration: none; border-color: var(--line-strong); }
.stat-card.on { outline: 2px solid var(--brand); }
.stat-card .lab { font-weight: 600; margin-top: 12px; color: var(--muted); font-size: 13px; }
.stat-card .num { font-size: 30px; font-weight: 700; line-height: 1.2; }
.stat-card.st-ok { border-top-color: var(--ok); }
.stat-card.st-partial, .stat-card.st-pending { border-top-color: var(--warn-line); }
.stat-card.st-error { border-top-color: var(--err); }
.stat-card .st-msg { margin-top: 8px; padding: 7px 9px; border-radius: 8px; background: var(--hover); color: var(--muted); }
.stat-card.st-error .st-msg { background: var(--err-bg); color: var(--err); }
.stat-card.st-partial .st-msg { background: var(--warn-bg); color: var(--warn); }
.stat-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.stat-item:last-child { border-bottom: 0; }
.stat-item .rank { width: 20px; text-align: center; font-weight: 700; color: var(--faint); font-size: 13px; flex: none; }
.stat-item .si-main { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; background: none; border: 0;
  padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.stat-item .si-main:hover .title { color: var(--brand); }
.stat-item .si-text { display: flex; flex-direction: column; min-width: 0; }
.stat-item .si-text .title { font-weight: 600; display: block; }
.stat-item .thumb.v { width: 34px; height: 48px; }
.stat-item .si-nums { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; }
.grow { font-weight: 600; color: var(--muted); }
.grow.up { color: var(--ok); }
.grow.down { color: var(--warn); }
.drawer .panel.narrow { width: min(560px, 100%); }
.sd-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.sd-metrics > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.sd-metrics .v { font-size: 22px; font-weight: 700; }
.sd-chart { width: 100%; height: 180px; display: block; }
.sd-chart .ln { fill: none; stroke: var(--brand); stroke-width: 2; }
.sd-chart .ar { fill: var(--brand-50); }
.sd-chart text { fill: var(--muted); font-size: 10px; }
.sd-chart .gr { stroke: var(--line); }

/* avatarul proiectului (poza canalului YouTube) */
.proj-av { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; display: inline-block;
  vertical-align: middle; background: var(--line); }
.proj-select .proj-av { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.proj-select.has-av select { padding-left: 40px; }

@media (max-width: 1180px) {
  .cols-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .stats-filters > div { min-width: 0; flex: 1 1 100%; }
  .stat-card .num { font-size: 24px; }
  .stat-item .rank { display: none; }
}
.flash.warn { background: var(--warn-bg); color: var(--warn); }

/* comentarii YouTube */
.cm { padding: 14px 0; border-bottom: 1px solid var(--line); }
.cm:last-child { border-bottom: 0; }
.cm-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cm-text { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-reply { margin-top: 6px; padding: 9px 12px; border-left: 3px solid var(--brand); background: var(--brand-50);
  border-radius: 0 8px 8px 0; overflow-wrap: anywhere; }
.cm-form { margin-top: 8px; max-width: 720px; }

/* logo */
.brand-img img { display: block; height: 36px; width: auto; }
.topbar .brand-img img { height: 28px; }
@media (prefers-color-scheme: dark) {
  .brand-img img { background: #fff; border-radius: 8px; padding: 3px 6px; box-sizing: content-box; }
}


/* ---------- Prezentare generala  ---------- */
.nav a { position: relative; }
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--brand);
  color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { display: flex; gap: 16px; padding: 20px; color: var(--text); align-items: flex-start; }
.kpi:hover { text-decoration: none; border-color: var(--line-strong); }
.kpi > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.kpi .lab { font-weight: 600; }
.kpi .num { font-size: 30px; font-weight: 700; line-height: 1.15; margin: 2px 0; }
.kpi .num.err-num { color: var(--err); }
.kpi-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--brand-50); color: var(--brand); }
.kpi-ic.gray { background: var(--hover); color: var(--muted); }
.kpi-ic.err { background: var(--err-bg); color: var(--err); }
.dash { display: grid; grid-template-columns: minmax(0, 69fr) minmax(300px, 31fr); gap: 16px; align-items: start; }
.cal7 { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); gap: 10px; }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 14px 6px 12px;
  border-radius: 12px; border: 1px solid transparent; background: var(--hover); color: var(--text); font: inherit; cursor: pointer; }
.cal-day:hover { border-color: var(--line-strong); }
.cal-day:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cal-day .wd { font-size: 12.5px; color: var(--muted); }
.cal-day .n { font-size: 22px; font-weight: 700; line-height: 1.2; }
.cal-day .m { font-size: 12.5px; color: var(--muted); }
.cal-day .cnt { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cal-day.empty .cnt { color: var(--faint); font-style: italic; }
.cal-day .plats { display: flex; gap: 4px; margin-top: 6px; min-height: 18px; }
.cal-day .plats svg { width: 17px; height: 17px; }
.cal-day.is-today { background: var(--brand-50); border-color: var(--brand); }
.cal-day.is-today .n, .cal-day.is-today .wd { color: var(--brand); }
.cal-day[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); }
.cal-day[aria-pressed="true"] .wd, .cal-day[aria-pressed="true"] .n, .cal-day[aria-pressed="true"] .m,
.cal-day[aria-pressed="true"] .cnt { color: #fff; }
.today-badge { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff;
  font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; letter-spacing: .03em; }
.cal-day[aria-pressed="true"] .today-badge { background: #fff; color: var(--brand); }
.up-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 130px 110px 116px; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); }
.up-headrow { font-size: 12.5px; color: var(--muted); font-weight: 600; padding-top: 4px; }
.up-day { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--hover); padding: 6px 10px; border-radius: 8px;
  margin-top: 10px; }
.up-video { display: flex; gap: 12px; align-items: center; min-width: 0; color: var(--text); }
.up-video:hover { text-decoration: none; }
.up-video:hover .title { color: var(--brand); }
.up-video .title { font-weight: 600; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.up-thumb { position: relative; flex: none; }
.up-thumb img { width: 92px; height: 56px; border-radius: 9px; object-fit: cover; background: var(--line); display: block; }
.up-thumb .dur { position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 11px;
  padding: 0 5px; border-radius: 4px; }
.up-accs { display: flex; gap: 4px; flex-wrap: wrap; }
.up-actions { display: flex; gap: 2px; justify-content: flex-end; }
.badge.planned { background: var(--brand-50); color: var(--brand); }
.big-num { font-size: 34px; font-weight: 700; color: var(--brand); line-height: 1; }
.link-row { color: var(--text); gap: 10px; }
.link-row:hover { text-decoration: none; background: var(--hover); }
.link-row > span:not(.plat-ic) { font-weight: 700; }
.acc-row.compact { padding: 8px 2px; }
.cm-mini { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.cm-mini:hover { text-decoration: none; background: var(--hover); }
.cm-mini > span:nth-child(2) { display: flex; flex-direction: column; }
.ellipsis2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cm-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: var(--line); }
.avatar-ini.sm { width: 36px; height: 36px; font-size: 14px; flex: none; }
.btn.soft { background: var(--brand-50); color: var(--brand); border-color: transparent; font-weight: 600; }
.btn.soft:hover { background: var(--brand); color: #fff; }
.dot-ok { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 4px; }
dialog.preview { border: 0; border-radius: 14px; padding: 14px; width: min(420px, 94vw); background: var(--card); color: var(--text); }
dialog.preview::backdrop { background: rgba(15, 20, 30, .55); }
dialog.preview video { width: 100%; max-height: 72vh; border-radius: 10px; background: #000; }
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .cal7 { overflow-x: auto; grid-template-columns: repeat(7, 84px); padding: 10px 2px 4px; }
  .up-headrow { display: none; }
  .up-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "v v" "a s" "w x"; row-gap: 6px; }
  .up-row > :nth-child(1) { grid-area: v; }
  .up-row > :nth-child(2) { grid-area: a; }
  .up-row > :nth-child(3) { grid-area: w; }
  .up-row > :nth-child(4) { grid-area: s; justify-self: end; }
  .up-row > :nth-child(5) { grid-area: x; }
}
@media (max-width: 480px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
}
