/* ==========================================================================
   Sound Software · Client Portal skin (Sept 2026 redesign)
   Loads AFTER domain-style.css, which carries the brand tokens, Rajdhani and
   the ds-* patterns (typed field, landing cards, ledger, stage, buttons).
   This file adds the portal shell and in-app surfaces:

     1  Tokens ......... --nav-* / --card-* / --table-* / --tile-* copied
                         VERBATIM from BrandSystem/tokens.css §7 & §9,
                         plus a few portal-only aliases
     2  Shell .......... .portal  .p-side (grouped-card sidebar)  .p-top  .p-main
     3  Page furniture . .p-title  .p-head  .p-fab  toast
     4  KPI tiles ...... .tile
     5  Section cards .. .card  .c-head (3 header shades)  .c-body
     6  Tables ......... .p-table  money cells  .btn-pdf
     7  Pills & tags ... .pill  .p-tag  badge alert
     8  Feature list ... .feat-row (service plan)
     9  Lists .......... .req (request rows)  .dom-row (domains & email)
    10  Meter .......... .meter (billing threshold)
    11  In-app forms ... .f-field / .f-input (brand §5 — quiet, not the stage field)
    12  Stages ......... login / service-request layout on .ds-stage
    13  Style guide .... swatches, spec rows (reference tab only)
    14  Mockup chrome .. .mock-* (review shell — NOT part of the portal design)
    15  Responsive + reduced motion

   Theme: light is default. Set data-theme="dark" on the .portal wrapper (the
   real app already has a moon toggle). Stages are always dark — no theme attr.
   ========================================================================== */


/* 0  RESET ================================================================= */
/* The whole skin is measured border-box. The real portal must carry this (or
   its own equivalent reset) or every padded 100%-width control overflows. */
*,*::before,*::after{box-sizing:border-box}


/* 1  TOKENS ================================================================ */
/* Values verbatim from BrandSystem/tokens.css (2026-09-10), §7 nav + §9 dashboard. */

:root, [data-theme="light"]{
  --nav-bg:#EEF1F5;
  --nav-group-bg:#FFFFFF;
  --nav-group-border:#E1E5EB;
  --nav-group-radius:8px;
  --nav-group-gap:12px;
  --nav-section-label:#0E3F5A;
  --nav-item:#262C36;
  --nav-item-muted:#5A6473;
  --nav-item-hover-bg:#E8F1F7;
  --nav-item-hover-text:#0E3F5A;
  --nav-item-active-bg:#155A80;
  --nav-item-active-text:#FFFFFF;
  --nav-icon:#5A6473;
  --nav-icon-active:#FFFFFF;
  --nav-badge-bg:#1391F8;
  --nav-badge-text:#FFFFFF;
  --nav-tree-line:#CDD3DC;
  --nav-width:264px;

  --card-bg:#FFFFFF;
  --card-border:#E1E5EB;
  --card-radius:8px;
  --card-shadow:0 1px 2px rgba(17,20,24,.06);
  --card-header-bg:#0E3F5A;
  --card-header-bg-2:#4D4E50;
  --card-header-bg-3:#111418;
  --card-header-text:#FFFFFF;
  --tile-bg:#FFFFFF;
  --tile-border:#E1E5EB;
  --tile-label:#5A6473;
  --tile-value:#0E3F5A;
  --tile-accent:#155A80;
  --tile-hover-bg:#0E3F5A;
  --tile-hover-text:#FFFFFF;
  --table-header-bg:#EEF1F5;
  --table-header-text:#5A6473;
  --table-stripe:#F7F8FA;
  --table-row-hover:#E8F1F7;
  --table-border:#E1E5EB;

  /* portal aliases (resolve per theme; used by the shell) */
  --p-top-bg:#FFFFFF;
  --p-top-border:#E1E5EB;
  --p-scrim:rgba(17,20,24,.45);
  --pill-ok-bg:rgba(30,166,114,.13);   --pill-ok-ink:#12774F;
  --pill-warn-bg:rgba(242,164,19,.16); --pill-warn-ink:#855600;
  --pill-err-bg:rgba(220,53,69,.11);   --pill-err-ink:#B42331;
  --pill-info-bg:rgba(19,145,248,.13); --pill-info-ink:#155A80;
  --pill-quiet-bg:#EEF1F5;             --pill-quiet-ink:#5A6473;
}

