/* Team Panel — flat, Asana-like. Neutral greys, one blue accent, colour only
   where it carries meaning (tags, money signs). No shadows, thin dividers. */

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f5f4;
  --surface-3: #ecebea;
  --text: #1e1f21;
  --muted: #6d6e6f;
  --line: #e8e7e6;
  --accent: #4573d2;
  --accent-ink: #ffffff;
  --accent-soft: #e9effb;
  --focus: #4573d2;
  --green: #2e7d4f;
  --red: #c92f3e;
  --orange: #b25d00;
  --violet: #6a52c9;
  --ok-bg: #e6f4ec; --ok-ink: #1d5e38;
  --err-bg: #fbe9eb; --err-ink: #8c1f2b;
  --info-bg: #e9effb; --info-ink: #284f9e;
  --sidebar-bg: #2e2e30;
  --sidebar-ink: #c9c7c5;
  --sidebar-on: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, .07);
  --sidebar-active: rgba(255, 255, 255, .12);
  --role-admin: #6a52c9; --role-head: #b25d00; --role-teamlead: #2e7d4f; --role-buyer: #4573d2;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a;
  --grid: #efeeed; --axis: #cfcdcb;
  --radius: 6px;
  --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1e1f21; --surface: #1e1f21; --surface-2: #2a2b2d; --surface-3: #353638;
    --text: #f5f4f3; --muted: #a2a0a2; --line: #3a3b3d;
    --accent: #4573d2; --accent-ink: #ffffff; --accent-soft: rgba(69, 115, 210, .22); --focus: #6d95ec;
    --green: #5dbb7e; --red: #f0737e; --orange: #f0a64a; --violet: #a796f2;
    --ok-bg: rgba(93, 187, 126, .15); --ok-ink: #9ad9ae; --err-bg: rgba(240, 115, 126, .15); --err-ink: #f6b0b7;
    --info-bg: rgba(69, 115, 210, .2); --info-ink: #b2c8f5;
    --sidebar-bg: #2b2c2e; --sidebar-ink: #c2c0be; --sidebar-on: #ffffff;
    --role-admin: #a796f2; --role-head: #f0a64a; --role-teamlead: #5dbb7e; --role-buyer: #84a6ee;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70;
    --grid: #2d2e30; --axis: #48494b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1e1f21; --surface: #1e1f21; --surface-2: #2a2b2d; --surface-3: #353638;
  --text: #f5f4f3; --muted: #a2a0a2; --line: #3a3b3d;
  --accent: #4573d2; --accent-ink: #ffffff; --accent-soft: rgba(69, 115, 210, .22); --focus: #6d95ec;
  --green: #5dbb7e; --red: #f0737e; --orange: #f0a64a; --violet: #a796f2;
  --ok-bg: rgba(93, 187, 126, .15); --ok-ink: #9ad9ae; --err-bg: rgba(240, 115, 126, .15); --err-ink: #f6b0b7;
  --info-bg: rgba(69, 115, 210, .2); --info-ink: #b2c8f5;
  --sidebar-bg: #2b2c2e; --sidebar-ink: #c2c0be; --sidebar-on: #ffffff;
  --role-admin: #a796f2; --role-head: #f0a64a; --role-teamlead: #5dbb7e; --role-buyer: #84a6ee;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70;
  --grid: #2d2e30; --axis: #48494b;
}

