/* X Digital App — cockpit styles.
   Brand is configuration: --accent and --grad are injected per agency by the layout.
   Everything else is neutral so another agency's colours drop in without edits here. */

@font-face{
  font-family:"Montserrat"; font-style:normal; font-weight:100 900; font-display:swap;
  src:url("/fonts/montserrat-variable.woff2") format("woff2");
}

:root{
  --accent:#FD3F68;
  --grad:linear-gradient(90deg,#FE624B 0%,#FD3F68 28%,#F42A84 52%,#C72DA7 76%,#A826D1 100%);

  --bg:#09090b; --surface:#111114; --surface-2:#17171b; --surface-3:#1e1e23;
  --line:rgba(255,255,255,.08); --line-strong:rgba(255,255,255,.14);
  --text:#f4f4f5; --muted:#a1a1aa; --faint:#71717a;
  --ok:#34d399; --warn:#fbbf24; --bad:#f87171;

  --radius:12px; --radius-sm:8px;
  --side:236px;
  --pad:clamp(16px,3vw,32px);
  font-size:14px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:"Montserrat",system-ui,"Segoe UI",Arial,sans-serif; font-weight:400; line-height:1.5;
  -webkit-font-smoothing:antialiased; overflow-x:clip;
}
h1,h2,h3,p{ margin:0; }
a{ color:inherit; }
img{ max-width:100%; display:block; }
:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:4px; }
.skip{ position:absolute; left:-9999px; top:8px; background:var(--surface-3); padding:8px 12px; border-radius:8px; z-index:50; }
.skip:focus{ left:8px; }
.num{ font-variant-numeric:tabular-nums; white-space:nowrap; }
/* The line icons (src/ui/icons.tsx): drawn with the stroke, sized by the text around them. */
svg.i{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.side__link--soon em{ margin-left:auto; }

/* ───────── shell ───────── */
.shell{ display:grid; grid-template-columns:var(--side) minmax(0,1fr); min-height:100vh; min-height:100svh; }

.side{
  position:sticky; top:0; height:100vh; height:100svh; display:flex; flex-direction:column;
  background:var(--surface); border-right:1px solid var(--line); padding:20px 14px 16px;
}
.side__brand{ display:flex; align-items:center; gap:10px; text-decoration:none; font-weight:600; font-size:15px; letter-spacing:.01em; padding:4px 8px 18px; }
.side__brand img{ width:34px; height:auto; }
.side__nav{ flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:18px; }
.side__label{ font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--faint); padding:0 10px 6px; font-weight:600; }
.side__link{
  display:flex; align-items:center; justify-content:flex-start; gap:10px; position:relative;
  padding:8px 10px; border-radius:var(--radius-sm); text-decoration:none; color:var(--muted); font-weight:500;
  transition:background .15s,color .15s;
}
.side__link:hover{ background:var(--surface-2); color:var(--text); }
.side__link[aria-current="page"]{ background:var(--surface-3); color:var(--text); }
.side__link[aria-current="page"]::before{ content:""; position:absolute; left:-14px; top:8px; bottom:8px; width:3px; border-radius:0 3px 3px 0; background:var(--grad); }
.side__link--soon{ color:var(--faint); cursor:default; }
.side__link--soon:hover{ background:none; color:var(--faint); }
.side__link--soon em{ font-style:normal; font-size:9.5px; letter-spacing:.1em; text-transform:uppercase; border:1px solid var(--line); border-radius:99px; padding:1px 7px; }
.side__foot{ border-top:1px solid var(--line); padding:14px 10px 0; }
.side__user{ font-weight:600; font-size:13px; }
.side__meta{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }

.pill{ font-size:10px; letter-spacing:.06em; text-transform:uppercase; font-weight:600; padding:2px 8px; border-radius:99px; border:1px solid var(--line-strong); color:var(--muted); }
.pill--production,.pill--mail-live{ color:var(--ok); border-color:color-mix(in srgb,var(--ok) 45%,transparent); }
.pill--staging,.pill--mail-redirect{ color:var(--warn); border-color:color-mix(in srgb,var(--warn) 45%,transparent); }

