/* Nobbo Workspace - mostly monochrome: paper (light) and ink (dark), following the system unless the person picks one
   (workspace.js sets html[data-theme]). The brand gradient is only an accent: the active nav marker, the top edge of
   the number cards, the primary button's edge on hover, avatar rings and focus. No inline styles anywhere (CSP). */

@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Anek Bangla"; src: url("fonts/anek-bangla-bengali.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0980-09FF, U+200C-200D, U+25CC; }

:root {
  --grad: linear-gradient(100deg, #01BAFD 0%, #1D5DD9 34%, #5A16B4 64%, #EE2BA5 100%);
  --font: "Instrument Sans", "Anek Bangla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px; --r-sm: 10px; --r-pill: 999px;
  --bg: #F4F4F1; --surface: #FFFFFF; --surface-2: #F0F0EC; --surface-3: #E7E7E2;
  --ink: #121316; --ink-2: #44464C; --muted: #7B7E86; --line: rgba(18, 19, 22, .08); --line-2: rgba(18, 19, 22, .15);
  --on-ink: #FFFFFF; --focus: #1D5DD9; --ok: #23865A; --warn: #A86A10; --err: #C53B3B;
  --shadow: 0 1px 2px rgba(18, 19, 22, .04), 0 10px 28px -18px rgba(18, 19, 22, .22);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0D10; --surface: #15161A; --surface-2: #1B1D22; --surface-3: #24262C;
    --ink: #EDEDE8; --ink-2: #B8BAC0; --muted: #868991; --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .14);
    --on-ink: #0C0D10; --focus: #5C9BFF; --ok: #4CC38A; --warn: #E3A23B; --err: #F06A6A;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 30px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0D10; --surface: #15161A; --surface-2: #1B1D22; --surface-3: #24262C;
  --ink: #EDEDE8; --ink-2: #B8BAC0; --muted: #868991; --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .14);
  --on-ink: #0C0D10; --focus: #5C9BFF; --ok: #4CC38A; --warn: #E3A23B; --err: #F06A6A;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 30px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ol, ul, dl, dd, figure, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
p a, .note a, .muted a, dd a, .msg a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
code { font: 500 .92em ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .02em; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: rgba(29, 93, 217, .2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.i { width: 18px; height: 18px; flex: none; }
.i--xs { width: 13px; height: 13px; }
[hidden] { display: none !important; }

/* ---------- buttons and fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 14px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .2s, transform .15s; }
.btn .i { width: 16px; height: 16px; }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn--primary:hover { background: linear-gradient(var(--ink), var(--ink)) padding-box, var(--grad) border-box; border-color: transparent;
  box-shadow: 0 8px 22px -12px rgba(29, 93, 217, .7), 0 8px 22px -14px rgba(238, 43, 165, .6); }
.btn--ghost { background: transparent; }
.btn--danger { background: transparent; color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.btn--danger:hover { border-color: var(--err); background: color-mix(in srgb, var(--err) 8%, transparent); }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.linkish { border: 0; background: none; padding: 0; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { font-weight: 400; color: var(--muted); }
.field em { font-style: normal; font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], input[type="time"], input[type="month"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface);
  color: var(--ink); font: 400 15px/1.4 var(--font); transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 0; resize: vertical; line-height: 1.5; }
input[type="date"], input[type="time"], input[type="month"] { height: 42px; padding-top: 0; padding-bottom: 0; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
input::placeholder, textarea::placeholder { color: var(--muted); }
.code-input { font: 600 22px/1 ui-monospace, Consolas, monospace !important; letter-spacing: .3em; text-align: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--ink); flex: none; }
.check b { color: var(--ink); font-weight: 600; }
.form { display: grid; gap: 14px; margin-top: 18px; }

/* ---------- notes, tags, pills ---------- */
.note { margin: 0 0 16px; padding: 11px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; white-space: pre-line; }
.note--ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.note--warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.note--err { border-color: color-mix(in srgb, var(--err) 45%, transparent); background: color-mix(in srgb, var(--err) 7%, var(--surface)); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); border: 1px solid var(--line-2);
  font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.tag--wa, .tag--whatsapp { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.tag--web, .tag--chat { color: var(--focus); border-color: color-mix(in srgb, var(--focus) 35%, transparent); }
.tag--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.tag--ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.tag--err { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--ink); color: var(--on-ink); font-size: 12px; font-weight: 700; }
.when { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .6; }
.pill--on { color: var(--ink); }
.pill--on::before { background: var(--ok); opacity: 1; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- the frame ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 20px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; font-size: 15px; letter-spacing: -.01em; }
.brand img { width: 22px; height: auto; }
.brand b { font-weight: 600; color: var(--muted); }
.nav { display: grid; gap: 2px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.me { margin-top: auto; display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.me__card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); }
.me__card:hover, .me__card[aria-current="page"] { background: var(--surface-2); }
.me__who { display: grid; min-width: 0; line-height: 1.3; }
.me__who b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me__who span { font-size: 12.5px; color: var(--muted); }
.me__actions { display: flex; gap: 4px; padding: 0 4px; }
.avatar { position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; font-size: 13px; font-weight: 700;
  border: 1.5px solid transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; color: var(--ink); }
.avatar--sm { width: 32px; height: 32px; font-size: 12px; border-width: 1px; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, linear-gradient(var(--line-2), var(--line-2)) border-box; }
.i--light { display: none; }
:root[data-theme="dark"] .i--dark { display: none; } :root[data-theme="dark"] .i--light { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i--dark { display: none; } :root:not([data-theme="light"]) .i--light { display: block; } }

.main { min-width: 0; padding: 28px clamp(18px, 3vw, 44px) 64px; }
.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.top h1 { font-size: clamp(24px, 1.2rem + 1vw, 30px); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.crumb { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--muted); font-size: 13.5px; }
.crumb a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.crumb .i { width: 15px; height: 15px; }
.top__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card + .card, .rows + .card, .seg + .card { margin-top: 16px; }
.cols > .card, .detail > .card { margin-top: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card h2, .side-card h2, .form-card h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.more { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.more:hover { color: var(--ink); }
.more .i { width: 14px; height: 14px; }
.pad { padding: 16px 18px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-top: 16px; }
.cols:first-child { margin-top: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 42vw), 1fr)); gap: 14px; }
.kpi { position: relative; display: grid; gap: 4px; padding: 18px 18px 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: border-color .15s, transform .2s; }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad); opacity: .55; }
a.kpi:hover { border-color: var(--line-2); transform: translateY(-1px); }
.kpi__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi__value { font-size: 32px; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi__hint { font-size: 12.5px; color: var(--muted); }
.mini li + li { border-top: 1px solid var(--line); }
.mini a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; transition: background .15s; }
.mini a:hover { background: var(--surface-2); }
.mini__main { display: grid; min-width: 0; }
.mini__main b { font-weight: 600; font-size: 14.5px; }
.mini__main span { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__side { display: flex; align-items: center; gap: 8px; }
.empty { display: grid; gap: 6px; place-items: center; padding: 56px 20px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty__title { font-size: 17px; font-weight: 600; }

/* ---------- lists ---------- */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.search { position: relative; flex: 1; max-width: 520px; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px; border-radius: var(--r-pill); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.seg a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); color: var(--ink-2); font-size: 13.5px; font-weight: 600; border: 1px solid transparent; }
.seg a:hover { background: var(--surface-2); }
.seg a[aria-current="true"] { background: var(--ink); color: var(--on-ink); }
.seg b { font-weight: 600; opacity: .55; font-variant-numeric: tabular-nums; }
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.rows li + li { border-top: 1px solid var(--line); }
.lrow { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(0, 2fr) minmax(120px, .8fr) auto; align-items: center; gap: 18px; padding: 12px 18px; transition: background .15s; }
.lrow:hover { background: var(--surface-2); }
.lrow__who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.lrow__who > span:last-child { display: grid; min-width: 0; line-height: 1.35; }
.lrow__who b { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow__who .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow__text { color: var(--ink-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow__contact { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow__meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.lrow--chat, .lrow--team { grid-template-columns: minmax(180px, 1.1fr) minmax(0, 2.4fr) auto; }
.lrow--chat.is-new .lrow__who b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: var(--grad); vertical-align: 2px; }
.lrow--chat.is-new .lrow__text { color: var(--ink); font-weight: 500; }
.lrow--team.is-off { opacity: .55; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.pager > span:last-child { display: flex; gap: 8px; }
.log { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.log li { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 10px 16px; font-size: 14px; }
.log li + li { border-top: 1px solid var(--line); }
.log li.is-err { background: color-mix(in srgb, var(--err) 5%, transparent); }
.log li > span:nth-child(2) { overflow-wrap: anywhere; }

/* ---------- detail pages ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.side-card { position: sticky; top: 20px; display: grid; gap: 16px; padding: 18px; }
.stack { display: grid; gap: 8px; }
.who { display: flex; align-items: center; gap: 12px; }
.who .avatar { width: 44px; height: 44px; font-size: 15px; }
.who p { font-size: 13.5px; overflow-wrap: anywhere; }
.kv { display: grid; padding: 4px 18px 10px; }
.kv > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: 13.5px; }
.kv dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.kv--compact { padding: 0; }
.kv--compact > div { grid-template-columns: 1fr; gap: 2px; padding: 9px 0; }
.kv--compact dt { font-size: 12.5px; }
.kv--compact dd { font-size: 14px; }
.danger { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.danger .check { font-size: 13px; }

/* ---------- chats ---------- */
.thread-card { overflow: hidden; }
.thread { display: grid; gap: 10px; max-height: 66vh; overflow-y: auto; padding: 20px; background: var(--bg); overscroll-behavior: contain; }
.msg { max-width: min(560px, 82%); padding: 10px 13px; border-radius: 14px; font-size: 14.5px; }
.msg__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.msg small.err { color: var(--err); }
.msg--in { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg--out { justify-self: end; background: var(--surface-3); border-bottom-right-radius: 5px; }
.msg--ai { background: linear-gradient(var(--surface-3), var(--surface-3)) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.msg--team { background: var(--ink); color: var(--on-ink); }
.msg--team small { color: color-mix(in srgb, var(--on-ink) 65%, transparent); }
.msg--note { justify-self: center; max-width: 90%; padding: 4px 12px; border-radius: var(--r-pill); background: transparent; border: 1px dashed var(--line-2); color: var(--muted); font-size: 12.5px; text-align: center; }
.msg__btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg__btns span { padding: 3px 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; }
.reply { display: grid; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.reply__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }

/* ---------- forms in cards ---------- */
.form-card, .form-card > fieldset { display: grid; gap: 14px; }
.form-card { padding: 20px; }
.form-card h2 + p { margin-top: -6px; }
.form-card h2:not(:first-of-type) { margin-top: 10px; }
.tight { display: grid; gap: 12px; padding-bottom: 18px; }
.tight > p, .tight > form { padding: 0 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.form-foot, .row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.inline-form .field { min-width: 180px; }
.field--grow { flex: 1; }
.field--short { max-width: 360px; }
.addons { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.addons legend { float: left; width: 100%; padding: 0; font-size: 13px; font-weight: 600; }   /* inside the box, not on its border */
.addons legend + * { clear: both; }
.addons__set { display: grid; gap: 10px; }
.access { display: grid; gap: 10px; }
.access li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.access li .i { margin-top: 4px; }
.access li.is-on { color: var(--ink); }
.access li.is-on .i { color: var(--ok); }
.access b { font-weight: 600; }

/* ---------- clients ---------- */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.client-card { display: grid; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: border-color .15s, transform .2s; }
.client-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.client-card__top { display: flex; align-items: center; gap: 12px; }
.client-card__name { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.client-card__name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-card__name .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-card__meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.client-card__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.faces { margin-left: auto; }
.faces .avatar + .avatar { margin-left: -8px; }
.avatar--xs { width: 26px; height: 26px; font-size: 10.5px; border-width: 1px; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, linear-gradient(var(--surface), var(--surface)) border-box; }
.col { display: grid; gap: 16px; min-width: 0; }
.col > .card + .card { margin-top: 0; }
.cols--tight { margin-top: 0; }
.card__head h2 { display: inline-flex; align-items: center; gap: 7px; }
.pin { position: relative; overflow: hidden; }
.pin::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.pad--top { padding-bottom: 0; }
.suggest { display: grid; gap: 10px; padding: 14px 18px; border-top: 1px dashed var(--line-2); background: var(--surface-2); }
.suggest p { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.suggest ul { display: grid; gap: 8px; }
.suggest li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.suggest li > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.secrets { display: grid; }
.secrets > li { padding: 12px 18px; border-top: 1px solid var(--line); }
.secret-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; }
.secret-row__main { display: grid; gap: 3px; min-width: 0; }
.secret-row__main b { font-weight: 600; margin-right: 6px; }
.secret-row__main > .tag { justify-self: start; }
.secret-row__main .muted { font-size: 12.5px; }
.secret-row__value { font: 600 14px ui-monospace, Consolas, monospace; letter-spacing: .12em; color: var(--muted); }
.secret-edit { margin-top: 8px; }
.secret-edit summary { color: var(--muted); font-size: 13px; cursor: pointer; }
.secret-edit__body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 10px; }
.secret-add { display: grid; gap: 12px; padding: 16px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }
.reveal { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); }
.reveal code { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; user-select: all; }
.narrow { max-width: 560px; }
.note-form { display: grid; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.note-form .btn { justify-self: end; }
.timeline { display: grid; }
.timeline li { display: flex; gap: 12px; padding: 12px 18px; }
.timeline li + li { border-top: 1px solid var(--line); }
.timeline__meta { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; margin-bottom: 2px; }
.timeline__meta b { font-weight: 600; }
.timeline p.prewrap { font-size: 14.5px; color: var(--ink-2); }
.people { display: grid; gap: 10px; }
.people li { display: flex; align-items: center; gap: 10px; }
.people li > span:last-child { display: grid; line-height: 1.3; }
.people b { font-weight: 600; font-size: 14px; }
.people .muted { font-size: 12.5px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.link-form { display: grid; gap: 8px; }

/* ---------- work: tasks, boards, projects, calendar ---------- */
.js .js-hide { display: none; }
.toolbar--split { flex-wrap: wrap; align-items: center; justify-content: space-between; }
.toolbar--split .seg { margin: 0; }
.filter { display: flex; align-items: center; gap: 8px; }
.filter select { width: auto; min-height: 34px; padding: 5px 12px; border-radius: var(--r-pill); font-size: 13.5px; }
.seg--tight a { height: 30px; padding: 0 11px; }
.seg--buttons { margin: 0; gap: 4px; }
.seg--buttons button { height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 600 13px/1 var(--font); cursor: pointer; }
.seg--buttons button:hover { border-color: var(--ink-2); color: var(--ink); }
.seg--buttons button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); cursor: default; }
.icon-btn--sm { width: 28px; height: 28px; }
.icon-btn--sm .i { width: 15px; height: 15px; }
.icon-btn--line { border-color: var(--line-2); }
.row-actions .more + .more { margin-left: 12px; }
.tag--quiet { color: var(--muted); border-style: dashed; }
.tag--vis { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; color: var(--ink); }
.when--icon { display: inline-flex; align-items: center; gap: 4px; }
.avatar--empty { border: 1px dashed var(--line-2); background: transparent; color: var(--muted); }
.person { display: inline-flex; align-items: center; gap: 8px; }
.take { margin-top: 8px; }
.field__fixed { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); color: var(--ink); font-size: 15px; font-weight: 500; }
.field--inline { display: inline-flex; align-items: center; gap: 8px; }
.field--inline input { width: 86px; min-height: 34px; padding: 5px 10px; }
.narrow-2 { max-width: 780px; }
.pad--flush { padding-top: 0; }
.filter-note { margin: 0 0 12px; font-size: 13.5px; }
.note-form--foot { border-bottom: 0; border-top: 1px solid var(--line); }
.note-form__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.note-form__row .btn { margin-left: auto; }
.statusbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.statusbar__label { color: var(--muted); font-size: 13px; font-weight: 600; }
.card .statusbar:last-child { border-bottom: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }

.progress { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.progress progress { flex: 1; width: 100%; height: 6px; border: 0; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; -webkit-appearance: none; appearance: none; }
.progress progress::-webkit-progress-bar { background: var(--surface-3); border-radius: var(--r-pill); }
.progress progress::-webkit-progress-value { background: var(--grad); border-radius: var(--r-pill); }
.progress progress::-moz-progress-bar { background: var(--grad); border-radius: var(--r-pill); }
.progress b { min-width: 34px; font-size: 12.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.big-progress { display: grid; gap: 6px; }
.big-progress .progress { display: flex; }
.big-progress progress { height: 10px; }
.big-progress b { font-size: 16px; }

.task-group + .task-group { margin-top: 14px; }
.task-group--late .card__head h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--err); }
.done-group > summary { cursor: pointer; list-style: none; border-bottom: 0; }
.done-group > summary::-webkit-details-marker { display: none; }
.done-group[open] > summary { border-bottom: 1px solid var(--line); }
.done-group > summary .muted::after { content: " ▾"; }
.tasks li + li { border-top: 1px solid var(--line); }
.task { display: flex; align-items: center; gap: 12px; padding: 10px 18px; transition: background .15s; }
.task:hover { background: var(--surface-2); }
.tick { display: grid; place-items: center; flex: none; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line-2); background: transparent; color: transparent; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.tick:hover { border-color: var(--ink-2); color: var(--muted); }
.tick--off { cursor: default; opacity: .5; }
.task.is-done .tick { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.task__main { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.task__main b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task__main span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task__main:hover b { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.task.is-done .task__main b { color: var(--muted); text-decoration: line-through; }
.task__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; margin-left: auto; }

.proj-strip { display: flex; gap: 10px; margin-bottom: 14px; padding-bottom: 4px; overflow-x: auto; }
.proj-chip { display: grid; gap: 6px; flex: none; width: 220px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); transition: border-color .15s; }
.proj-chip:hover { border-color: var(--line-2); }
.proj-chip.is-on { border-color: var(--ink); }
.proj-chip.is-done { opacity: .6; }
.proj-chip b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-chip .muted { font-size: 12.5px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 12px; align-items: start; padding-bottom: 6px; overflow-x: auto; }
.board__col { min-height: 180px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); transition: border-color .15s, background .15s; }
.board__col.is-over { border-color: var(--focus); background: color-mix(in srgb, var(--focus) 6%, var(--surface-2)); }
.board__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; }
.board__head h2 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.board__head h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--muted); }
.board__col--doing .board__head h2::before { border-color: var(--focus); background: var(--focus); }
.board__col--review .board__head h2::before { border-color: var(--warn); background: var(--warn); }
.board__col--done .board__head h2::before { border-color: var(--ok); background: var(--ok); }
.board__cards { display: grid; gap: 8px; min-height: 40px; }
.bcard { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); }
.bcard[draggable="true"] { cursor: grab; }
.bcard.is-dragging { opacity: .45; }
.bcard__title { font-size: 14.5px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.bcard__title:hover { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.bcard.is-done .bcard__title { color: var(--muted); text-decoration: line-through; }
.bcard__proj { color: var(--muted); font-size: 12.5px; }
.bcard__foot { display: flex; align-items: center; gap: 8px; }
.bcard__moves { display: flex; gap: 2px; margin-left: auto; }
.board__add { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 6px; border-radius: var(--r-sm); color: var(--muted); font-size: 13px; font-weight: 600; }
.board__add:hover { background: var(--surface); color: var(--ink); }

.work-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.work-sum b { color: var(--ink); font-weight: 600; }
.projects li + li { border-top: 1px solid var(--line); }
.projects a { display: grid; grid-template-columns: minmax(0, 1fr) 170px auto; align-items: center; gap: 14px; padding: 12px 18px; transition: background .15s; }
.projects a:hover { background: var(--surface-2); }
.projects__main { display: grid; min-width: 0; line-height: 1.35; }
.projects__main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projects__main .muted { font-size: 13px; }

.kind, .ev { --kind: var(--muted); }
.kind--post { --kind: #01BAFD; } .kind--reel { --kind: #EE2BA5; } .kind--shoot { --kind: #7A3FE0; }
.kind--meeting { --kind: var(--focus); } .kind--deadline { --kind: var(--err); }
.kind { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: var(--r-pill); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.kind::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--kind); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 12.5px; }
.legend__task { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; }
.cal { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.cal__head, .cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal__head { border-bottom: 1px solid var(--line); }
.cal__head span { padding: 9px 10px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.cal__day { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 122px; padding: 6px 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal__day:nth-child(7n) { border-right: 0; }
.cal__day.is-weekend { background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
.cal__day.is-out { background: var(--surface-2); }
.cal__day.is-out .cal__date > a:first-child { color: var(--muted); }
.cal__date { display: flex; align-items: center; justify-content: space-between; }
.cal__date > a:first-child { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal__date > a:first-child:hover { background: var(--surface-3); }
.cal__day.is-today .cal__date > a:first-child { background: var(--ink); color: var(--on-ink); }
.cal__add { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--muted); opacity: 0; transition: opacity .15s; }
.cal__day:hover .cal__add, .cal__add:focus-visible { opacity: 1; }
.cal__add:hover { background: var(--surface-3); color: var(--ink); }
.cal__items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.cal__items li { min-width: 0; }
.ev { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--ink); font-size: 12.5px; line-height: 1.4; }
.ev:hover { background: var(--surface-3); }
.ev::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--kind); }
.ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev time { flex: none; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.ev--task { background: transparent; color: var(--ink-2); }
.ev--task::before { display: none; }
.ev--task .i { color: var(--muted); }
.ev.is-done span, .ev.is-cancelled span { color: var(--muted); text-decoration: line-through; }
.cal__more { padding: 0 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.cal__more:hover { color: var(--ink); }
.cal__dots { display: none; }
.week { display: grid; gap: 10px; }
.week__day { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.week__day.is-today::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.week__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 14px; border-right: 1px solid var(--line); background: var(--surface-2); font-size: 14px; }
.week__head b { font-weight: 600; }
.week__day.is-weekend .week__head { color: var(--muted); }
.week__none { padding: 14px 18px; font-size: 13.5px; }
.arows li + li { border-top: 1px solid var(--line); }
.arow a { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 16px; transition: background .15s; }
.arow a:hover { background: var(--surface-2); }
.arow__time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.arow__main { display: grid; min-width: 0; line-height: 1.35; }
.arow__main b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow__main span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.arow.is-done .arow__main b { color: var(--muted); text-decoration: line-through; }
.agenda--phone { display: none; margin-top: 14px; }
.agenda--phone .agenda__day { overflow: hidden; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.agenda__day h2, .agenda__day h3 { padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 13px; font-weight: 600; }
.agenda--home .agenda__day + .agenda__day { border-top: 1px solid var(--line); }
.agenda--home h3 { padding: 12px 18px 2px; border-bottom: 0; background: transparent; color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.agenda--home .agenda__day.is-today h3 { color: var(--ink); }
.agenda--home .arow a { padding: 8px 18px; }
.agenda--home .arows li + li { border-top: 0; }

/* ---------- client portal, approvals, invoices ---------- */
.nav .count { margin-left: auto; }
input[type="file"] { max-width: 100%; color: var(--ink-2); font: 400 13.5px/1.4 var(--font); }
input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: 600 13px/1 var(--font); cursor: pointer; }
.secret-add h3 { font-size: 14px; font-weight: 600; }
.avatar--client { background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, linear-gradient(var(--focus), var(--focus)) border-box; }
.thumb { display: grid; place-items: center; flex: none; width: 56px; height: 56px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb--doc { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.appr li + li { border-top: 1px solid var(--line); }
.appr a { display: flex; align-items: center; gap: 14px; padding: 12px 18px; transition: background .15s; }
.appr a:hover { background: var(--surface-2); }
.appr__main { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.appr__main b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appr__main .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appr__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.waiting { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; }
.waiting + .cols, .kpis + .waiting, .cols + .card { margin-top: 16px; }
.preview { display: block; padding: 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.preview img { max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 8px; box-shadow: var(--shadow); }
.preview--doc { display: flex; align-items: center; gap: 14px; }
.preview--doc > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.preview--doc b { font-weight: 600; overflow-wrap: anywhere; }
.preview + .pad--flush { padding-top: 16px; }
.decide .form-foot .btn--primary { min-width: 140px; }
.linked-appr { display: flex; align-items: center; gap: 10px; }
.linked-appr > span { display: grid; gap: 4px; min-width: 0; }
.linked-appr b { font-size: 14px; font-weight: 600; }
.linked-appr .tag { justify-self: start; }
.portal-box { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.portal-box .people li { align-items: flex-start; }
.portal-box .people li > span:last-child { min-width: 0; }
.portal-box .people .muted { overflow-wrap: anywhere; }
.inv li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 18px; }
.inv li + li { border-top: 1px solid var(--line); }
.inv__main { display: grid; flex: 1; min-width: 200px; line-height: 1.35; }
.inv__main b { font-weight: 600; }
.inv__main .muted { font-size: 13px; }
.inv__amount { font-size: 15.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.inv .inline-form select { width: auto; min-height: 34px; padding: 5px 10px; font-size: 13.5px; }
.reports li { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; padding: 14px 18px; }
.reports li + li { border-top: 1px solid var(--line); }
.reports__month { display: grid; place-items: center; align-content: center; flex: none; width: 54px; height: 54px; border-radius: 12px; background: var(--surface-2); color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.1; }
.reports__month b { color: var(--muted); font-size: 11px; font-weight: 600; }
.reports__main { display: grid; flex: 1; gap: 4px; min-width: 220px; }
.reports__main b { font-weight: 600; }
.reports__main .muted { font-size: 13.5px; }
.report-pin__title { margin-bottom: 6px; }
.report-pin .row-actions { margin-top: 12px; }
.steps-list { display: grid; gap: 10px; }
.steps-list li { display: flex; align-items: flex-start; gap: 10px; }
.steps-list li > span:last-child { display: grid; line-height: 1.35; }
.steps-list b { font-size: 14px; font-weight: 600; }
.steps-list .muted { font-size: 12.5px; }
.steps-list .is-done b { color: var(--muted); text-decoration: line-through; }
.steps-list .is-done .tick { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.proj-card { gap: 12px; }
.proj-card .progress { width: 100%; }
.proj-card__last { font-size: 13px; }
.cal__date > .cal__num { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal__day.is-today .cal__date > .cal__num { background: var(--ink); color: var(--on-ink); }
.cal__day.is-out .cal__num { color: var(--muted); }
span.ev:hover { background: var(--surface-2); }

/* ---------- sign-in ---------- */
body.auth { min-height: 100vh; background:
  radial-gradient(40rem 26rem at 12% -10%, rgba(1, 186, 253, .08), transparent 60%),
  radial-gradient(36rem 24rem at 100% 110%, rgba(238, 43, 165, .07), transparent 60%), var(--bg); }
.auth { display: grid; place-items: center; align-content: center; gap: 14px; min-height: 100vh; padding: 32px 16px; }
.auth__card { position: relative; width: min(440px, 100%); display: grid; gap: 10px; padding: 30px 28px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.auth__card::before { content: ""; position: absolute; left: 28px; right: 28px; top: -1px; height: 2px; border-radius: 2px; background: var(--grad); opacity: .8; }
.auth__card h1 { margin-top: 12px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.auth__card > .muted { font-size: 14.5px; }
.auth__card .note { margin: 6px 0 0; }
.brand--auth { padding: 0; }
.auth__foot { max-width: 440px; color: var(--muted); font-size: 13px; text-align: center; }
.auth__foot a { text-decoration: underline; text-underline-offset: 2px; }
.hint summary { color: var(--muted); font-size: 14px; cursor: pointer; }
.hint p { margin-top: 6px; font-size: 13.5px; }
.steps { display: grid; gap: 18px; margin-top: 12px; counter-reset: s; }
.steps > li { display: grid; gap: 6px; padding-left: 36px; position: relative; font-size: 14px; color: var(--ink-2); }
.steps > li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; font-size: 12px; font-weight: 700; color: var(--ink); }
.steps b { color: var(--ink); font-size: 15px; }
.qr { width: 196px; height: 196px; padding: 10px; margin: 6px 0; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line-2); }
.qr svg { width: 100%; height: 100%; }
.secret { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.secret code { padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: 14px; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0 6px; }
.codes li { padding: 9px 12px; border-radius: var(--r-sm); background: var(--surface-2); text-align: center; }
.codes code { font-size: 15px; letter-spacing: .06em; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) { .detail { grid-template-columns: 1fr; } .side-card { position: static; } }
@media (max-width: 960px) { .lrow { grid-template-columns: minmax(0, 1fr) auto; } .lrow__text, .lrow__contact { display: none; } .lrow--chat .lrow__text { display: block; grid-column: 1 / -1; order: 3; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }   /* the nav's row of links scrolls; it must not widen the page */
  .side, .nav { min-width: 0; }
  .side { position: sticky; z-index: 5; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { order: 3; display: flex; width: 100%; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .nav a { min-height: 36px; padding: 0 12px; white-space: nowrap; }
  .nav a[aria-current="page"]::before { left: 12px; right: 12px; top: auto; bottom: 0; width: auto; height: 2px; border-radius: 2px; }
  .me { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; }
  .me__who { display: none; }
  .me__card { padding: 2px; }
  .main { padding: 20px 16px 48px; }
  .kv > div { grid-template-columns: 1fr; gap: 2px; }
  .log li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 760px) {
  .cal__head span { padding: 8px 2px; font-size: 11px; text-align: center; }
  .cal__day { min-height: 56px; padding: 4px 2px; }
  .cal__date { justify-content: center; }
  .cal__items, .cal__more, .cal__add { display: none; }
  .cal__dots { display: flex; justify-content: center; gap: 3px; margin-top: auto; }
  .cal__dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--grad); }
  .agenda--phone { display: block; }
  .week__day { grid-template-columns: minmax(0, 1fr); }
  .week__head { align-items: center; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .arow a { grid-template-columns: 64px minmax(0, 1fr); }
  .arow__meta { grid-column: 2; justify-content: flex-start; }
  .board { grid-template-columns: repeat(4, minmax(250px, 84vw)); scroll-snap-type: x mandatory; }
  .board__col { scroll-snap-align: start; }
  .task { flex-wrap: wrap; }
  .task__meta { width: 100%; justify-content: flex-start; margin-left: 0; padding-left: 34px; }
  .projects a { grid-template-columns: minmax(0, 1fr) auto; }
  .projects .progress { grid-column: 1 / -1; order: 3; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