/* ── Base ───────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; }
h2 { font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num-pos { color: var(--green); }
.num-neg { color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button, a, select, summary, label[for], [data-open-task] { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ── Shell: sidebar ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 232px; z-index: 40;
  background: var(--sidebar-bg); color: var(--sidebar-ink);
  display: flex; flex-direction: column; padding: 12px 10px; overflow-y: auto;
}
.logo { display: flex; align-items: center; gap: 8px; padding: 6px 10px 14px; text-decoration: none !important; color: var(--sidebar-on); }
.logo__mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.logo__mark svg { width: 14px; height: 14px; }
.logo__name { font-size: 15px; font-weight: 600; }
.logo--dark { color: var(--text); justify-content: center; padding-bottom: 6px; }
.side-nav { display: flex; flex-direction: column; gap: 1px; }
.side-nav a, .side-head {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px;
  color: var(--sidebar-ink); font-size: 14px; text-decoration: none !important;
}
.side-nav a svg { width: 17px; height: 17px; flex: none; opacity: .9; }
.side-nav a:hover { background: var(--sidebar-hover); color: var(--sidebar-on); }
.side-nav a.on { background: var(--sidebar-active); color: var(--sidebar-on); }
.side-sep { height: 1px; background: rgba(255, 255, 255, .08); margin: 10px 4px; }
.side-head { justify-content: space-between; font-size: 12.5px; color: var(--sidebar-ink); opacity: .85; padding-top: 2px; padding-bottom: 2px; }
.side-head button { width: 22px; height: 22px; border: 0; border-radius: 5px; background: transparent; color: inherit; font-size: 16px; line-height: 1; }
.side-head button:hover { background: var(--sidebar-hover); color: var(--sidebar-on); }
.side-foot { margin-top: auto; padding-top: 10px; }
.sidebar-backdrop { display: none; }

/* ── Shell: topbar + content ────────────────────────────────────────── */
.shell { margin-left: 232px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 52px; display: flex; align-items: center; gap: 10px;
  padding: 0 20px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.create-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px 0 10px; border-radius: 15px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500; }