.main{ padding:var(--pad); padding-bottom:64px; min-width:0; }
.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:24px; }
.page-head h1{ font-size:clamp(22px,3vw,28px); font-weight:600; letter-spacing:-.01em; line-height:1.2; }
.page-head__lead{ color:var(--muted); margin-top:6px; max-width:64ch; }
.page-head__actions{ display:flex; gap:10px; flex-wrap:wrap; }

/* ───────── pieces ───────── */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; padding:0 16px;
  border-radius:var(--radius-sm); border:1px solid var(--line-strong); background:var(--surface-2); color:var(--text);
  font:inherit; font-weight:600; font-size:13px; text-decoration:none; cursor:pointer; transition:filter .15s,background .15s;
}
.btn:hover{ background:var(--surface-3); }
.btn--primary{ background:var(--grad); border-color:transparent; color:#fff; }
.btn--small{ padding:3px 9px; font-size:12px; min-height:0; }
.btn--primary:hover{ background:var(--grad); filter:brightness(1.08); }

.card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); }
.card__head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:16px 18px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.card__head h2{ font-size:15px; font-weight:600; }
.card__head p{ color:var(--muted); font-size:12.5px; }
.card__body{ padding:18px; }
.stack{ display:flex; flex-direction:column; gap:18px; }

.stats{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:14px; margin-bottom:22px; }
.stat{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px; }
.stat__label{ color:var(--muted); font-size:12px; font-weight:500; }
.stat__value{ font-size:24px; font-weight:600; letter-spacing:-.01em; margin-top:6px; font-variant-numeric:tabular-nums; }
.stat__note{ color:var(--faint); font-size:12px; margin-top:2px; }
.stat--key .stat__value{ background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; line-height:1.25; padding-bottom:.08em; }

.tabs{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom:18px; }
.tab{ padding:7px 13px; border-radius:99px; border:1px solid var(--line); color:var(--muted); text-decoration:none; font-weight:500; font-size:12.5px; }
.tab:hover{ color:var(--text); border-color:var(--line-strong); }
.tab[aria-current="true"]{ color:var(--text); background:var(--surface-3); border-color:var(--line-strong); }
.tab span{ color:var(--faint); margin-left:6px; font-variant-numeric:tabular-nums; }

.table-wrap{ overflow-x:auto; }
table{ width:100%; border-collapse:collapse; }
th,td{ text-align:left; padding:11px 18px; border-bottom:1px solid var(--line); vertical-align:top; }
thead th{ font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--faint); font-weight:600; white-space:nowrap; }
tbody tr:last-child td{ border-bottom:0; }
tbody tr:hover{ background:rgba(255,255,255,.02); }
td.r,th.r{ text-align:right; }
/* Same column positions in every card, so a page of tables reads as one grid. */
.table--fixed{ table-layout:fixed; min-width:560px; }
.table--fixed .w-tier{ width:27%; } .table--fixed .w-desc{ width:41%; } .table--fixed .w-bill{ width:14%; } .table--fixed .w-price{ width:18%; }
.table--fixed td{ overflow-wrap:anywhere; }
.sub{ display:block; color:var(--muted); font-size:12.5px; margin-top:2px; }
.dim{ color:var(--faint); }
.show-sm{ display:none !important; }

