/* The operator console. The first part is the partner portal's base
   stylesheet, copied (the two surfaces share no files); the last section,
   "Operator console", is the console's own look: a fixed, neutral palette
   and the Trivecta wordmark. */

:root {
  --primary: #3355CC;
  --primary-ink: #FFFFFF;
  --ink: #111827;
  --muted: #5B6478;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --accent: #1A9E75;
  --warn: #D49A1A;
  --danger: #C94040;

  --line: color-mix(in srgb, var(--ink) 11%, transparent);
  --line-soft: color-mix(in srgb, var(--ink) 7%, transparent);
  --hover: color-mix(in srgb, var(--ink) 4%, transparent);
  --primary-soft: color-mix(in srgb, var(--primary) 9%, var(--surface));
  --primary-strong: color-mix(in srgb, var(--primary) 84%, #000);
  --primary-text: color-mix(in srgb, var(--primary) 88%, var(--ink));
  --good-soft: color-mix(in srgb, var(--accent) 13%, var(--surface));
  --good-text: color-mix(in srgb, var(--accent) 58%, var(--ink));
  --warn-soft: color-mix(in srgb, var(--warn) 16%, var(--surface));
  --warn-text: color-mix(in srgb, var(--warn) 48%, var(--ink));
  --bad-soft: color-mix(in srgb, var(--danger) 11%, var(--surface));
  --bad-text: color-mix(in srgb, var(--danger) 80%, var(--ink));
  --off-soft: color-mix(in srgb, var(--muted) 12%, var(--surface));
  --subtle: color-mix(in srgb, var(--muted) 80%, var(--surface));

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent), 0 1px 3px color-mix(in srgb, var(--ink) 4%, transparent);
  --shadow-lg: 0 12px 40px color-mix(in srgb, var(--ink) 18%, transparent), 0 2px 8px color-mix(in srgb, var(--ink) 8%, transparent);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --side: 248px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
a { color: var(--primary-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary-strong); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.skip:focus { top: 12px; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.warntext { color: var(--warn-text); font-weight: 600; }
.optional { color: var(--muted); font-weight: 400; }

/* ------------------------------------------------------------ frame */

.shell { min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 30;
  display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line);
}
.side__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 16px; }
.side .side__close { display: none; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; flex: 1; overflow-y: auto; }
.nav__link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 550;
}
.nav__link .i { width: 20px; height: 20px; }
.nav__link:hover { background: var(--hover); color: var(--ink); }
.nav__link[aria-current="page"] { background: var(--primary-soft); color: var(--primary-text); }
.side__foot { padding: 16px; border-top: 1px solid var(--line-soft); display: grid; gap: 12px; }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me__avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-text); font-weight: 700; font-size: 14px;
}
.me__who { display: grid; min-width: 0; line-height: 1.3; }
.me__who b { font-size: 14px; }
.me__who span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); min-width: 0; }
.logo:hover { color: var(--ink); }
.logo__mark {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none;
  background: var(--primary); color: var(--primary-ink); font-weight: 800; font-size: 16px;
}
.logo__text { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; white-space: nowrap; }
.logo__img { display: block; height: 32px; width: auto; max-width: 180px; object-fit: contain; }
.logo__img--sm { height: 26px; }
.logo--invert .logo__mark { background: var(--primary-ink); color: var(--primary); }
.logo--invert .logo__text { color: var(--primary-ink); }

.topbar { display: none; }
.scrim { display: none; }
.page { margin-left: var(--side); padding: 32px 40px 64px; outline: none; }
.wrap { max-width: 1120px; margin: 0 auto; }
.wrap--wide { max-width: 1280px; }