[data-theme="dark"]{
  --nav-bg:#0B0E12;
  --nav-group-bg:#161A20;
  --nav-group-border:#242A33;
  --nav-section-label:#4AA8FA;
  --nav-item:#E7ECF2;
  --nav-item-muted:#9AA3B0;
  --nav-item-hover-bg:rgba(19,145,248,.14);
  --nav-item-hover-text:#4AA8FA;
  --nav-item-active-bg:#155A80;
  --nav-item-active-text:#FFFFFF;
  --nav-icon:#9AA3B0;
  --nav-icon-active:#FFFFFF;
  --nav-badge-bg:#1391F8;
  --nav-badge-text:#FFFFFF;
  --nav-tree-line:#2A313A;

  --card-bg:#161A20;
  --card-border:#242A33;
  --card-shadow:0 1px 2px rgba(0,0,0,.4);
  --card-header-bg:#0E3F5A;
  --card-header-bg-2:#3A3B3E;
  --card-header-bg-3:#262C36;
  --card-header-text:#FFFFFF;
  --tile-bg:#161A20;
  --tile-border:#242A33;
  --tile-label:#9AA3B0;
  --tile-value:#4AA8FA;
  --tile-accent:#1391F8;
  --tile-hover-bg:#0E3F5A;
  --tile-hover-text:#FFFFFF;
  --table-header-bg:#1B2027;
  --table-header-text:#9AA3B0;
  --table-stripe:#12161B;
  --table-row-hover:rgba(19,145,248,.14);
  --table-border:#242A33;

  --p-top-bg:#0B0E12;
  --p-top-border:#242A33;
  --p-scrim:rgba(0,0,0,.6);
  --pill-ok-bg:rgba(60,203,146,.16);   --pill-ok-ink:#3CCB92;
  --pill-warn-bg:rgba(242,164,19,.16); --pill-warn-ink:#F2A413;
  --pill-err-bg:rgba(255,123,135,.14); --pill-err-ink:#FF7B87;
  --pill-info-bg:rgba(19,145,248,.18); --pill-info-ink:#4AA8FA;
  --pill-quiet-bg:#1B2027;             --pill-quiet-ink:#9AA3B0;
}


/* 2  SHELL ================================================================= */

.portal{
  display:flex;min-height:100%;
  background:var(--ds-page);color:var(--ds-ink);
  font-family:var(--font-body);font-size:1.0625rem;line-height:1.5;letter-spacing:.015em;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
}
.portal :focus{outline:none}
.portal :focus-visible{outline:2px solid var(--ds-focus);outline-offset:2px;border-radius:var(--radius-sm)}

/* sidebar — the brand's grouped-card layout (brand.md §7) */
.p-side{
  width:var(--nav-width);flex:0 0 var(--nav-width);
  background:var(--nav-bg);
  padding:12px;
  display:flex;flex-direction:column;gap:var(--nav-group-gap);
  border-right:1px solid var(--nav-group-border);
}
.sb-head{display:flex;align-items:center;gap:12px;padding:10px 10px 4px}
.sb-head .plate{background:#fff;border:1px solid var(--nav-group-border);border-radius:var(--radius-sm);padding:5px 8px;display:flex;flex:none}
.sb-head .plate img{height:22px;display:block}
[data-theme="dark"] .sb-head .plate{border-color:transparent}
.sb-head .sb-title{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--nav-item-muted);white-space:nowrap}

.sb-group{
  background:var(--nav-group-bg);border:1px solid var(--nav-group-border);
  border-radius:var(--nav-group-radius);padding:8px;overflow:hidden;
}
/* section title — the same "separation break" as the dashboard section cards:
   a primary-dark band with white text, full bleed across its card */
.sb-label{
  margin:-8px -8px 8px;padding:8px 14px;
  background:var(--card-header-bg);color:#fff;
  font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.14em;
}
.sb-item{
  display:flex;align-items:center;gap:12px;width:100%;
  padding:9px 12px;border:0;border-radius:var(--radius-sm);margin:1px 0;
  background:none;text-align:left;text-decoration:none;cursor:pointer;
  color:var(--nav-item);font-family:var(--font-body);font-size:.9375rem;font-weight:500;letter-spacing:.015em;
  transition:background var(--transition-base,180ms ease),color var(--transition-base,180ms ease);
}
.sb-item .ic{width:18px;height:18px;flex:0 0 18px;color:var(--nav-icon);stroke-width:1.7;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;transition:color 180ms ease}
.sb-item:hover{background:var(--nav-item-hover-bg);color:var(--nav-item-hover-text)}
.sb-item:hover .ic{color:currentColor}
.sb-item.is-active{background:var(--nav-item-active-bg);color:var(--nav-item-active-text);font-weight:600}
.sb-item.is-active .ic{color:var(--nav-icon-active)}
.sb-chev{margin-left:auto;width:14px;height:14px;flex:none;color:var(--nav-icon);stroke-width:2;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;opacity:.7;transition:transform .25s var(--ds-ease-quart)}
.sb-item[aria-expanded="true"] .sb-chev{transform:rotate(180deg)}
.sb-item.is-active .sb-chev{color:var(--nav-icon-active)}
/* Counts are quiet metadata; colour in the menu is reserved for something that
   needs you. Red fill = attention (e.g. billing threshold). Accent fill is kept
   for a genuinely new/unread state (.is-new), not for ordinary counts. */