.chip{ display:inline-block; font-size:11px; font-weight:600; padding:2px 9px; border-radius:99px; border:1px solid var(--line-strong); color:var(--muted); white-space:nowrap; }
.chip--monthly{ color:#c4b5fd; border-color:rgba(196,181,253,.35); }
.chip--hourly{ color:#7dd3fc; border-color:rgba(125,211,252,.35); }
.chip--internal{ color:var(--warn); border-color:color-mix(in srgb,var(--warn) 40%,transparent); }
.chip--active{ color:var(--ok); border-color:color-mix(in srgb,var(--ok) 40%,transparent); }
.chip--lead{ color:#7dd3fc; border-color:rgba(125,211,252,.35); }

/* ───────── forms ───────── */
.form{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 16px; }
.field{ display:flex; flex-direction:column; gap:6px; }
.field--wide{ grid-column:1/-1; }
.field label{ font-size:12px; font-weight:600; color:var(--muted); }
.field input,.field textarea,.field select{
  font:inherit; color:var(--text); background:var(--bg); border:1px solid var(--line-strong); border-radius:var(--radius-sm);
  padding:10px 12px; min-height:42px; width:100%;
}
.field textarea{ min-height:96px; resize:vertical; }
.field input:focus,.field textarea:focus,.field select:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 22%,transparent); }
.field small{ color:var(--faint); font-size:12px; }
.form__actions{ grid-column:1/-1; display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; }
.notice{ border:1px solid var(--line-strong); border-left:3px solid var(--accent); background:var(--surface-2); border-radius:var(--radius-sm); padding:12px 14px; margin-bottom:18px; }
.notice--bad{ border-left-color:var(--bad); }
.notice--ok{ border-left-color:var(--ok); }
.empty{ padding:36px 18px; text-align:center; color:var(--muted); }

/* ───────── quotation editor ───────── */
.visually-hidden{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; }
.btn--danger{ color:var(--bad); border-color:color-mix(in srgb,var(--bad) 40%,transparent); background:transparent; }
.btn--danger:hover{ background:color-mix(in srgb,var(--bad) 12%,transparent); }
.chip--draft{ color:var(--muted); }
.chip--sent{ color:#7dd3fc; border-color:rgba(125,211,252,.35); }
.chip--accepted{ color:var(--ok); border-color:color-mix(in srgb,var(--ok) 40%,transparent); }

.editor{ display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:18px; align-items:start; }
.editor__side{ display:flex; flex-direction:column; gap:18px; position:sticky; top:18px; }
.editor__foot{ display:flex; gap:10px; justify-content:space-between; flex-wrap:wrap; }
.editor__add{ display:flex; gap:10px; flex-wrap:wrap; padding:16px 18px; border-top:1px solid var(--line); }
.editor__add select{ flex:1 1 260px; min-width:0; }
[data-save-status][data-state="ok"]{ color:var(--ok); }
[data-save-status][data-state="bad"]{ color:var(--bad); }

.editor select,.editor input,.editor textarea{
  font:inherit; color:var(--text); background:var(--bg); border:1px solid var(--line-strong); border-radius:var(--radius-sm);
  padding:8px 10px; min-height:38px; width:100%;
}
.editor textarea{ resize:vertical; line-height:1.45; }
.editor input:focus,.editor textarea:focus,.editor select:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 22%,transparent); }
.editor input[type="checkbox"]{ width:18px; height:18px; min-height:0; padding:0; accent-color:var(--accent); }

.qlines{ list-style:none; margin:0; padding:0; }
.qline{
  display:grid; gap:10px 12px; padding:16px 18px; border-bottom:1px solid var(--line); align-items:start;
  /* Two rows per line: what it is, then what it costs. The description always gets the full width. */
  /* The fields give way before the line spills out of its card (a laptop at 1280 wide with the side column beside it). */
  grid-template-columns:22px minmax(52px,84px) repeat(3,minmax(114px,132px)) minmax(96px,1fr) auto;
  grid-template-areas:
    "pick desc desc desc desc desc acts"
    ".    unit rate disc cad  sum  sum"
    ".    err  err  err  err  err  err";
}
.qline:last-child{ border-bottom:0; }
.qline--bad{ background:color-mix(in srgb,var(--bad) 7%,transparent); }
.qline__pick{ grid-area:pick; padding-top:10px; }
.qline__desc{ grid-area:desc; display:flex; flex-direction:column; gap:6px; min-width:0; }
.qline__title{ font-weight:600 !important; }
.qline__desc textarea{ color:var(--muted); font-size:12.5px; min-height:0; }
.qline__f{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.qline__f span{ font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--faint); font-weight:600; }
.qline__f:nth-of-type(2){ grid-area:unit; } .qline__f:nth-of-type(3){ grid-area:rate; } .qline__f:nth-of-type(4){ grid-area:disc; } .qline__f:nth-of-type(5){ grid-area:cad; }
.qline__f input{ text-align:right; font-variant-numeric:tabular-nums; }
.qline__sum{ grid-area:sum; text-align:right; padding-top:16px; display:flex; flex-direction:column; gap:2px; min-width:0; }
.qline__sub{ font-weight:600; font-size:15px; }
.qline__was{ color:var(--faint); font-size:11.5px; }
.qline__acts{ grid-area:acts; display:flex; gap:4px; padding-top:3px; }
.qline__error{ grid-area:err; color:var(--bad); font-size:12.5px; }
.qline__error:empty{ display:none; }
.icon{ width:32px; height:32px; border-radius:8px; border:1px solid var(--line); background:transparent; color:var(--muted); cursor:pointer; font:inherit; }
.icon:hover:not(:disabled){ color:var(--text); border-color:var(--line-strong); }
.icon:disabled{ opacity:.3; cursor:default; }
.icon--bad:hover:not(:disabled){ color:var(--bad); border-color:color-mix(in srgb,var(--bad) 45%,transparent); }