@media (max-width: 960px) {
  .topbar {
    display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 20;
    height: 58px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line);
  }
  .side { transform: translateX(-100%); transition: transform .22s ease, visibility .22s; width: min(300px, 86vw); visibility: hidden; }
  .side.is-open { transform: none; box-shadow: var(--shadow-lg); visibility: visible; }
  .side .side__close { display: inline-grid; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: color-mix(in srgb, var(--ink) 40%, transparent); }
  .scrim[hidden] { display: none; }
  .page { margin-left: 0; padding: 20px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* ------------------------------------------------------------ page head */

.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.pagehead > div:first-child { min-width: 0; flex: 1 1 320px; }
.pagehead__title { font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; overflow-wrap: anywhere; }
.pagehead__sub { color: var(--muted); margin-top: 6px; max-width: 62ch; }
.pagehead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.pagehead__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.eyebrow { color: var(--muted); font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.backlink { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 550; font-size: 14px; margin-bottom: 14px; }
.backlink:hover { color: var(--ink); }
.backlink .i { width: 16px; height: 16px; }
@media (max-width: 600px) {
  .pagehead__title { font-size: 23px; }
  .pagehead__actions { width: 100%; }
  .pagehead__actions .btn { flex: 1 1 auto; }
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; line-height: 1.2; text-decoration: none; cursor: pointer;
  white-space: nowrap; position: relative; transition: background .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--primary); color: var(--primary-ink); }
.btn--primary:hover { background: var(--primary-strong); color: var(--primary-ink); }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--hover); border-color: color-mix(in srgb, var(--ink) 20%, transparent); color: var(--ink); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); color: #fff; }
.btn--danger-text { color: var(--bad-text); }
.btn--danger-text:hover { color: var(--bad-text); background: var(--bad-soft); }
.btn--wa { background: #25D366; color: #08361C; }
.btn--wa:hover { background: #1FBE5B; color: #08361C; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn--sm .i { width: 16px; height: 16px; }
.btn--lg { min-height: 48px; padding: 0 22px; font-size: 15.5px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn--primary.is-busy::after { border-color: var(--primary-ink); border-right-color: transparent; }
.btn--ghost.is-busy::after { border-color: var(--ink); border-right-color: transparent; }
.btn--danger.is-busy::after { border-color: #fff; border-right-color: transparent; }
.iconbtn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 0; background: transparent; color: var(--ink); cursor: pointer;
}
.iconbtn:hover { background: var(--hover); }
.iconbtn .i { width: 22px; height: 22px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--primary-text); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.linkbtn:hover { color: var(--primary-strong); }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; vertical-align: -2px; }

/* ------------------------------------------------------------ cards and grids */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow); min-width: 0;
}
.card--quiet { background: transparent; box-shadow: none; border-style: dashed; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card__head--wrap { flex-wrap: wrap; align-items: flex-start; margin-bottom: 14px; }
.card__head--wrap > div:first-child { flex: 1 1 280px; min-width: 0; }
.card__title { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.card__count { min-width: 26px; height: 24px; padding: 0 8px; border-radius: 99px; background: var(--off-soft); color: var(--muted); font-weight: 700; font-size: 13px; display: inline-grid; place-items: center; }
.card__sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.card__text { color: var(--ink); margin-top: 6px; }
.card__fine { color: var(--muted); font-size: 13.5px; margin-top: 10px; }
.card__note { color: var(--muted); font-size: 13.5px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.card__empty { color: var(--muted); padding: 18px 0 6px; display: flex; gap: 8px; align-items: center; }
.card__empty .i { color: var(--good-text); }
.card__link { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; font-weight: 600; text-decoration: none; }
.card__link .i { width: 16px; height: 16px; }
.card .subhead, .subhead { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 24px 0 12px; }

.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--detail { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.grid--trial { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
.grid--success { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.grid--team { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 20px; min-width: 0; align-content: start; }
.block { margin-top: 32px; }
.block__title { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
@media (max-width: 1100px) {
  .grid--detail, .grid--success, .grid--team { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .grid--2, .grid--trial { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px 16px; }
}

/* ------------------------------------------------------------ stats */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  display: grid; gap: 2px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s;
}
.stat:hover { border-color: color-mix(in srgb, var(--primary) 45%, transparent); color: var(--ink); }
.stat__label { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.stat__value { font-size: 34px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.15; }
.stat__sub { font-size: 13px; color: var(--muted); }
.stat--warn .stat__sub { color: var(--warn-text); font-weight: 600; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .stat { padding: 14px 16px; } .stat__value { font-size: 28px; } }

.bigmoney { font-size: 36px; font-weight: 750; letter-spacing: -0.03em; margin: 8px 0 2px; line-height: 1.15; }
.bigmoney small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.sums { margin-top: 14px; border-top: 1px solid var(--line-soft); }
.sums > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.sums dt { color: var(--ink); }
.sums dt span { color: var(--muted); font-size: 13px; margin-left: 6px; }
.sums dd { font-weight: 650; white-space: nowrap; }

.minitiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.minitile { background: var(--bg); border-radius: 10px; padding: 12px 14px; display: grid; gap: 1px; }
.minitile__label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.minitile__value { font-size: 18px; font-weight: 700; }
.minitile__sub { font-size: 12.5px; color: var(--muted); }
@media (max-width: 700px) { .minitiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------ rows */

.rows { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 12px 16px; padding: 12px 0; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.row:first-child { border-top: 0; }
.row__main { display: grid; min-width: 0; flex: 1 1 160px; }
.row__title { font-weight: 650; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.row__title:hover { color: var(--primary-text); text-decoration: underline; }
.row__sub { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.row__sub .i { width: 14px; height: 14px; }
.row__sub--bad { color: var(--bad-text); font-weight: 600; }
.row__meter { flex: 0 1 190px; min-width: 150px; }
.row__aside { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.row__aside.is-soon { color: var(--warn-text); font-weight: 650; }
.row--cap { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; align-items: center; }
.row--cap .row__meter { min-width: 0; }
@media (max-width: 520px) {
  .row--cap { grid-template-columns: minmax(0, 1fr) auto; }
  .row--cap .row__meter { grid-column: 1 / -1; grid-row: 2; }
}
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 860px) { .dash { grid-template-columns: minmax(0, 1fr); } }
.rows--card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px; box-shadow: var(--shadow); }

/* ------------------------------------------------------------ meters and pills */

.meter { display: grid; gap: 5px; min-width: 120px; }
.meter__bar { display: block; height: 7px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.meter__bar > span { display: block; height: 100%; border-radius: 99px; background: var(--primary); min-width: 4px; }
.meter--warn .meter__bar > span { background: var(--warn); }
.meter--bad .meter__bar > span { background: var(--danger); }
.meter__text { font-size: 13px; color: var(--muted); white-space: nowrap; }
.meter__text b { color: var(--ink); font-weight: 650; }
.meter__text em { font-style: normal; margin-left: 4px; }
.meter--warn .meter__text em, .meter--warn .meter__text b { color: var(--warn-text); }
.meter--bad .meter__text em, .meter--bad .meter__text b { color: var(--bad-text); }
.bigmeter .meter__bar { height: 12px; }
.bigmeter .meter__text { font-size: 15px; }
.bigmeter { margin: 14px 0 6px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px;
  font-size: 12.5px; font-weight: 650; white-space: nowrap; letter-spacing: 0;
}
.pill i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pill--good { background: var(--good-soft); color: var(--good-text); }
.pill--good i { background: var(--accent); }
.pill--info { background: var(--primary-soft); color: var(--primary-text); }
.pill--info i { background: var(--primary); }
.pill--warn { background: var(--warn-soft); color: var(--warn-text); }
.pill--warn i { background: var(--warn); }
.pill--bad { background: var(--bad-soft); color: var(--bad-text); }
.pill--bad i { background: var(--danger); }
.pill--off { background: var(--off-soft); color: var(--muted); }
.pill--off i { background: var(--subtle); }
.pill--lg { height: 28px; font-size: 13px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--off-soft); color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.tag--sm { height: 19px; font-size: 11px; padding: 0 6px; }

/* ------------------------------------------------------------ alerts and banners */

.alert {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; margin-bottom: 16px; border-radius: 12px;
  text-decoration: none; font-size: 14.5px;
}
.alert--bad { background: var(--bad-soft); color: var(--bad-text); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); }
.alert--bad:hover { color: var(--bad-text); border-color: var(--danger); }
.alert > span { flex: 1; min-width: 0; }
.alert__go { margin-left: auto; }
.banner {
  display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; margin-bottom: 20px;
  border: 1px solid transparent;
}
.banner > .i { margin-top: 2px; width: 20px; height: 20px; }
.banner > p { flex: 1 1 200px; min-width: 0; }
.banner--info { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 18%, transparent); }
.banner--info > .i { color: var(--primary-text); }
.banner--warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.banner--warn > .i { color: var(--warn-text); }
.banner--bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.banner--bad > .i { color: var(--bad-text); }
.banner--good { background: var(--good-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.banner--good > .i { color: var(--good-text); }
.banner--off { background: var(--off-soft); }
.banner--off > .i { color: var(--muted); }
.note { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 14px; }
.note .i { margin-top: 1px; color: var(--primary-text); }
.note--warn { background: var(--warn-soft); color: var(--warn-text); }
.note--warn .i { color: var(--warn-text); }
.note[hidden] { display: none; }
.fineprint { color: var(--muted); font-size: 13.5px; margin-top: 18px; display: flex; gap: 8px; align-items: flex-start; }

/* ------------------------------------------------------------ forms */

.form { display: grid; gap: 18px; }
.form--wide { max-width: 860px; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field--full { grid-column: 1 / -1; }
@media (max-width: 700px) { .formgrid { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field__label { font-weight: 650; font-size: 14px; }
.field__hint { font-size: 13px; color: var(--muted); }
.field__error { font-size: 13.5px; color: var(--bad-text); font-weight: 600; display: flex; gap: 6px; }
.field__error::before { content: "!"; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; flex: none; margin-top: 1px; }
.has-error .input { border-color: var(--danger); box-shadow: 0 0 0 3px var(--bad-soft); }
.form__error { padding: 12px 14px; border-radius: 10px; background: var(--bad-soft); color: var(--bad-text); font-weight: 600; font-size: 14px; }
.form__error[hidden] { display: none; }
.form__fine { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.form__fine .i { margin-top: 1px; }
.form__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
@media (max-width: 600px) { .form__actions .btn { flex: 1 1 auto; } }
.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.input::placeholder { color: color-mix(in srgb, var(--muted) 75%, var(--surface)); }
.input[readonly] { background: var(--bg); }
.input--sm { min-height: 36px; padding: 6px 10px; }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.5; }
select.input { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%235B6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; cursor: pointer; }
.prefixed { display: flex; }
.prefixed__pre { display: grid; place-items: center; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-right: 0; border-radius: 10px 0 0 10px; background: var(--bg); font-weight: 650; color: var(--muted); }
.prefixed .input { border-radius: 0 10px 10px 0; }
.copyfield { display: flex; gap: 8px; }
.copyfield .input { font-family: var(--mono); font-size: 13px; min-width: 0; }

.choices { display: grid; gap: 10px; }
.choices--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices--grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choices > legend { margin-bottom: 8px; padding: 0; }
@media (max-width: 860px) { .choices--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .choices--row { grid-template-columns: minmax(0, 1fr); } }
.choice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); transition: border-color .15s, background .15s;
}
.choice:hover { border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.choice:has(input:focus-visible) { outline: 2.5px solid var(--primary); outline-offset: 2px; }
.choice input { margin: 3px 0 0; accent-color: var(--primary); width: 17px; height: 17px; flex: none; }
.choice__body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.choice__body b { font-weight: 650; }
.choice__body span { font-size: 13.5px; color: var(--muted); }
.choice__price { font-weight: 750; font-size: 17px; white-space: nowrap; }
.choice--sm { padding: 11px 13px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.search { position: relative; flex: 1 1 320px; min-width: 0; }
.search > .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 40px; }
.toolbar__selects { display: flex; gap: 12px; flex-wrap: wrap; flex: 0 1 auto; }
.select { flex: 1 1 150px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--ink);
}
.chip span { color: var(--muted); font-weight: 650; }
.chip:hover { border-color: color-mix(in srgb, var(--ink) 25%, transparent); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip[aria-pressed="true"] span { color: color-mix(in srgb, var(--surface) 70%, var(--ink)); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; margin-bottom: -1px; white-space: nowrap;
  color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 2.5px solid transparent;
}
.tabs__tab span { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; background: var(--off-soft); font-size: 12px; display: inline-grid; place-items: center; }
.tabs__tab:hover { color: var(--ink); }
.tabs__tab[aria-current="page"] { color: var(--primary-text); border-bottom-color: var(--primary); }
.tabs__tab[aria-current="page"] span { background: var(--primary-soft); color: var(--primary-text); }

.inline-edit { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.inline-edit .field { flex: 1 1 140px; }
.inline-form { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-top: 10px; }
.inline-form .field { flex: 1 1 220px; }

/* ------------------------------------------------------------ tables */

.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card .tablewrap { box-shadow: none; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th, .table td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line-soft); }
.table thead th { font-size: 12.5px; font-weight: 650; color: var(--muted); background: var(--bg); white-space: nowrap; text-transform: none; position: sticky; top: 0; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody th { font-weight: 400; }
.table .num { text-align: right; white-space: nowrap; }
.table tfoot th, .table tfoot td { border-bottom: 0; border-top: 1px solid var(--line-soft); font-weight: 600; text-align: right; }
.table tfoot tr.is-total th, .table tfoot tr.is-total td { font-size: 16px; font-weight: 750; border-top: 2px solid var(--ink); }
.cell__title { font-weight: 650; color: var(--ink); text-decoration: none; display: block; }
.cell__title:hover { color: var(--primary-text); text-decoration: underline; }
.cell__sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cell__date { white-space: nowrap; }
.cell__go { color: var(--subtle); width: 32px; }
.cell__actions { text-align: right; white-space: nowrap; }
.cell__actions .btn + .btn { margin-left: 6px; }
.table--clients { min-width: 860px; }
.table--clients tbody tr { cursor: pointer; }
.table--clients tbody tr:hover > * { background: var(--hover); }
.table--clients tbody th { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 210px; max-width: 280px; }
.table--clients thead th:first-child { position: sticky; left: 0; z-index: 2; }
.table--clients tbody tr:hover > th { background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.table--clients .meter { min-width: 150px; }
.table--lines { min-width: 620px; }
.table--lines tr.is-cont > * { border-top: 0; }
.table--lines tr.is-first:not(:first-child) > * { border-top: 1px solid var(--line); }
.table--lines tbody tr > * { border-bottom: 0; }
.table--lines tbody th a { font-weight: 650; color: var(--ink); text-decoration: none; }
.table--lines tbody th a:hover { color: var(--primary-text); text-decoration: underline; }
.table--statements { min-width: 760px; }
.table--team { min-width: 600px; }
.results__count { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
#results { transition: opacity .15s; }
#results.is-loading { opacity: .5; }
.person { display: flex; align-items: center; gap: 10px; }
.person > span:last-child { display: grid; }

/* ------------------------------------------------------------ facts and timeline */

.facts { display: grid; gap: 0; margin-top: 6px; }
.facts > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { overflow-wrap: anywhere; min-width: 0; }
.facts dd .linkbtn { margin-left: 8px; font-size: 14px; }
.dd__sub { display: block; font-size: 13px; color: var(--muted); }
.facts--inline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.facts--inline > div { display: grid; grid-template-columns: none; gap: 2px; padding: 0; border: 0; }
.facts--inline dt { font-size: 12.5px; }
.facts--inline dd { font-weight: 700; font-size: 16px; }
@media (max-width: 600px) { .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } .facts--inline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mini { margin-top: 16px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.mini li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.mini li span { flex: 1; color: var(--muted); }
.mini .i { color: var(--good-text); width: 16px; height: 16px; }

.timeline { margin-top: 12px; position: relative; }
.timeline__item { position: relative; padding: 0 0 16px 26px; }
.timeline__item::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 2px; background: var(--line-soft); }
.timeline__item:last-child::before { display: none; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--subtle); }
.timeline__item--paid .timeline__dot, .timeline__item--reactivated .timeline__dot { border-color: var(--accent); }
.timeline__item--topup .timeline__dot, .timeline__item--trial .timeline__dot, .timeline__item--invite .timeline__dot { border-color: var(--primary); }
.timeline__item--cap .timeline__dot, .timeline__item--paused .timeline__dot { border-color: var(--warn); }
.timeline__item--alert .timeline__dot, .timeline__item--deactivated .timeline__dot { border-color: var(--danger); }
.timeline__item p { font-size: 14.5px; }
.timeline__item time { font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------ states */

.skeleton { display: grid; gap: 14px; padding: 8px 0; }
.skeleton span { display: block; height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--line-soft) 0%, color-mix(in srgb, var(--ink) 3%, transparent) 50%, var(--line-soft) 100%); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
.skeleton__title { width: 38%; height: 30px !important; margin-bottom: 10px; }
.skeleton__row:nth-child(2n) { width: 92%; }
.skeleton__row:nth-child(3n) { width: 76%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton span { animation: none; } }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 48px 20px; }
.empty__art { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); margin-bottom: 6px; }
.empty__art .i { width: 26px; height: 26px; }
.empty--error .empty__art { background: var(--bad-soft); color: var(--bad-text); }
.empty__title { font-weight: 700; font-size: 17px; }
.empty__body { color: var(--muted); max-width: 46ch; }
.empty .btn, .empty__actions { margin-top: 10px; }
.empty__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.empty__actions .btn { margin-top: 0; }

/* ------------------------------------------------------------ welcome and success */

.welcome { margin-bottom: 20px; border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.welcome__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.steps li { counter-increment: step; display: grid; gap: 4px; padding-left: 40px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); font-weight: 750; font-size: 14px; }
.steps li span { color: var(--muted); font-size: 14px; }
.steps--compact { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.success { outline: none; }
.success__head { display: flex; gap: 16px; align-items: center; }
.success__title { font-size: 22px; font-weight: 750; letter-spacing: -0.01em; }
.success__sub { color: var(--muted); }
.success__next { display: grid; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.done-mark { width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--good-soft); color: var(--good-text); }
.done-mark .i { width: 26px; height: 26px; }
.checks { display: grid; gap: 8px; margin: 20px 0 4px; padding: 16px; border-radius: 12px; background: var(--bg); }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks .i { color: var(--good-text); margin-top: 2px; }
.success .card__text { margin-top: 0; }
.success .stack { gap: 14px; }
.success .btnrow { margin-top: 14px; }
.success .field + .btnrow, .success .copyfield { margin-top: 0; }

/* ------------------------------------------------------------ the invite email preview */

.email { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.email__meta { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg); display: grid; gap: 3px; font-size: 13px; }
.email__meta > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
.email__meta dt { color: var(--muted); }
.email__meta dd { overflow-wrap: anywhere; }
.email__canvas { padding: 20px; background: color-mix(in srgb, var(--primary) 4%, var(--bg)); }
.email__card { max-width: 520px; margin: 0 auto; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); color: #1D2433; }
.email__brandbar { padding: 16px 22px; border-bottom: 3px solid var(--primary); }
.email__content { padding: 20px 22px 22px; display: grid; gap: 12px; font-size: 14.5px; }
.email__hi { font-weight: 700; font-size: 16px; }
.email__steps { display: grid; gap: 14px; margin: 4px 0; }
.email__steps li { display: flex; gap: 12px; }
.email__steps p { color: #4A5368; font-size: 14px; margin: 2px 0 10px; }
.email__n { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); font-weight: 750; font-size: 13px; }
.email__btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 8px; background: var(--primary); color: var(--primary-ink); font-weight: 650; text-decoration: none; font-size: 14px; }
.email__btn:hover { color: var(--primary-ink); background: var(--primary-strong); }
.email__btn--wa { background: #25D366; color: #08361C; }
.email__btn--wa:hover { background: #1FBE5B; color: #08361C; }
.email__note { padding: 10px 12px; border-radius: 8px; background: var(--good-soft); color: var(--good-text); font-weight: 600; font-size: 14px; }
.email__foot { font-size: 12.5px; color: #6B7385; border-top: 1px solid #ECEEF3; padding-top: 12px; }
@media (max-width: 600px) { .email__canvas { padding: 10px; } .email__content, .email__brandbar { padding-left: 14px; padding-right: 14px; } }

/* ------------------------------------------------------------ support */

.tickets { display: grid; gap: 10px; }
.ticket {
  display: flex; gap: 16px 20px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); flex-wrap: wrap;
}
.ticket:hover { border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.ticket__link { flex: 1 1 360px; min-width: 0; display: grid; gap: 3px; text-decoration: none; color: var(--ink); }
.ticket__link:hover { color: var(--ink); }
.ticket__link:hover .ticket__subject { color: var(--primary-text); text-decoration: underline; }
.ticket__top { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.ticket__top > span + span::before { content: "·"; margin-right: 12px; }
.ticket__subject { font-size: 15.5px; font-weight: 650; overflow-wrap: anywhere; }
.ticket__preview { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket__preview b { color: var(--ink); font-weight: 600; }
.ticket__side { display: grid; justify-items: end; gap: 6px; align-content: start; flex: 0 0 auto; }
.ticket__pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ticket__when { font-size: 12.5px; color: var(--muted); }
@media (max-width: 700px) { .ticket__side { justify-items: start; } .ticket__pills { justify-content: flex-start; } }
.sla { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; flex-wrap: wrap; }
.sla .i { width: 15px; height: 15px; }
.sla--good { color: var(--good-text); }
.sla--info { color: var(--primary-text); }
.sla--warn { color: var(--warn-text); }
.sla--bad { color: var(--bad-text); }
.sla__paused { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.sla__paused::before { content: "· "; }
.slabox { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 20px; }
.slabox p { font-size: 14px; color: var(--muted); }
.slabox p b { color: var(--ink); }

.thread { display: grid; gap: 14px; margin-bottom: 20px; }
.msg { max-width: 760px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.msg--you { margin-left: auto; background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 18%, transparent); width: min(100%, 680px); }
.msg--them { margin-right: auto; width: min(100%, 680px); }
.msg__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 6px; }
.msg__head time { color: var(--muted); }
.msg__body { display: grid; gap: 8px; overflow-wrap: anywhere; }
.reply { max-width: 100%; }

/* ------------------------------------------------------------ settings */

.settings { gap: 20px; }
.settings .card__sub { margin-bottom: 14px; }
.logoedit { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-top: 14px; }
.logoedit__preview { flex: 0 0 220px; height: 96px; border-radius: 12px; border: 1px dashed var(--line); display: grid; place-items: center; background: var(--bg); padding: 12px; }
.logoedit__controls { flex: 1 1 260px; display: grid; gap: 16px; min-width: 0; }
.logoedit__controls .field:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.logoedit__controls .field:first-child .field__hint { flex-basis: 100%; }
.filebtn { cursor: pointer; }
.filebtn:focus-within { outline: 2.5px solid var(--primary); outline-offset: 2px; }
.colorfield { display: flex; gap: 10px; }
.colorfield input[type="color"] { width: 48px; height: 44px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; flex: none; }
.swatches { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding: 14px; border-radius: 10px; background: var(--bg); }
.swatches__link { color: var(--primary-text); text-decoration: underline; font-weight: 600; }
.waprev { margin-top: 18px; padding: 16px; border-radius: 12px; background: #E7DED4; }
.waprev__label { display: block; font-size: 12px; font-weight: 700; color: #54483B; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.waprev__bubble { max-width: 440px; background: #fff; color: #1D2433; padding: 9px 12px; border-radius: 0 10px 10px 10px; box-shadow: 0 1px 1px rgba(0,0,0,.12); font-size: 14px; }
.waprev__bubble b { display: block; color: #128C7E; font-size: 13px; margin-bottom: 2px; }
.savebar {
  position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 0; background: linear-gradient(to top, var(--bg) 70%, color-mix(in srgb, var(--bg) 0%, transparent));
}
.savebar__hint { margin-right: auto; color: var(--primary-text); font-weight: 600; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.savebar__hint[hidden] { display: none; }

.domain__check { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.checklist { display: grid; margin-top: 8px; }
.check { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line-soft); }
.check:first-child { border-top: 0; }
.check__mark { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 750; font-size: 14px; background: var(--off-soft); color: var(--muted); }
.check--done .check__mark { background: var(--accent); color: #fff; }
.check--todo .check__mark { background: var(--warn-soft); color: var(--warn-text); box-shadow: inset 0 0 0 2px var(--warn); }
.check--checking .check__mark { background: var(--primary-soft); color: var(--primary-text); }
.check__body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.check__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.check__head h3 { font-size: 15.5px; font-weight: 650; overflow-wrap: anywhere; }
.check--waiting .check__head h3 { color: var(--muted); }
.check__help { color: var(--muted); font-size: 14px; }
.step__done { font-size: 14px; color: var(--muted); }
.step__done .linkbtn { margin-left: 8px; font-size: 14px; }
.step__checking { font-size: 14px; color: var(--primary-text); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.ns { display: grid; gap: 8px; margin: 6px 0 10px; }
.ns li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ns__n { font-size: 13px; color: var(--muted); width: 100px; flex: none; }
.ns .input { font-family: var(--mono); font-size: 14px; flex: 0 1 340px; min-width: 0; min-height: 38px; }

/* ------------------------------------------------------------ billing */

.explain summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.explain summary::-webkit-details-marker { display: none; }
.explain__chev { transition: transform .2s; }
.explain[open] .explain__chev { transform: rotate(90deg); }
.explain__list { display: grid; gap: 10px; margin-top: 14px; padding-left: 18px; list-style: disc; }
.explain__list li { padding-left: 4px; }

.statement__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.statement__bar .backlink { margin: 0; }
.statement { padding: 36px 40px; max-width: 920px; }
.statement__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.statement__title { text-align: right; }
.statement__title h1 { font-size: 26px; font-weight: 750; letter-spacing: -0.01em; }
.statement__title p { color: var(--muted); font-family: var(--mono); font-size: 14px; }
.statement__meta { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; padding: 18px 0; }
.statement__meta dt { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.statement__meta dd { font-size: 14px; }
.statement .tablewrap { margin-top: 18px; }
.statement__foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; display: grid; gap: 4px; }
@media (max-width: 860px) {
  .statement { padding: 20px 16px; }
  .statement__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statement__title { text-align: left; }
}

/* ------------------------------------------------------------ dialogs and toasts */

.dialog {
  border: 0; padding: 0; border-radius: 18px; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
  animation: pop .18s ease-out;
}
.dialog--sm { width: min(440px, calc(100vw - 32px)); }
.dialog::backdrop { background: color-mix(in srgb, var(--ink) 45%, transparent); }
.dialog.is-leaving { opacity: 0; transition: opacity .18s; }
.dialog__in { position: relative; padding: 26px 26px 22px; }
.dialog__x { position: absolute; top: 12px; right: 12px; }
.dialog__title { font-size: 19px; font-weight: 750; padding-right: 36px; margin-bottom: 8px; letter-spacing: -0.01em; }
.dialog__text { color: var(--muted); display: grid; gap: 8px; margin-bottom: 16px; }
.dialog__text b { color: var(--ink); }
.dialog__fine { font-size: 13px; color: var(--muted); }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (max-width: 600px) {
  .dialog { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; max-height: 88vh; }
  .dialog__in { padding: 22px 16px 20px; }
  .dialog__actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .dialog { animation: none; } }

#toasts { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(460px, calc(100vw - 32px)); pointer-events: none; }
.toast { padding: 13px 16px; border-radius: 12px; background: var(--ink); color: var(--surface); font-weight: 550; font-size: 14.5px; box-shadow: var(--shadow-lg); animation: pop .2s ease-out; }
.toast--bad { background: var(--danger); color: #fff; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: all .3s; }

/* ------------------------------------------------------------ login */

.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login__brand { background: var(--primary); color: var(--primary-ink); display: grid; align-items: center; padding: 48px; position: relative; overflow: hidden; }
.login__brand::after { content: ""; position: absolute; width: 560px; height: 560px; right: -200px; bottom: -220px; border-radius: 50%; background: color-mix(in srgb, var(--primary-ink) 8%, transparent); }
.login__brandin { max-width: 440px; position: relative; z-index: 1; display: grid; gap: 28px; }
.login__pitch { font-size: 36px; line-height: 1.15; font-weight: 750; letter-spacing: -0.02em; }
.login__points { display: grid; gap: 14px; }
.login__points li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.login__points .i { width: 22px; height: 22px; opacity: .85; }
.login__form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.login__card { width: min(420px, 100%); display: grid; gap: 8px; }
.login__logo { margin-bottom: 18px; display: none; }
.login__title { font-size: 25px; font-weight: 750; letter-spacing: -0.02em; }
.login__sub { color: var(--muted); margin-bottom: 18px; }
.login__forgot { justify-self: center; margin-top: 4px; }
.login__back { display: inline-flex; align-items: center; gap: 4px; justify-self: start; text-decoration: none; margin-bottom: 14px; color: var(--muted); }
.login__demo { display: flex; gap: 8px; align-items: flex-start; margin-top: 22px; padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px dashed var(--line); color: var(--muted); font-size: 13.5px; }
.login__demo .i { margin-top: 1px; }
.login__card .done-mark { margin-bottom: 8px; }
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login__brand { display: none; }
  .login__logo { display: inline-flex; }
  .login__form { place-items: start center; padding-top: 48px; }
}

/* ------------------------------------------------------------ print: the statement as a PDF */

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  .side, .topbar, .scrim, .noprint, #toasts, .skip { display: none !important; }
  .page { margin: 0; padding: 0; }
  .wrap { max-width: none; }
  .statement { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .statement .tablewrap { overflow: visible; border: 0; }
  .table--lines { min-width: 0; }
  .table thead th { position: static; }
  .table tr { break-inside: avoid; }
  .minitile { border: 1px solid #ddd; }
  a { color: inherit; text-decoration: none; }
  .pill { border: 1px solid currentColor; }
  .statement__meta { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .statement__title { text-align: right; }
  .minitiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}


/* ======================================================================
   OPERATOR CONSOLE
   ====================================================================== */

:root {
  --primary: #2B4C7E;
  --primary-ink: #FFFFFF;
  --ink: #16181D;
  --muted: #5A616E;
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --accent: #2F7D5B;
  --warn: #C98A12;
  --danger: #B83B3B;
  --graphite: #15181D;
  --graphite-2: #1F232A;
  --graphite-line: #2A2F38;
  --graphite-text: #A9AFBA;
  --radius: 10px;
  --radius-sm: 7px;
}

/* the dark side bar */
.side { background: var(--graphite); border-right-color: var(--graphite); color: #E6E8EC; }
.side__head { padding: 22px 20px 4px; }
.side__label { padding: 6px 20px 14px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #6E7581; font-weight: 650; }
.nav__link { color: var(--graphite-text); border-radius: 7px; }
.nav__link:hover { background: var(--graphite-2); color: #fff; }
.nav__link[aria-current="page"] { background: #262B34; color: #fff; box-shadow: inset 3px 0 0 #7FA2D6; }
.nav__badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; background: #3A4250; color: #fff; font-style: normal; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.nav__badge.is-bad { background: var(--danger); }
.nav__badge[hidden] { display: none; }
.side__foot { border-top-color: var(--graphite-line); }
.side .me__avatar { background: #2B313B; color: #fff; }
.side .me__who span { color: #8A909B; }
.side .iconbtn { color: #fff; }
.side .iconbtn:hover { background: var(--graphite-2); }
.btn--side { background: transparent; border-color: var(--graphite-line); color: #D5D8DE; }
.btn--side:hover { background: var(--graphite-2); border-color: #3A404B; color: #fff; }
.topbar__tag { margin-left: auto; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 650; color: var(--muted); }

/* the wordmark */
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.wordmark:hover { color: #fff; }
.wordmark__mark { width: 24px; height: 24px; flex: none; }
.wordmark__text { font-size: 14px; font-weight: 650; letter-spacing: .28em; text-transform: uppercase; line-height: 1; }
.wordmark--dark, .wordmark--dark:hover { color: var(--ink); }

/* login: one quiet card */
.login { grid-template-columns: minmax(0, 1fr); place-items: center; padding: 48px 16px; background: var(--bg); }
.login__card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px 30px 28px; box-shadow: var(--shadow); }
.login__mark { margin-bottom: 26px; }
.login__demo { background: var(--bg); }
@media (max-width: 600px) { .login__card { padding: 26px 18px 22px; } .login { padding-top: 24px; place-items: start center; } }

/* numbers */
a.stat:hover { border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
div.stat:hover { border-color: var(--line); }
.stat--bad .stat__sub { color: var(--bad-text); font-weight: 650; }
.stat--bad .stat__value { color: var(--bad-text); }
.stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats--5 .stat__value { font-size: 26px; }
@media (max-width: 1180px) { .stats--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .stats--3, .stats--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.badtext { color: var(--bad-text); font-weight: 650; }
.tag--warn { background: var(--warn-soft); color: var(--warn-text); }
.tabs__tab span.is-bad { background: var(--bad-soft); color: var(--bad-text); }
.th__sub { display: block; font-weight: 500; font-size: 11.5px; }

/* tables */
.table--partners { min-width: 940px; }
.table--partners tbody tr { cursor: pointer; }
.table--partners tbody tr:hover > * { background: var(--hover); }
.table--partners tbody th { min-width: 220px; }
.table--allstatements { min-width: 860px; }
.table--usage { min-width: 940px; }
.table--usage .meter { min-width: 170px; }
.table--clients tbody tr { cursor: default; }
tr.is-over > *, tr.is-overdue > * { background: color-mix(in srgb, var(--danger) 4%, var(--surface)); }
.table--clients tbody th { position: static; }

/* partner detail */
.dialog--lg { width: min(720px, calc(100vw - 32px)); }
.packs { display: grid; gap: 10px; }
.packs > legend { margin-bottom: 8px; padding: 0; }
.packs__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; padding: 12px 14px; border-radius: 8px; background: var(--bg); }
.field__label--sm { font-size: 13px; }
.readonly { min-height: 44px; display: flex; align-items: center; color: var(--muted); }
.checkline { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; background: var(--warn-soft); color: var(--warn-text); cursor: pointer; }
.checkline input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--primary); flex: none; }
.checkline b { color: var(--ink); }
.ns--ro { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.ns--ro code { font-family: var(--mono); font-size: 13px; padding: 4px 8px; background: var(--bg); border-radius: 6px; }
.block--first { margin-top: 0; }
.block__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.block__title--bad { color: var(--bad-text); }
.block__sub { color: var(--muted); margin: -6px 0 12px; font-size: 14px; }
.block > .card__empty { padding-top: 4px; }
.row .me__avatar { flex: none; }

/* the ticket queue */
.queue { display: grid; gap: 10px; }
.q {
  display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 14px 20px; align-items: start;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.q:hover { border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.q__main { display: grid; gap: 3px; min-width: 0; text-decoration: none; color: var(--ink); }
.q__main:hover { color: var(--ink); }
.q__main:hover .q__subject { color: var(--primary-text); text-decoration: underline; }
.q__top { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; color: var(--muted); }
.q__top > span + span::before { content: "·"; margin-right: 12px; }
.q__subject { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.q__preview { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q__preview b { color: var(--ink); font-weight: 600; }
.q__side { display: grid; justify-items: end; gap: 6px; font-size: 13px; }
.q__pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.q__who { display: inline-flex; gap: 5px; align-items: center; }
.q__who .i { width: 15px; height: 15px; color: var(--muted); }
.q__when { color: var(--muted); font-size: 12.5px; }
@media (max-width: 900px) {
  .q { grid-template-columns: minmax(0, 1fr); }
  .q__side { justify-items: start; grid-auto-flow: row; }
  .q__pills { justify-content: flex-start; }
}
.sla-cell { display: grid; gap: 1px; padding: 9px 12px; border-radius: 7px; border-left: 3px solid var(--subtle); background: var(--bg); }
.sla-cell b { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.sla-cell > span { font-size: 12.5px; color: var(--muted); }
.sla-cell--bad { background: var(--bad-soft); border-left-color: var(--danger); }
.sla-cell--bad b { color: var(--bad-text); }
.sla-cell--warn { background: var(--warn-soft); border-left-color: var(--warn); }
.sla-cell--warn b { color: var(--warn-text); }
.sla-cell--info { background: var(--primary-soft); border-left-color: var(--primary); }
.sla-cell--info b { color: var(--primary-text); }
.sla-cell--good { background: var(--good-soft); border-left-color: var(--accent); }
.sla-cell--good b { color: var(--good-text); }
.sla-cell .sla-cell__paused { display: flex; gap: 4px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 3px; }
.sla-cell__paused .i { width: 13px; height: 13px; }

/* one ticket */
.grid--ticket { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .grid--ticket { grid-template-columns: minmax(0, 1fr); } }
.slabox { margin-bottom: 0; display: grid; gap: 8px; }
.slabox .slabox__line { font-size: 14px; color: var(--muted); }
.facts--tight { margin: 12px 0 16px; }
.facts--tight > div { grid-template-columns: 82px minmax(0, 1fr); padding: 8px 0; }
.facts--tight dt, .facts--tight dd { font-size: 14px; }
.grid--ticket .card .field { margin-top: 12px; }
.msg--you .msg__head b { color: var(--primary-text); }

/* statements */
.statement__meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.statement__head .wordmark__mark { width: 28px; height: 28px; }
@media (max-width: 860px) { .statement__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print {
  .statement__meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .banner { display: none !important; }
}

/* fixes after looking at the screenshots */
.skip:not(:focus) { box-shadow: none; }
@media (min-width: 961px) {
  /* the side bar's colour runs the whole length of the page */
  .shell { background: linear-gradient(to right, var(--graphite) var(--side), transparent var(--side)); }
}
.grid--ticket .thread { margin-bottom: 0; }
/* a hint that a wide table scrolls: soft shadows on the edge that has more */
.tablewrap {
  background:
    linear-gradient(to right, var(--surface) 30%, transparent) left center / 40px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, transparent) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(22, 24, 29, .16), transparent) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(22, 24, 29, .16), transparent) right center / 14px 100% no-repeat scroll;
  background-color: var(--surface);
}
tr.is-over > *, tr.is-overdue > * { background: transparent; }
tr.is-over > th:first-child, tr.is-overdue > th:first-child { box-shadow: inset 3px 0 0 var(--danger); }
@media (max-width: 600px) {
  .stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stats--3 .stat { padding: 12px; }
  .stats--3 .stat__sub { display: none; }
  .stats--3 .stat__value { font-size: 24px; }
  .stats--3 .stat__label { font-size: 12px; line-height: 1.25; min-height: 30px; }
}
@media (max-width: 900px) {
  .q__side { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
}
@media (max-width: 1100px) {
  .grid--ticket > aside { display: contents; }
  .grid--ticket .slabox { order: -1; }
  .grid--ticket .ticketcard { order: 1; }
}
@media (max-width: 600px) { .toolbar__selects { flex: 1 1 100%; } .toolbar__selects .select { flex: 1 1 0; } }