.sb-badge{
  margin-left:auto;flex:none;
  background:var(--pill-quiet-bg);color:var(--nav-item-muted);
  font-size:11px;font-weight:700;line-height:1;letter-spacing:.04em;
  padding:3px 8px;border-radius:var(--radius-full);
  font-variant-numeric:tabular-nums;
}
.sb-badge.is-new{background:var(--nav-badge-bg);color:var(--nav-badge-text);font-weight:800}
.sb-badge.is-alert{background:var(--color-error);color:#fff;font-weight:800}
.sb-item.is-active .sb-badge{background:rgba(255,255,255,.22);color:#fff}
.sb-item.is-active .sb-badge.is-alert{background:var(--color-error)}
.sb-chev + .sb-badge,.sb-badge + .sb-chev{margin-left:8px}

.sb-children{position:relative;margin:2px 0 6px 26px;padding-left:14px;display:none}
.sb-children.is-open{display:block}
.sb-children::before{content:"";position:absolute;left:0;top:2px;bottom:8px;width:2px;background:var(--nav-tree-line)}
.sb-child{
  display:flex;align-items:center;gap:10px;width:100%;
  padding:7px 12px;border:0;border-radius:var(--radius-sm);
  background:none;text-align:left;text-decoration:none;cursor:pointer;
  color:var(--nav-item-muted);font-family:var(--font-body);font-size:.9375rem;font-weight:400;letter-spacing:.015em;
  transition:background 180ms ease,color 180ms ease;
}
.sb-child:hover{background:var(--nav-item-hover-bg);color:var(--nav-item-hover-text)}
.sb-child.is-active{background:var(--nav-item-active-bg);color:var(--nav-item-active-text);font-weight:600}
.sb-child .sb-badge{margin-left:auto}
.sb-child.is-active .sb-badge{background:rgba(255,255,255,.22);color:#fff}
.sb-child.is-active .sb-badge.is-alert{background:var(--color-error)}

/* utility cluster (help, install, sign out) — no card, muted: the menu's third
   tier, so destination groups read as the important ones */
.sb-group--quiet{background:transparent;border-color:transparent;padding:2px 10px;margin-top:auto}
.sb-group--quiet .sb-item{color:var(--nav-item-muted);font-weight:500}
.sb-group--quiet .sb-item:hover{color:var(--nav-item-hover-text);background:var(--nav-item-hover-bg)}

/* topbar */
.p-body{flex:1;min-width:0;display:flex;flex-direction:column}
.p-top{
  position:sticky;top:env(safe-area-inset-top,0px);z-index:20; /* real app: top:0 (no review bar) */
  display:flex;align-items:center;gap:14px;
  padding:10px clamp(16px,3vw,32px);
  background:var(--p-top-bg);border-bottom:1px solid var(--p-top-border);
}
.p-burger{display:none;width:40px;height:40px;flex:none;border:0;border-radius:var(--radius-sm);background:none;color:var(--ds-ink);cursor:pointer;place-items:center}
.p-burger .ic{width:22px;height:22px;stroke-width:1.8;fill:none;stroke:currentColor;stroke-linecap:round}
.p-top-spacer{flex:1}
.p-client{display:flex;align-items:center;gap:10px;min-width:0}
.p-client-mark{
  width:30px;height:30px;flex:none;border-radius:var(--radius-sm);
  display:grid;place-items:center;
  background:var(--color-primary-dark);color:#fff;
  font-size:.75rem;font-weight:700;letter-spacing:.06em;
}
.p-client-name{font-size:.9375rem;font-weight:600;color:var(--ds-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p-top-sep{width:1px;height:22px;background:var(--p-top-border);flex:none}
.p-top-link{color:var(--ds-accent-ink);font-size:.9375rem;font-weight:600;text-decoration:none}
.p-top-link:hover{color:var(--ds-ink-strong);text-decoration:underline;text-underline-offset:.18em}
.p-icon-btn{
  width:38px;height:38px;flex:none;display:grid;place-items:center;
  border:1px solid var(--p-top-border);border-radius:var(--radius-sm);
  background:none;color:var(--ds-ink-muted);cursor:pointer;
  transition:color 180ms ease,border-color 180ms ease,background 180ms ease;
}
.p-icon-btn:hover{color:var(--ds-accent-ink);border-color:var(--ds-accent-ink);background:var(--ds-ghost-hover)}
.p-icon-btn .ic{width:19px;height:19px;stroke-width:1.7;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}
.p-icon-btn .ic[hidden]{display:none}

/* main column */
.p-main{flex:1;padding:clamp(20px,3.4vw,36px) clamp(16px,3vw,32px) 96px}
.p-page{max-width:1160px;margin:0 auto}

.p-page > * + *{margin-top:20px}
.p-scrim{display:none}

/* arrivals play once per page; after that the page is settled */
.is-settled .ds-land,.is-settled .ds-row.is-new{animation:none}
.is-settled .ds-sweep::after,.is-settled .ds-row--ok.is-new::after{animation:none;opacity:0}


/* 3  PAGE FURNITURE ======================================================== */

.p-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:4px}
.p-title{
  margin:0;font-family:var(--font-heading);
  font-size:2rem;font-weight:700;line-height:1.05;letter-spacing:.01em;
  color:var(--ds-ink-strong);text-wrap:balance;
}
.p-sub{margin:4px 0 0;font-size:1.0625rem;color:var(--ds-ink-muted)}
.p-head-actions{display:flex;align-items:center;gap:10px;flex:none}

/* smaller in-app buttons (the ds-btn scale is sized for stages) */
.p-btn{min-height:42px;padding:8px 18px;font-size:1.0625rem;letter-spacing:.03em}
.p-btn.ds-btn--accent{font-size:1.1875rem}  /* white on accent needs 19px bold */

/* the floating request button — one global action, primary (accent is reserved
   for each screen's own next action) */
.p-fab{
  position:fixed;right:22px;bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:30;
  display:inline-flex;align-items:center;gap:9px;
  min-height:46px;padding:9px 20px;
  background:var(--color-primary);color:#fff;
  border:1px solid rgba(255,255,255,.16);border-radius:var(--radius-full);
  font-family:var(--font-body);font-size:1.0625rem;font-weight:700;letter-spacing:.03em;
  cursor:pointer;box-shadow:0 8px 22px -8px rgba(14,63,90,.55);
  transition:background 180ms ease,box-shadow .3s var(--ds-ease-out),transform 180ms var(--ds-ease-quart);
}
.p-fab:hover{background:var(--color-primary-dark);box-shadow:0 10px 26px -8px rgba(var(--ds-glow),.5)}
.p-fab:active{transform:translateY(1px)}
.p-fab .ic{width:18px;height:18px;stroke-width:2;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}

/* toast for mockup-only destinations */
.p-toast{
  position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));z-index:60;translate:-50% 0;
  max-width:min(92vw,480px);padding:11px 20px;
  background:var(--color-primary-dark);color:#fff;
  border-radius:var(--radius-full);box-shadow:0 12px 30px -10px rgba(0,0,0,.5);
  font-family:var(--font-body);font-size:1rem;font-weight:600;letter-spacing:.02em;text-align:center;
  opacity:0;pointer-events:none;transition:opacity .25s ease;
}
.p-toast.is-on{opacity:1}


/* 4  KPI TILES ============================================================= */

.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:14px}
.tile{
  display:flex;align-items:flex-start;gap:14px;
  background:var(--tile-bg);border:1px solid var(--tile-border);
  border-radius:var(--card-radius);padding:16px 18px;min-height:92px;
  box-shadow:var(--card-shadow);
  transition:background 180ms ease,border-color 180ms ease,box-shadow .3s var(--ds-ease-out);
}
.tile-ic{
  width:42px;height:42px;flex:none;border-radius:var(--radius-md);
  display:grid;place-items:center;margin-top:1px;
  background:var(--ds-ghost-hover);color:var(--ds-accent-ink);
  transition:background 180ms ease,color 180ms ease;
}
.tile-ic .ic{width:21px;height:21px;stroke-width:1.7;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}
.tile-txt{min-width:0}
.t-label,.t-value,.t-note{display:block}
.t-label{font-size:.75rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--tile-label);transition:color 180ms ease}
.t-value{
  margin-top:2px;font-family:var(--font-heading);
  font-size:1.75rem;font-weight:700;line-height:1;color:var(--tile-value);
  font-variant-numeric:tabular-nums;transition:color 180ms ease;
  overflow-wrap:anywhere;
}
.t-value .t-ok{color:var(--ds-ok-ink)}
.t-value .t-warn{color:var(--ds-warn-ink)}
.t-note{margin-top:3px;font-size:.875rem;color:var(--ds-ink-muted);transition:color 180ms ease}
.tile:hover{background:var(--tile-hover-bg);border-color:var(--tile-hover-bg);box-shadow:var(--shadow-lg,0 8px 24px rgba(17,20,24,.12))}
.tile:hover .t-label,.tile:hover .t-value,.tile:hover .t-note,
.tile:hover .t-value .t-ok,.tile:hover .t-value .t-warn{color:var(--tile-hover-text)}
.tile:hover .tile-ic{background:rgba(255,255,255,.14);color:#fff}


/* 5  SECTION CARDS ========================================================= */

.card{
  background:var(--card-bg);border:1px solid var(--card-border);
  border-radius:var(--card-radius);overflow:hidden;box-shadow:var(--card-shadow);
}
.c-head{
  display:flex;align-items:center;gap:12px;
  padding:11px 18px;
  background:var(--card-header-bg);color:var(--card-header-text);
  font-family:var(--font-heading);font-size:1.0625rem;font-weight:700;letter-spacing:.03em;
}
.card.shade-2 > .c-head{background:var(--card-header-bg-2)}
.card.shade-3 > .c-head{background:var(--card-header-bg-3)}
.c-head .ic{width:18px;height:18px;flex:none;stroke-width:1.7;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
.c-tag{
  font-size:.6875rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  padding:3px 9px;border-radius:var(--radius-full);
  background:rgba(255,255,255,.2);color:var(--card-header-text);
}
.c-spacer{flex:1}
.c-head-link{color:#fff;font-size:.9375rem;font-weight:600;font-family:var(--font-body);text-decoration:underline;text-decoration-color:rgba(255,255,255,.4);text-underline-offset:.2em}
.c-head-link:hover{text-decoration-color:#fff}
.c-body{padding:18px}
.c-body.flush{padding:0}
.c-lede{margin:0 0 8px;color:var(--ds-ink-soft)}
.c-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-top:1px solid var(--card-border);font-size:.9375rem;color:var(--ds-ink-muted)}
.card .ds-link{font-weight:600}

.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:20px}


/* 6  TABLES ================================================================ */

.p-scroll{overflow-x:auto}
.p-table{width:100%;border-collapse:collapse;font-size:.9375rem;letter-spacing:.01em}
.p-table thead th{
  text-align:left;padding:10px 16px;
  background:var(--table-header-bg);color:var(--table-header-text);
  font-size:.6875rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;
  border-bottom:1px solid var(--table-border);white-space:nowrap;
}
.p-table tbody td{padding:11px 16px;border-bottom:1px solid var(--table-border);vertical-align:middle}
.p-table tbody tr:last-child td{border-bottom:0}
.p-table tbody tr:nth-child(even){background:var(--table-stripe)}
.p-table tbody tr:hover{background:var(--table-row-hover)}
.p-table tfoot td{padding:13px 16px;border-top:2px solid var(--ds-ink-strong)}
.p-table .num,.p-table .m,.p-table .m-strong{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.p-table .m{font-weight:600;color:var(--ds-ink)}
.p-table .m-strong{font-weight:700;font-size:1.0625rem;color:var(--ds-ink-strong)}
.p-table .cell-muted{color:var(--ds-ink-muted);white-space:nowrap}
.p-table a{color:var(--ds-accent-ink);font-weight:600;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.18em}
.p-table a:hover{color:var(--ds-ink-strong)}
.btn-pdf{
  display:inline-flex;align-items:center;gap:6px;
  min-height:32px;padding:3px 12px;
  border:1px solid var(--ds-ghost-line);border-radius:var(--radius-md);
  background:none;color:var(--ds-accent-ink);
  font-family:var(--font-body);font-size:.875rem;font-weight:700;letter-spacing:.05em;cursor:pointer;
  transition:background 180ms ease,color 180ms ease,border-color 180ms ease;
}
.btn-pdf:hover{background:var(--ds-ghost-hover);border-color:var(--ds-accent-ink);color:var(--ds-ink-strong)}
.btn-pdf .ic{width:14px;height:14px;stroke-width:2;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}


/* 7  PILLS & TAGS ========================================================== */
/* Status is never colour alone — every pill carries a word (and reads at AA). */

.pill{
  display:inline-flex;align-items:center;gap:6px;
  min-height:24px;padding:2px 11px;border-radius:var(--radius-full);
  font-size:.8125rem;font-weight:700;letter-spacing:.05em;white-space:nowrap;
}
.pill::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.pill--ok{background:var(--pill-ok-bg);color:var(--pill-ok-ink)}
.pill--warn{background:var(--pill-warn-bg);color:var(--pill-warn-ink)}
.pill--err{background:var(--pill-err-bg);color:var(--pill-err-ink)}
.pill--info{background:var(--pill-info-bg);color:var(--pill-info-ink)}
.pill--quiet{background:var(--pill-quiet-bg);color:var(--pill-quiet-ink)}
.pill--quiet::before{opacity:.5}

.p-tag{
  display:inline-flex;align-items:center;
  min-height:24px;padding:1px 10px 0;border:1px solid var(--ds-line-strong);border-radius:var(--radius-full);
  color:var(--ds-ink-muted);font-size:.75rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;white-space:nowrap;
}


/* 8  FEATURE LIST (service plan) =========================================== */

.feat-row{
  display:grid;grid-template-columns:26px minmax(0,1fr) auto;column-gap:14px;align-items:center;
  padding:13px 0;border-bottom:1px solid var(--card-border);
}
.feat-row:last-child{border-bottom:0}
.feat-ic{width:24px;height:24px;border-radius:50%;display:grid;place-items:center}
.feat-ic .ic{width:14px;height:14px;stroke-width:2.4;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}
.feat-row.is-on .feat-ic{background:var(--pill-ok-bg);color:var(--ds-ok-ink)}
.feat-row.is-off .feat-ic{background:var(--pill-quiet-bg);color:var(--ds-ink-muted)}
.feat-name{font-size:1.0625rem;font-weight:600;color:var(--ds-ink)}
.feat-row.is-off .feat-name{color:var(--ds-ink-muted);font-weight:500}
.feat-note{grid-column:2;font-size:.9375rem;color:var(--ds-ink-muted);margin-top:1px}
.feat-cta{grid-row:1;grid-column:3;align-self:center;font-size:.9375rem;white-space:nowrap}


/* 9  LISTS ================================================================= */

/* request rows — land like ds cards, link out like list items */
.req{
  position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;column-gap:16px;
  padding:14px 16px;margin-top:10px;
  background:var(--ds-panel);border:1px solid var(--ds-line);border-radius:var(--card-radius);
  box-shadow:var(--ds-shadow-rest);
  text-decoration:none;color:var(--ds-ink);cursor:pointer;
  transition:border-color .2s ease,background .25s ease,box-shadow .4s var(--ds-ease-out);
}
.req:first-child{margin-top:0}
.req:hover{border-color:var(--ds-hover-line);background:var(--ds-panel-hover);box-shadow:var(--ds-shadow-hover)}
.req-main{min-width:0}
.req-title{display:block;font-size:1.125rem;font-weight:600;line-height:1.25;color:var(--ds-ink-strong);overflow-wrap:anywhere}
.req-meta{display:block;margin-top:2px;font-size:.9375rem;color:var(--ds-ink-muted)}
.req-side{display:flex;align-items:center;gap:8px;flex:none}
.req-chev{width:16px;height:16px;flex:none;color:var(--ds-ink-muted);stroke-width:2;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;transition:color 180ms ease,transform .25s var(--ds-ease-quart)}
.req:hover .req-chev{color:var(--ds-accent-ink);transform:translateX(3px)}
.req.is-open-item{border-color:rgba(var(--ds-glow),.45)}

/* domains & email rows */
.dom-row{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:13px 0;border-bottom:1px solid var(--card-border);
}
.dom-row:last-child{border-bottom:0}
.dom-name{font-size:1.0625rem;font-weight:600;color:var(--ds-ink)}
.dom-quiet{
  background:none;border:0;padding:2px 0;cursor:pointer;
  color:var(--ds-ink-muted);font-family:var(--font-body);font-size:.9375rem;font-weight:600;
  text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.18em;
  transition:color 180ms ease;
}
.dom-quiet:hover{color:var(--ds-err-ink)}


/* 10  METER (billing threshold) ============================================ */

.meter-head{display:flex;align-items:baseline;justify-content:space-between;gap:14px;flex-wrap:wrap}
.meter-title{font-family:var(--font-heading);font-size:1.0625rem;font-weight:700;color:var(--ds-ink-strong)}
.meter-figure{font-family:var(--font-heading);font-size:1.375rem;font-weight:700;color:var(--ds-ink-strong);font-variant-numeric:tabular-nums}
.meter-figure small{font-size:1rem;font-weight:500;color:var(--ds-ink-muted)}
.meter{position:relative;height:10px;margin-top:10px;border-radius:var(--radius-full);background:var(--pill-quiet-bg);overflow:hidden}
.meter-fill{
  position:absolute;inset:0 auto 0 0;width:0;border-radius:inherit;
  background:var(--color-accent);
  transition:width .9s var(--ds-ease-out),background .3s ease;
}
.meter.is-warn .meter-fill{background:var(--color-warning)}
.meter.is-err .meter-fill{background:var(--color-error)}
.meter-notes{display:flex;justify-content:space-between;gap:14px;margin-top:8px;font-size:.9375rem;color:var(--ds-ink-muted);flex-wrap:wrap}
.meter-alert{display:inline-flex;align-items:center;gap:6px;font-weight:700;color:var(--ds-err-ink)}
.meter-alert .ic{width:16px;height:16px;stroke-width:2;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}


/* 11  IN-APP FORMS ========================================================= */
/* Brand §5: quiet fields for ordinary in-app forms. The big ds-field stays on
   stages and single-field heroes. */

.f-grid{display:grid;gap:14px 16px;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
.f-field{display:block;min-width:0}
.f-field.wide{grid-column:1 / -1}
.f-label{display:block;margin-bottom:6px;font-size:.8125rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--ds-ink-muted)}
.f-input{
  width:100%;min-height:44px;padding:9px 13px;
  background:var(--ds-field-bg);color:var(--ds-ink);
  border:1px solid var(--ds-control-line);border-radius:var(--radius-sm);
  font-family:var(--font-body);font-size:1.0625rem;font-weight:500;letter-spacing:.015em;
  transition:border-color .2s ease,box-shadow .25s var(--ds-ease-out);
}
.f-input::placeholder{color:var(--ds-placeholder);font-weight:400}
.f-input:hover{border-color:var(--ds-control-line-hover)}
.f-input:focus-visible{outline:none;border-color:var(--ds-select-line);box-shadow:0 0 0 2px rgba(var(--ds-glow),.28)}
textarea.f-input{min-height:110px;resize:vertical;line-height:1.5}


/* 12  STAGES =============================================================== */

.stage-screen{position:relative;min-height:100vh;display:grid;place-items:center;padding:clamp(24px,5vh,64px) 16px}
.stage-card{width:min(100%,430px)}
.stage-card--wide{width:min(100%,640px)}

/* the lit card interior */
.auth-body{padding:clamp(22px,4vw,32px) clamp(22px,4.4vw,34px) clamp(24px,4vw,30px)}
.auth-logo{display:block;margin:2px auto 4px;width:min(64%,196px)}
.auth-sub{margin:10px 0 0;text-align:center;font-size:1rem;color:var(--ds-lit-muted)}
.auth-fields{display:grid;gap:16px;margin-top:20px}
.auth-links{margin:14px 0 0;text-align:center}
.auth-div{display:flex;align-items:center;gap:12px;margin:20px 0 14px;color:var(--ds-lit-muted);font-size:.875rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase}
.auth-div::before,.auth-div::after{content:"";flex:1;height:1px;background:var(--ds-lit-line)}
.auth-alt{text-align:center}
.auth-alt p{margin:0 0 10px;color:var(--ds-lit-muted);font-size:1rem}
.stage-foot{margin:18px 0 0;text-align:center;font-size:.9375rem;color:#9AA3B0}
.stage-foot a{color:#4AA8FA;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.18em}
.stage-foot a:hover{color:#fff}

/* fields sitting on the paper-white card read the light palette on their own
   (domain-style handles this); size them between compact and standard */
.stage-card .ds-field{height:54px}
.stage-card .ds-label{font-size:.8125rem;margin-bottom:8px;color:var(--ds-lit-muted)}
.stage-card .ds-input{font-size:1.125rem}
.stage-card .ds-hint{font-size:.9375rem;margin-top:8px}
.stage-card select.ds-input{appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235A6473' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");background-repeat:no-repeat;background-position:right 4px center;padding-right:26px;cursor:pointer}

/* form grid inside the request card */
.rq-grid{display:grid;gap:15px 14px;grid-template-columns:1fr 1fr;margin-top:22px}
.rq-grid > .full{grid-column:1 / -1}
@media (max-width:560px){.rq-grid{grid-template-columns:1fr}}

/* reminders strip (dashboard) — one quiet utility row */
.remind{
  display:flex;align-items:center;gap:11px;
  padding:11px 16px;
  background:var(--card-bg);border:1px solid var(--card-border);
  border-radius:var(--card-radius);box-shadow:var(--card-shadow);
  font-size:.9375rem;color:var(--ds-ink-muted);
}
.remind .ic{width:17px;height:17px;flex:none;color:var(--ds-accent-ink);stroke-width:1.7;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}
.remind b{font-weight:700;color:var(--ds-ink)}
.remind .ds-link{margin-left:auto;font-weight:600;white-space:nowrap}

/* date-range filter row — controls share one bottom edge */
.filter-bar{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
.filter-bar .f-field{width:150px}
.filter-bar .ds-btn{min-height:44px}

/* quiet summary card (statement) — the ledger anatomy at section-card volume:
   no glow, card shadow, type scaled to sit beside a table */
.p-summary-col::before{content:none}
.p-summary,.p-summary.is-live{box-shadow:var(--card-shadow);border:1px solid var(--card-border);border-radius:var(--card-radius)}
.p-summary .ds-ledger-bar--title{padding:11px 18px 10px}
.p-summary .ds-ledger-bar-label{font-size:.8125rem;letter-spacing:.12em}
.p-summary .ds-ledger-bar-meta{font-size:.875rem}
.p-summary .ds-ledger-body{padding:16px 18px 18px}
.p-summary .ds-ledger-title{font-size:1.125rem}
.p-summary .ds-sums{margin-top:10px;gap:5px}
.p-summary .ds-sum{font-size:.9375rem}
.p-summary .ds-total{margin-top:14px}
.p-summary .ds-sums + .ds-total{margin-top:10px;padding-top:11px}
.p-summary .ds-total-label{font-size:.9375rem;font-weight:600;padding-bottom:4px}
.p-summary .ds-total-amount{font-size:1.75rem}
.p-summary .ds-total-note{font-size:.8125rem;margin-top:4px}
.p-summary .ds-btn--lg{min-height:44px;margin-top:16px;font-size:1.0625rem;letter-spacing:.03em}
.p-summary .ds-ledger-hint{font-size:.8125rem;margin-top:10px}

/* multi-line text on the lit card — the ds-field box, grown tall */
.ds-area{
  width:100%;min-height:128px;padding:12px 16px;resize:vertical;
  background:var(--ds-field-bg);color:var(--ds-typed);
  border:1px solid var(--ds-control-line);border-radius:var(--radius-lg);
  font-family:var(--font-body);font-size:1.125rem;font-weight:500;line-height:1.5;letter-spacing:.02em;
  caret-color:var(--ds-accent-ink);
  transition:border-color .2s ease,box-shadow .35s var(--ds-ease-out),background-color .2s ease;
}
.ds-area::placeholder{color:var(--ds-placeholder);opacity:1;font-weight:400}
.ds-area:hover{border-color:var(--ds-control-line-hover)}
.ds-area:focus-visible{outline:none;border-color:var(--ds-select-line);background:var(--ds-field-bg-focus);box-shadow:var(--ds-shadow-focus)}

/* statement: activity table beside the lit summary card */
.statement-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:20px;align-items:start}
@media (max-width:1200px){.statement-grid{grid-template-columns:minmax(0,1fr)}.statement-grid .ds-ledger-col{position:static;max-width:480px}}

/* upload drop zone */
.drop{
  display:grid;justify-items:center;gap:5px;
  padding:22px 16px;border:1.5px dashed var(--ds-control-line);border-radius:var(--radius-lg);
  background:var(--ds-lit-surface);text-align:center;cursor:pointer;
  transition:border-color .2s ease,background .2s ease,box-shadow .3s var(--ds-ease-out);
}
.drop:hover,.drop.is-drag{border-color:var(--ds-select-line);background:#fff;box-shadow:0 0 0 3px rgba(var(--ds-glow),.14)}
.drop .ic{width:26px;height:26px;color:var(--ds-accent-ink);stroke-width:1.6;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}
.drop-lead{font-size:1.0625rem;color:var(--ds-lit-ink)}
.drop-lead b{font-weight:700}
.drop-note{font-size:.875rem;color:var(--ds-lit-muted)}


/* 13  STYLE GUIDE (reference tab only) ===================================== */

.screen[data-screen="guide"]{
  font-family:var(--font-body);font-size:1.0625rem;line-height:1.5;letter-spacing:.015em;
  color:var(--ds-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
}
.sg{max-width:1160px;margin:0 auto;display:grid;gap:20px}
.sg-grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.swatch{border:1px solid var(--card-border);border-radius:var(--card-radius);overflow:hidden;background:var(--card-bg)}
.swatch-chip{height:56px}
.swatch-meta{padding:8px 12px;font-size:.8125rem;line-height:1.45}
.swatch-meta b{display:block;font-size:.9375rem}
.swatch-meta code{font-family:var(--font-mono,monospace);font-size:.75rem;color:var(--ds-ink-muted)}
.sg-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:14px 0;border-bottom:1px solid var(--card-border)}
.sg-row:last-child{border-bottom:0}
.sg-row-label{flex:0 0 150px;font-size:.8125rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--ds-ink-muted)}
.sg-type-xxl{font-family:var(--font-heading);font-size:2rem;font-weight:700;color:var(--ds-ink-strong)}
.sg-type-xl{font-family:var(--font-heading);font-size:1.375rem;font-weight:700;color:var(--ds-ink-strong)}
.sg-type-lg{font-size:1.0625rem;font-weight:600}
.sg-type-md{font-size:1.0625rem}
.sg-type-sm{font-size:.9375rem;color:var(--ds-ink-muted)}
.sg-note{margin:0;font-size:.9375rem;color:var(--ds-ink-muted);max-width:70ch}
.adminbar{
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:9px 16px;border-radius:var(--radius-md);
  background:var(--color-warning);color:#111418;
  font-size:.9375rem;font-weight:600;
}
.adminbar b{font-weight:800;letter-spacing:.04em;text-transform:uppercase;font-size:.8125rem}
.adminbar .adminbar-btn{
  margin-left:auto;padding:5px 14px;border-radius:var(--radius-sm);
  background:#111418;color:#fff;border:0;font-family:var(--font-body);font-size:.875rem;font-weight:700;cursor:pointer;
}


/* 15  RESPONSIVE + REDUCED MOTION ========================================= */

@media (max-width:1080px){
  .p-side{
    position:fixed;inset:0 auto 0 0;z-index:40;
    transform:translateX(-105%);transition:transform .35s var(--ds-ease-out);
    overflow-y:auto;box-shadow:0 0 60px rgba(0,0,0,.35);
  }
  .p-side.is-open{transform:none}
  .p-burger{display:grid}
  .p-scrim{display:block;position:fixed;inset:0;z-index:35;background:var(--p-scrim);opacity:0;pointer-events:none;transition:opacity .3s ease}
  .p-scrim.is-on{opacity:1;pointer-events:auto}
}
@media (max-width:640px){
  .p-client-name{max-width:120px}
  .p-main{padding-bottom:110px}
  .req{grid-template-columns:minmax(0,1fr) auto;row-gap:8px}
  .req-side{grid-column:1 / -1;justify-content:flex-start}
  .req-chev{grid-row:1;grid-column:2}
}

@media (prefers-reduced-motion:reduce){
  .portal *,.p-fab,.p-toast,.meter-fill{transition-duration:.01ms !important;animation-duration:.01ms !important}
  .p-side{transition:none}
}