.totals{ margin:0; padding:6px 18px; }
.totals > div{ display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid var(--line); }
.totals > div:last-child{ border-bottom:0; }
.totals dt{ color:var(--muted); }
.totals dd{ margin:0; font-weight:600; }
.totals__key dd{ font-size:17px; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; line-height:1.3; padding-bottom:.06em; }
.totals__note{ padding:12px 18px 16px; border-top:1px solid var(--line); color:var(--muted); font-size:12.5px; }
.totals__note b{ color:var(--text); font-weight:600; }

.tools{ display:flex; flex-direction:column; gap:14px; }
.tools__row{ display:flex; flex-direction:column; gap:6px; }
.tools__row label{ font-size:12px; font-weight:600; color:var(--muted); }
.tools__row > div{ display:flex; gap:8px; }
.tools__row input{ flex:1; min-width:0; text-align:right; }
.tools .btn{ white-space:nowrap; }

/* Below 1366 (the common laptop) the lines would be squeezed beside the side column: one column instead. */
@media (max-width:1365px){
  .editor{ grid-template-columns:minmax(0,1fr); }
  .editor__side{ position:static; }
}
@media (max-width:760px){
  .qline{
    grid-template-columns:22px repeat(4,minmax(0,1fr));
    grid-template-areas:"pick desc desc desc desc" ". unit rate disc cad" ". sum sum acts acts" ". err err err err";
  }
  .qline__sum{ text-align:left; padding-top:4px; }
  .qline__acts{ justify-content:flex-end; padding-top:4px; }
}
@media (max-width:560px){
  .qline{
    grid-template-columns:22px repeat(2,minmax(0,1fr));
    grid-template-areas:"pick desc desc" ". unit rate" ". disc cad" ". sum acts" ". err err";
  }
}

/* ───────── sending and sent quotations ───────── */
.chip--issued{ color:var(--warn); border-color:color-mix(in srgb,var(--warn) 40%,transparent); }
.chip--expired,.chip--declined,.chip--superseded{ color:var(--faint); }
.steps{ margin:0; padding:14px 18px 16px 38px; display:flex; flex-direction:column; gap:10px; color:var(--muted); }
.steps b{ color:var(--text); font-weight:600; }
.linkbox{ background:var(--bg); border:1px solid var(--line-strong); border-radius:var(--radius-sm); padding:10px 12px; overflow-wrap:anywhere; font-size:13px; }
.linkbox a{ color:var(--text); }
.maillog{ padding:14px 18px; border-bottom:1px solid var(--line); display:flex; flex-direction:column; gap:4px; }
.maillog:last-child{ border-bottom:0; }
.maillog pre{ margin:8px 0 0; padding:12px; background:var(--bg); border:1px solid var(--line); border-radius:var(--radius-sm); white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; font-size:13px; color:var(--muted); }
.notice code{ background:var(--bg); border:1px solid var(--line); border-radius:6px; padding:1px 6px; }
.btn:disabled{ opacity:.45; cursor:not-allowed; }

