/* Assist Workspace — design tokens + components */
:root {
  color-scheme: light;
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #f7faf9;
  --surface-3: #eef4f3;
  --border: #e0e9e7;
  --border-strong: #c9d8d5;
  --text: #0f2a28;
  --text-2: #46605d;
  --muted: #7b908e;
  --brand: #0f9f8f;
  --brand-strong: #0b7c70;
  --brand-soft: #e3f4f1;
  --brand-ink: #04201f;
  --sidebar: #04201f;
  --sidebar-2: #0a2e2c;
  --sidebar-text: #b9d3cf;
  --sidebar-active: #13423e;
  --good: #0a8a3e;
  --good-soft: #e3f5ea;
  --warn: #9a6400;
  --warn-soft: #fff3d6;
  --bad: #c22f2f;
  --bad-soft: #fde8e8;
  --info: #2a78d6;
  --info-soft: #e5effc;
  /* chart roles (validated categorical slots 1-3 + single-series brand) */
  --series-fb: #2a78d6;
  --series-ig: #eb6834;
  --series-3: #1baf7a;
  --series-single: #0f9f8f;
  --grid: #e8efee;
  --shadow: 0 1px 2px rgba(4, 32, 31, .06), 0 4px 16px rgba(4, 32, 31, .05);
  --shadow-lg: 0 10px 40px rgba(4, 32, 31, .18);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 248px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1413; --surface: #101e1d; --surface-2: #142624; --surface-3: #1a2f2d;
    --border: #1f3936; --border-strong: #2b4b47; --text: #e4f1ef; --text-2: #a9c3bf; --muted: #7a9692;
    --brand: #19b5a3; --brand-strong: #3fcab9; --brand-soft: #123a36; --brand-ink: #e4f1ef;
    --sidebar: #061413; --sidebar-2: #0b2220; --sidebar-active: #143e3a;
    --good: #3cc46f; --good-soft: #10301e; --warn: #f0b23c; --warn-soft: #33270b; --bad: #f07272; --bad-soft: #3a1515;
    --info: #5c9fee; --info-soft: #12253d;
    --series-fb: #3987e5; --series-ig: #d95926; --series-3: #199e70; --series-single: #19b5a3; --grid: #1c3331;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 40px rgba(0,0,0,.55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1413; --surface: #101e1d; --surface-2: #142624; --surface-3: #1a2f2d;
  --border: #1f3936; --border-strong: #2b4b47; --text: #e4f1ef; --text-2: #a9c3bf; --muted: #7a9692;
  --brand: #19b5a3; --brand-strong: #3fcab9; --brand-soft: #123a36; --brand-ink: #e4f1ef;
  --sidebar: #061413; --sidebar-2: #0b2220; --sidebar-active: #143e3a;
  --good: #3cc46f; --good-soft: #10301e; --warn: #f0b23c; --warn-soft: #33270b; --bad: #f07272; --bad-soft: #3a1515;
  --info: #5c9fee; --info-soft: #12253d;
  --series-fb: #3987e5; --series-ig: #d95926; --series-3: #199e70; --series-single: #19b5a3; --grid: #1c3331;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 40px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
[v-cloak] { display: none; }
svg.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.icon.sm { width: 15px; height: 15px; }
svg.icon.lg { width: 22px; height: 22px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 14px 12px; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; color: #fff; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #19c3a9, #0b7c70); display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #fff; }
.brand b { display: block; font-size: 14px; letter-spacing: .06em; }
.brand span { font-size: 11px; color: var(--sidebar-text); opacity: .8; }
.nav-group { margin-top: 10px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #6f918c; padding: 8px 10px 4px; }
.nav a, .nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--sidebar-text); font: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
.nav a:hover, .nav button:hover { background: var(--sidebar-2); color: #fff; text-decoration: none; }
.nav a.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.nav .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin: 0 5px; }
.nav .count { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.08); padding: 1px 7px; border-radius: 10px; }
.nav .sub a { padding-left: 14px; font-size: 13px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar .title { flex: 1; min-width: 0; }
.topbar .title h1 { font-size: 19px; }
.topbar .title .crumb { font-size: 12px; color: var(--muted); }
.content { padding: 20px 24px 60px; max-width: 1480px; width: 100%; margin: 0 auto; }
.btn.menu-btn { display: none; }
.scrim { display: none; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
  .btn.menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .content { padding: 16px 16px 60px; }
}

/* ---------- primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.card-h h2 { flex: 1; min-width: 0; font-size: 15px; }
.card-b { padding: 4px 16px 16px; }
.card-b.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
@media (max-width: 1100px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-2-1 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.spacer { flex: 1; }
.mt { margin-top: 16px; }
.mt-s { margin-top: 8px; }
.mb { margin-bottom: 16px; }
.hr { height: 1px; background: var(--border); margin: 12px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-strong); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
.btn.icon-only { width: 34px; padding: 0; }
.btn.sm.icon-only { width: 28px; }

.input, select.input, textarea.input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; outline: none; }
textarea.input { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.input.sm { height: 30px; font-size: 13px; }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--text-2); min-width: 0; }
label.field .hint { font-weight: 400; color: var(--muted); }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.switch input { appearance: none; width: 34px; height: 20px; border-radius: 20px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { left: 16px; }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-strong); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-strong); font-weight: 600; }
.chip .sw { width: 8px; height: 8px; border-radius: 50%; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 0 11px; height: 30px; font: inherit; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--brand-soft); color: var(--brand-strong); font-weight: 650; }

.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; flex: none; text-transform: uppercase; }
.avatar.lg { width: 38px; height: 38px; font-size: 14px; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.table th.r, .table td.r { text-align: right; }
.table th.sortable { cursor: pointer; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }

.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty svg.icon { width: 30px; height: 30px; opacity: .6; margin-bottom: 6px; }
.empty h3 { color: var(--text-2); margin-bottom: 4px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--info-soft); color: var(--text); font-size: 13px; }
.notice.warn { background: var(--warn-soft); }
.notice.bad { background: var(--bad-soft); }
.notice.good { background: var(--good-soft); }
.notice svg.icon { margin-top: 1px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--brand); animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 50px; }
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; display: flex; }
.progress > div { height: 100%; }
.progress .ok { background: var(--good); }
.progress .fail { background: var(--bad); }
.progress .fill { background: var(--brand); border-radius: 6px; }
.livedot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font: inherit; font-weight: 550; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--brand-strong); border-bottom-color: var(--brand); }

/* ---------- KPI tile ---------- */
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.kpi .label { font-size: 12px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 26px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.kpi .delta.up { color: var(--good); }
.kpi .delta.down { color: var(--bad); }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi .spark { height: 34px; margin-top: 2px; }

/* ---------- charts ---------- */
.chart-box { position: relative; width: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); padding: 0 16px 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.barlist { display: flex; flex-direction: column; gap: 7px; }
.barlist .b { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 13px; }
.barlist .track { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.barlist .track div { height: 100%; background: var(--series-single); border-radius: 4px; }
.heat { display: grid; grid-template-columns: 38px repeat(6, minmax(0, 1fr)); gap: 3px; font-size: 11px; }
.heat .c { height: 26px; border-radius: 4px; background: var(--surface-3); display: grid; place-items: center; color: var(--text); font-size: 10.5px; }
.heat .h { color: var(--muted); display: flex; align-items: center; }

/* ---------- media grid ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; text-decoration: none !important; color: inherit; }
.media .thumb { aspect-ratio: 1 / 1; background: var(--surface-3) center / cover no-repeat; position: relative; }
.media .thumb .tag { position: absolute; top: 6px; left: 6px; }
.media .meta { padding: 8px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.media .meta .cap { color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.media .stats { display: flex; gap: 8px; color: var(--text-2); flex-wrap: wrap; }
.media .stats span { display: inline-flex; align-items: center; gap: 3px; }
.platform-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 700; color: #fff; letter-spacing: .03em; }
.platform-tag.instagram { background: var(--series-ig); }
.platform-tag.facebook { background: var(--series-fb); }

/* ---------- kanban ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: 60vh; }
.col { flex: 0 0 286px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 190px); }
.col-h { padding: 10px 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.col-h .bar { width: 4px; height: 16px; border-radius: 3px; }
.col-h b { flex: 1; font-size: 13px; }
.col-h .sum { font-size: 11.5px; color: var(--muted); }
.col-b { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 60px; flex: 1; }
.col-b.over { background: var(--brand-soft); border-radius: 0 0 12px 12px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px; cursor: grab; box-shadow: 0 1px 1px rgba(0,0,0,.03); display: flex; flex-direction: column; gap: 7px; }
.kcard:hover { border-color: var(--border-strong); }
.kcard.dragging { opacity: .45; }
.kcard .t { font-weight: 600; font-size: 13.5px; }
.kcard .cl { font-size: 12px; color: var(--text-2); }
.kcard .f { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.kcard .f .overdue { color: var(--bad); font-weight: 600; }
.prio { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.prio.urgent { background: #d03b3b; } .prio.high { background: #eb6834; } .prio.medium { background: #eda100; } .prio.low { background: #8fa3a0; }
.drop-line { height: 3px; background: var(--brand); border-radius: 2px; }
.label-chip { font-size: 10.5px; padding: 1px 6px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
.cal .dow { padding: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal .day { min-height: 116px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; background: var(--surface); min-width: 0; }
.cal .day.other { background: var(--surface-2); }
.cal .day.other .dn { color: var(--muted); }
.cal .day.today .dn { background: var(--brand); color: #fff; }
.cal .day.over { background: var(--brand-soft); }
.cal .dn { font-size: 12px; font-weight: 650; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.cal .add { opacity: 0; margin-left: auto; }
.cal .day:hover .add { opacity: 1; }
.citem { font-size: 11.5px; padding: 3px 6px; border-radius: 6px; background: var(--surface-3); border-left: 3px solid var(--muted); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citem.s-idea { border-left-color: #8fa3a0; } .citem.s-in_progress { border-left-color: #2a78d6; } .citem.s-review { border-left-color: #eda100; } .citem.s-scheduled { border-left-color: #6250d6; } .citem.s-published { border-left-color: #0ca30c; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.idea { background: #8fa3a0; } .status-dot.in_progress { background: #2a78d6; } .status-dot.review { background: #eda100; } .status-dot.scheduled { background: #6250d6; } .status-dot.published { background: #0ca30c; }
@media (max-width: 760px) { .cal .day { min-height: 70px; } .citem { font-size: 0; padding: 0; height: 6px; } }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(2, 16, 15, .45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; border: 1px solid var(--border); }
.modal.wide { max-width: 860px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-h h2 { flex: 1; font-size: 16px; }
.modal-b { padding: 16px 18px; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; }
.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 36px); }
.toast { background: var(--brand-ink); color: #fff; padding: 11px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; display: flex; gap: 8px; align-items: center; min-width: 240px; }
:root[data-theme="dark"] .toast { background: #e4f1ef; color: #04201f; }
.toast.error { background: var(--bad); color: #fff; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); min-width: 200px; padding: 6px; z-index: 50; }
.menu button, .menu a { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 7px; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--surface-3); text-decoration: none; }
.rel { position: relative; }

/* ---------- drop zone ---------- */
.dropzone { border: 2px dashed var(--border-strong); border-radius: 10px; padding: 16px; text-align: center; color: var(--text-2); cursor: pointer; transition: all .15s; font-size: 13px; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }
.feed-card .head { padding: 14px 16px; border-radius: var(--radius) var(--radius) 0 0; color: #fff; display: flex; align-items: center; gap: 10px; }
.feed-card .head h2 { color: #fff; flex: 1; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .hero { background: radial-gradient(1200px 600px at 10% 10%, #0d4a44 0%, #04201f 60%); color: #e1f1ee; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login .hero h1 { font-size: 34px; color: #fff; max-width: 460px; margin: 16px 0 10px; }
.login .hero ul { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 14px; }
.login .hero li { display: flex; gap: 12px; align-items: flex-start; }
.login .hero li .ic { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.08); display: grid; place-items: center; flex: none; }
.login .form { display: grid; place-items: center; padding: 32px 16px; background: var(--surface); }
.login form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login .hero { display: none; } }

.greeting h1 { font-size: 24px; }
.quick-links { display: flex; gap: 8px; flex-wrap: wrap; }
.goal { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.goal .top { display: flex; gap: 8px; align-items: flex-start; }
.goal .top h3 { flex: 1; }
.note-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.note-card .body { white-space: pre-wrap; color: var(--text-2); font-size: 13px; max-height: 160px; overflow: auto; }
.code { background: var(--surface-3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.cal-layout { display: grid; gap: 16px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.cal-layout.with-backlog { grid-template-columns: minmax(0, 1fr) 260px; }
@media (max-width: 1000px) { .cal-layout.with-backlog { grid-template-columns: minmax(0, 1fr); } }

.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 700px) { .split { grid-template-columns: minmax(0, 1fr); } }
.chart-empty { position: absolute; inset: 0 0 24px 30px; display: grid; place-items: center; color: var(--muted); font-size: 12.5px; pointer-events: none; }