.create-btn:hover { background: var(--surface-2); }
.create-btn .plus { width: 18px; height: 18px; border-radius: 50%; background: #f06a6a; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1; }
.icon-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: inline-flex; color: var(--text); }
.sidebar { transition: transform .2s ease; }
.shell { transition: margin-left .2s ease; }
@media (min-width: 901px) {
  .nav-collapsed .sidebar { transform: translateX(-100%); }
  .nav-collapsed .shell { margin-left: 0; }
}
.theme-btn .when-dark { display: none; }
:root[data-theme="dark"] .theme-btn .when-dark { display: inline-flex; }
:root[data-theme="dark"] .theme-btn .when-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .when-dark { display: inline-flex; }
  :root:not([data-theme="light"]) .theme-btn .when-light { display: none; }
}
.usermenu, .createmenu { position: relative; }
.usermenu summary, .createmenu summary { list-style: none; display: flex; align-items: center; }
.usermenu summary::-webkit-details-marker, .createmenu summary::-webkit-details-marker { display: none; }
.usermenu__avatar { width: 30px; height: 30px; border-radius: 50%; background: #f1bd6c; color: #3a2a00; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.usermenu__pop, .createmenu__pop {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; padding: 6px; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.createmenu__pop { left: 0; right: auto; }
.usermenu__who { padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.usermenu__who b { font-weight: 600; }
.usermenu__pop a, .usermenu__pop button, .createmenu__pop button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 6px;
  color: var(--text); background: none; border: 0; font: inherit; font-size: 13.5px; text-decoration: none; text-align: left;
}
.usermenu__pop a:hover, .usermenu__pop button:hover, .createmenu__pop button:hover { background: var(--surface-2); }
.usermenu__pop svg, .createmenu__pop svg { width: 16px; height: 16px; color: var(--muted); }
.usermenu__pop form { margin: 0; }

.content { padding: 20px 28px 60px; width: 100%; }
.content > * + * { margin-top: 18px; }
.page-title { font-size: 20px; font-weight: 600; }
.auth { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 16px; }

/* ── Cards, KPIs ────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.card.flush { padding: 0; }
.card .pad, .pad { padding: 14px 18px; }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card.flush .card__head { margin: 0; border-bottom: 1px solid var(--line); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; font-weight: 600; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.kpis { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi span { font-size: 13.5px; font-weight: 500; }
.kpi b { font-size: 30px; font-weight: 500; letter-spacing: -.01em; line-height: 1.15; }
.kpi small { color: var(--muted); font-size: 12.5px; }
.sumbar { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.stat span { display: block; color: var(--muted); font-size: 12.5px; }
.stat b { display: block; font-size: 17px; font-weight: 600; margin-top: 2px; }

/* ── Chart ──────────────────────────────────────────────────────────── */
.chart-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.chart-title { font-size: 15px; font-weight: 600; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; max-width: 100%; height: auto; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i, .chart-tip__row i { display: inline-block; width: 14px; height: 2px; border-radius: 2px; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; min-width: 150px; padding: 8px 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .14); font-size: 12.5px; }
.chart-tip__day { color: var(--muted); margin-bottom: 4px; }
.chart-tip__row { display: flex; align-items: center; gap: 8px; }
.chart-tip__row b { font-variant-numeric: tabular-nums; }
.chart-tip__row span { color: var(--muted); }
.table-view { margin-top: 12px; }
.table-view summary { color: var(--muted); font-size: 13px; }
.table-view .table-wrap { margin-top: 10px; max-height: 340px; overflow: auto; }

/* ── Segmented control (Asana view switch), filters ────────────────── */
.seg { display: inline-flex; gap: 2px; flex-wrap: wrap; }
.seg a { padding: 5px 10px; border-radius: 6px; color: var(--muted); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.seg a:hover { background: var(--surface-2); color: var(--text); }
.seg a.is-active { background: var(--accent-soft); color: var(--accent); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters input[type=search] { width: auto; min-width: 220px; }
.filter { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.filter select, .filters > select { width: auto; min-width: 160px; }
.filters__note, .filters__push { margin-left: auto; }
.range { display: inline-flex; align-items: center; gap: 6px; }

/* ── Buttons & forms ────────────────────────────────────────────────── */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-size: 13.5px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background .15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--red); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.wide { width: 100%; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; }
form.inline { display: inline; margin: 0; }

.form .row { margin: 0 0 14px; }
.form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
input[type=text], input[type=password], input[type=search], input[type=number], input[type=file], input:not([type]), select, textarea {
  width: 100%; padding: 7px 10px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
select:disabled { opacity: .6; }
.help { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.errorlist { list-style: none; margin: 4px 0 0; padding: 0; color: var(--red); font-size: 13px; }
.form-narrow { max-width: 540px; }

/* ── Messages ───────────────────────────────────────────────────────── */
.msg { padding: 10px 14px; border-radius: 6px; font-size: 13.5px; }
.msg + .msg { margin-top: 8px; }
.msg.success { background: var(--ok-bg); color: var(--ok-ink); }
.msg.error { background: var(--err-bg); color: var(--err-ink); }
.msg.info, .msg.warning { background: var(--info-bg); color: var(--info-ink); }
.creds { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.creds pre { margin: 0; font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }

/* ── Tables ─────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
td.num, th.num, td.r, th.r { text-align: right; }
.num-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.num-table td:first-child { min-width: 210px; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; }
th.sortable { user-select: none; }
th.sortable:hover { color: var(--text); }
th.sortable.asc::after { content: " ↑"; }
th.sortable.desc::after { content: " ↓"; }
tbody tr:hover td { background: var(--surface-2); }
.camp-name { overflow-wrap: anywhere; font-weight: 500; }
.off { opacity: .55; }

/* ── Badges, people tree ────────────────────────────────────────────── */
.badge { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 11.5px; font-weight: 500; white-space: nowrap; line-height: 18px;
  background: color-mix(in srgb, currentColor 14%, transparent); }
.role-admin { color: var(--role-admin); }
.role-head { color: var(--role-head); }
.role-teamlead { color: var(--role-teamlead); }
.role-buyer { color: var(--role-buyer); }
.tag-off { color: var(--red); }
.tree-lead { border-top: 1px solid var(--line); padding: 10px 0; }
.tree-lead + .tree-lead { margin-top: 0; }
.person { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; }
.person .who { font-weight: 500; }
.person .acts { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.person .acts .btn { height: 26px; border-color: transparent; color: var(--muted); }
.person .acts .btn:hover { border-color: var(--line); color: var(--text); }
.person .acts .btn.danger { color: var(--red); }
.buyers { margin: 4px 0 0 14px; padding-left: 12px; border-left: 1px solid var(--line); }
.empty { color: var(--muted); font-size: 13.5px; padding: 6px 0; }

/* ── Tabs (settings) ────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { padding: 8px 4px; margin-right: 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--text); }
.settings-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }

/* ── Creatives ──────────────────────────────────────────────────────── */
.cr-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.cr { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.cr .thumb { aspect-ratio: 9 / 16; background: #000; display: block; }
.cr .thumb video, .cr .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cr .meta { padding: 8px 10px; font-size: 12.5px; }
.cr .meta b { display: block; font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.player { width: 100%; max-height: 72vh; background: #000; border-radius: 8px; display: block; }
.detail { display: grid; gap: 20px; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); align-items: start; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 20px; }

.login-box { width: 100%; max-width: 360px; margin: 0 auto; }

/* ── Board colours + sidebar boards (used on every page) ── */
.color-blue { --c: #4573d2; } .color-green { --c: #5da283; } .color-purple { --c: #8d84e8; }
.color-pink { --c: #f06a99; } .color-yellow { --c: #f1bd6c; } .color-orange { --c: #fd9a00; }
.color-red { --c: #e8384f; } .color-teal { --c: #4ecbc4; } .color-gray { --c: #9ca6af; }
.board-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c, #9ca6af); flex: none; }
.side-boards { display: flex; flex-direction: column; gap: 1px; }
.side-boards a span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .45); }
  .shell { margin-left: 0; }
  .topbar { padding: 0 12px; }
  .content { padding: 16px 16px 48px; }
  .detail { grid-template-columns: 1fr; }
  .filters__note { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi b { font-size: 22px; }
  .cr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person .acts { margin-left: 0; width: 100%; }
  .filter, .filter select, .filters input[type=search] { width: 100%; min-width: 0; }
}
.page-title:empty { display: none; }
.tp-pickcol { width: 36px; padding-right: 0 !important; }
.tp-pickcol input { width: 16px; height: 16px; }
.num-table td.tp-pickcol { min-width: 0 !important; }
.tp-selbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 190; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.num-table .camp-name { display: inline-block; min-width: 180px; }

/* Admin bell: board deletion requests */
.bellmenu { position: relative; }
.bellmenu > summary { list-style: none; position: relative; cursor: pointer; }
.bellmenu > summary::-webkit-details-marker { display: none; }
.bellmenu__n { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }
.bellmenu__pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: min(360px, calc(100vw - 24px)); padding: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 40, .2); max-height: 70vh; overflow-y: auto; }
.bellmenu__head { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; }
.bellmenu__item { padding: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.bellmenu__item a { color: var(--text); }
.bellmenu__act { display: flex; gap: 6px; margin-top: 4px; }
.bellmenu__empty { padding: 10px 8px; }
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-solid:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }

/* Sidebar block «Tasks»: my tasks, all boards, the board list — collapsible */
.side-group__head { display: flex; align-items: center; gap: 2px; padding: 2px 4px 2px 0; color: var(--sidebar-ink); }
.side-group__title { display: flex; align-items: center; gap: 8px; flex: 1; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.side-group__title svg { width: 15px; height: 15px; }
.side-group__toggle, .side-group__add { width: 22px; height: 22px; flex: none; border: 0; border-radius: 5px; background: transparent; color: inherit; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px; line-height: 1; }
.side-group__toggle svg { width: 13px; height: 13px; transition: transform .15s; }
.side-group__toggle:hover, .side-group__add:hover { background: var(--sidebar-hover); color: var(--sidebar-on); }
.side-group__body { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; }
.side-group__body .side-boards { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, .06); }
.side-group__body .side-boards a { padding-left: 14px; font-size: 13.5px; }
.side-tasks-closed #sideTasks .side-group__body, .side-launcher-closed #sideLauncher .side-group__body { display: none; }
.side-tasks-closed #sideTasks .side-group__toggle svg, .side-launcher-closed #sideLauncher .side-group__toggle svg { transform: rotate(-90deg); }
.side-group + .side-group { margin-top: 10px; }

/* ── TikTok launcher ──────────────────────────────────────────────── */
.lc-empty { max-width: 680px; }
.lc-empty h2 { margin-bottom: 6px; }
.lc-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; border: 0; padding: 0; margin: 0; }
.lc-field > span, .lc-field > legend { font-size: 12.5px; color: var(--muted); padding: 0; }
.lc-field--wide { flex: 1; min-width: 240px; }
.lc-demo { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 5px; background: color-mix(in srgb, var(--orange) 18%, transparent);
  color: var(--orange); font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.lc-alert { padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--red) 10%, transparent); border: 1px solid color-mix(in srgb, var(--red) 35%, var(--line));
  font-size: 13.5px; margin: 10px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lc-switch { position: relative; width: 34px; height: 20px; border-radius: 10px; border: 0; background: var(--surface-3); cursor: pointer; padding: 0; transition: background .15s; flex: none; }
.lc-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
.lc-switch.is-on { background: var(--green); }
.lc-switch.is-on::after { transform: translateX(14px); }
.lc-switch.sm { width: 28px; height: 16px; } .lc-switch.sm::after { width: 12px; height: 12px; } .lc-switch.sm.is-on::after { transform: translateX(12px); }
.lc-switch:disabled { opacity: .5; cursor: progress; }
.lc-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
tr.is-off td { color: var(--muted); }
.lc-num { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.lc-grid { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px; align-items: flex-end; }
.lc-grid .lc-field { min-width: 160px; }
.lc-check { display: flex !important; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text) !important; margin: 2px 0 !important; cursor: pointer; }
.lc-howto { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.lc-connect { margin-top: 6px; }
.lc-demo-form { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
/* A table cell stays a table cell — display:flex on a <td> takes it out of the row (borders, height and hover go astray) */
.lc-acts { text-align: right; }
.lc-acts > * { margin: 2px 0 2px 6px; vertical-align: middle; }
.lc-st-active { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.lc-st-pending { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.lc-st-expired, .lc-st-error { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.lc-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lc-steps li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; }
.lc-steps__ico { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: none; }
.lc-steps .is-ok .lc-steps__ico { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.lc-steps .is-err .lc-steps__ico { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red); }

/* Settings → Integrations */
.int-lead { max-width: 760px; }
.int-key { margin-bottom: 14px; }
.int-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.int-form input[type="password"] { flex: 1 1 280px; min-width: 0; }
.int-sync { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.int-sync p { margin: 0; flex: 1 1 320px; }
.int-hints { margin-top: 12px; }
.int-table { width: 100%; max-width: 560px; }

/* Settings → Sections */
.sec-table { width: 100%; }
.sec-table .sec-role { text-align: center; width: 110px; }
.sec-table input[type="checkbox"] { width: 18px; height: 18px; }


/* Settings → Studio credits / API keys */
.sc-top { margin-bottom: 14px; }
.sc-weight { width: 84px; text-align: right; }
.sc-block { margin-top: 22px; }
.sc-h { margin-bottom: 8px; font-size: 15px; }
.sc-ro td { color: var(--muted); }
.sc-outside td:first-child { padding-left: 18px; }
.sc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.sc-over { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.ak-new { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); margin-bottom: 14px; }
.ak-key { display: block; padding: 10px; background: var(--surface-2); border-radius: 6px; word-break: break-all; user-select: all; }
.ak-table { margin-top: 12px; }
.ak-docs h2 { margin: 0 0 6px; }
.ak-docs h3 { font-size: 14px; margin: 16px 0 6px; }
.ak-docs pre { background: var(--surface-2); padding: 10px 12px; border-radius: 6px; overflow-x: auto; font-size: 12.5px; margin: 0; }