/* ───────── invoices, plans, the run ───────── */
.chip--overdue{ color:var(--bad); border-color:color-mix(in srgb,var(--bad) 45%,transparent); }
.chip--held,.chip--paused{ color:var(--warn); border-color:color-mix(in srgb,var(--warn) 40%,transparent); }
.chip--ended,.chip--converted{ color:var(--faint); }
.chip--paid,.chip--part_paid,.chip--credited{ color:var(--ok); border-color:color-mix(in srgb,var(--ok) 40%,transparent); }
.totals__warn{ margin:0; padding:0 18px 14px; color:var(--bad); font-size:12.5px; line-height:1.45; }
.totals__warn:empty{ display:none; }
.sub.chip--overdue{ display:inline-block; font-size:11px; border:1px solid; border-radius:99px; padding:1px 7px; margin-top:4px; }
/* plans: no Billed column, so the cost row has one slot fewer */
.qline--nocad{ grid-template-columns:22px 84px 132px 132px minmax(0,1fr) auto; grid-template-areas:"pick desc desc desc desc acts" ". unit rate disc sum sum" ". err err err err err"; }
.settings-pop{ position:relative; }
.settings-pop summary{ list-style:none; cursor:pointer; }
.settings-pop summary::-webkit-details-marker{ display:none; }
.settings-pop__form{ position:absolute; right:0; top:calc(100% + 8px); z-index:20; width:min(520px,90vw); background:var(--surface); border:1px solid var(--line-strong); border-radius:var(--radius); padding:18px; box-shadow:0 18px 50px rgba(0,0,0,.5); }
@media (max-width:760px){
  .qline--nocad{ grid-template-columns:22px repeat(3,minmax(0,1fr)); grid-template-areas:"pick desc desc desc" ". unit rate disc" ". sum sum acts" ". err err err"; }
}

/* ───────── payments, statements, the client page ───────── */
.two-up{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
@media (max-width:860px){ .two-up{ grid-template-columns:minmax(0,1fr); } }
input.alloc{ width:130px; max-width:100%; text-align:right; font:inherit; color:var(--text); background:var(--bg); border:1px solid var(--line-strong); border-radius:var(--radius-sm); padding:7px 10px; font-variant-numeric:tabular-nums; }
input.alloc:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 22%,transparent); }
.period{ display:flex; gap:12px; align-items:end; flex-wrap:wrap; margin-bottom:18px; }
.period label{ display:flex; flex-direction:column; gap:6px; font-size:12px; font-weight:600; color:var(--muted); }
.period input{ font:inherit; color:var(--text); background:var(--bg); border:1px solid var(--line-strong); border-radius:var(--radius-sm); padding:8px 10px; min-height:40px; }
.chip--provisional{ color:var(--warn); }

/* ───────── settings ───────── */
.check{ display:flex; align-items:center; gap:8px; min-height:42px; color:var(--text); }
.check input{ width:18px; height:18px; accent-color:var(--accent); }
.check--inline{ min-height:0; font-size:12.5px; color:var(--muted); }
.field__label{ font-size:12px; font-weight:600; color:var(--muted); }
.fieldset{ border:1px solid var(--line); border-radius:var(--radius-sm); padding:12px 16px 16px; margin:0; }
.fieldset legend{ padding:0 6px; font-weight:600; font-size:13px; }
.fieldset .dim{ font-weight:400; font-size:12px; margin-left:6px; }
.clauses{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.clause{ display:flex; flex-direction:column; gap:6px; }
.clause__head{ display:flex; gap:10px; align-items:center; }
.clause__head input{ flex:1; min-width:0; font-weight:600; }
.clause__acts{ display:flex; gap:6px; align-items:center; }
.clause input,.clause textarea{ font:inherit; color:var(--text); background:var(--bg); border:1px solid var(--line-strong); border-radius:var(--radius-sm); padding:8px 10px; width:100%; }
.clause textarea{ font-size:13px; color:var(--muted); resize:vertical; }
.clause--blank input,.clause--blank textarea{ border-style:dashed; }
.row--off td{ color:var(--faint); }

/* ───────── plain pages ───────── */
.plain{ display:grid; place-items:center; min-height:100svh; padding:24px; }
.plain__box{ max-width:440px; text-align:center; }
.plain__status{ font-size:64px; font-weight:700; line-height:1.1; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; padding-bottom:.08em; }
.plain__box h1{ font-size:20px; margin:8px 0; }
.plain__box p:last-child{ color:var(--muted); }

/* ───────── small screens ───────── */
@media (max-width:860px){
  .shell{ grid-template-columns:minmax(0,1fr); grid-template-rows:auto 1fr; } /* spare height goes to the page, not the menu bar */
  .side{ position:static; height:auto; padding:12px var(--pad); border-right:0; border-bottom:1px solid var(--line); }
  .side__brand{ padding:0 0 10px; }
  .side__nav{ flex:none; flex-direction:row; align-items:center; gap:6px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
  .side__nav::-webkit-scrollbar{ display:none; }
  .side__group{ display:flex; gap:6px; }
  .side__label,.side__foot,.side__link--soon{ display:none; }
  .side__link{ white-space:nowrap; border:1px solid var(--line); border-radius:99px; padding:6px 12px; }
  .side__link[aria-current="page"]::before{ display:none; }
  .form{ grid-template-columns:minmax(0,1fr); }
  th,td{ padding:10px 12px; }
  .hide-sm{ display:none !important; }
  .show-sm{ display:block !important; }
}
@media (prefers-reduced-motion:reduce){ *{ transition:none !important; } }

/* ── the content calendar ── */
.cal{ table-layout:fixed; }
.cal th{ text-align:left; font-size:11px; }
.cal td{ vertical-align:top; height:92px; padding:6px 6px 8px; border-top:1px solid rgba(255,255,255,.08); }
.cal td.cal__off{ background:rgba(255,255,255,.02); }
.cal td.cal__today .cal__day{ color:var(--accent); }
.cal__day{ margin:0 0 4px; font-size:12px; font-weight:700; opacity:.8; }
.cal__post{ display:block; margin:0 0 4px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-decoration:none; font-size:11.5px; }
.grid-2{ display:grid; gap:16px; }
@media (min-width:900px){ .grid-2{ grid-template-columns:1fr 1fr; } }
.checks{ display:flex; flex-wrap:wrap; gap:6px 14px; }
.assets{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
.asset{ margin:0; }
.asset img,.asset video{ width:100%; border-radius:8px; display:block; background:#000; }
.asset figcaption{ display:flex; justify-content:space-between; align-items:center; gap:6px; margin-top:4px; }
.caption{ white-space:pre-wrap; }
.thread{ list-style:none; margin:0; padding:0; }
.thread li{ padding:10px 12px; border-left:3px solid rgba(255,255,255,.15); margin-bottom:8px; background:rgba(255,255,255,.03); border-radius:0 8px 8px 0; }
.thread li.thread__client{ border-left-color:var(--accent); }
.thread__who{ margin:0 0 4px; font-size:13px; }

/* ── reporting ── */
.trend--up{ color:#3ddc97; }
.trend--down{ color:#ff7a7a; }
.trend--flat{ color:var(--muted); }
.btn--disabled{ opacity:.45; pointer-events:none; }
.source-form{ border:1px solid var(--line); border-radius:12px; padding:14px; align-content:start; }

/* ───────── the door (Business Buddy's sign-in pages) and support sessions ───────── */
.door{ display:grid; place-items:center; min-height:100svh; padding:24px 16px; }
.door__box{ width:100%; max-width:420px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:28px 24px 22px; }
.door__app{ font-size:12px; letter-spacing:.14em; text-transform:uppercase; font-weight:700; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; margin-bottom:14px; }
.door__box h1{ font-size:22px; margin-bottom:8px; }
.door__box .dim{ color:var(--muted); margin-bottom:16px; }
.door__box .notice{ margin:0 0 14px; }
.door__foot{ margin-top:18px; color:var(--muted); font-size:13px; }
.door__foot a{ color:var(--muted); }
.door__text p{ margin-bottom:12px; color:var(--text); }
.form--stack{ display:flex; flex-direction:column; gap:14px; }
.form--stack .form__actions{ margin-top:2px; }
.side__out{ display:inline; margin-left:8px; }
.linkbtn{ background:none; border:0; padding:0; color:var(--muted); font:inherit; font-size:12px; text-decoration:underline; cursor:pointer; }
.linkbtn:hover{ color:var(--text); }
.support{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; background:color-mix(in srgb,var(--warn) 14%,var(--surface)); border:1px solid color-mix(in srgb,var(--warn) 50%,transparent); border-radius:var(--radius-sm); padding:12px 14px; margin:0 0 18px; }
.door__logo{ width:200px; height:auto; display:block; margin:0 0 18px; }
/* The support banner's red cousin: the subscription banner when the account is read-only. */
.support--stop{ background:color-mix(in srgb,var(--bad) 14%,var(--surface)); border-color:color-mix(in srgb,var(--bad) 50%,transparent); }

/* The dashboard is drawn for the white portal page; inside the dark cockpit it sits in a light host box. */
.dash-host{ background:#f5f5f7; color:#0b0b0d; border-radius:var(--radius-sm); }
