/* Vyluz Clients. The dashboard's look: pure black, Vyluz gold, liquid-glass panels over the
   website's gold hairlines. Geist for everything, Boska for the wordmark and the big figures. */

@font-face { font-family: "Geist"; src: url("/fonts/geist-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Boska"; src: url("/fonts/boska-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --bg: #000000;
  --fg: #f4eee5;
  --muted: #a59c8f;
  --faint: #776f64;
  --gold: #d6a645;
  --gold-ink: #e0b45c;
  --ok: #7fc795;
  --bad: #f08468;
  --off: #5c564e;

  --glass: rgba(255, 255, 255, 0.035);
  --edge: rgba(255, 255, 255, 0.1);
  --hair: rgba(255, 255, 255, 0.08);
  --blur: blur(9px) saturate(180%);
  --radius: 28px;

  --font: "Geist", "Helvetica Neue", Arial, system-ui, sans-serif;
  --brand: "Boska", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --dur: 240ms;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- gold hairlines + glass ---------- */

.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.glass {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.03), 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.1) 18%, rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0.06) 70%, rgba(255, 255, 255, 0.24) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(22, 22, 22, 0.92); }
}

/* ---------- layout ---------- */

.shell {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 120px max(16px, env(safe-area-inset-left));
}

.bar { position: sticky; top: 12px; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 24px; border-radius: 999px; margin-bottom: 20px; }
.mark { font: 500 20px/1 var(--brand); letter-spacing: 0.3em; color: var(--fg); padding-top: 2px; white-space: nowrap; }
.mark span { font: 500 12px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-left: 6px; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a { padding: 8px 16px; border-radius: 999px; color: var(--muted); font-size: 14px; }
.tabs a:hover { color: var(--fg); }
.tabs a.on { color: #000; background: var(--gold); }
.iconbtn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.06); cursor: pointer; flex: none; }
.iconbtn svg { fill: var(--fg); }
.iconbtn:hover { background: rgba(255, 255, 255, 0.12); }
.bar .iconbtn { margin-left: 8px; }
.bar .tabs[hidden] + .iconbtn { margin-left: auto; }

/* phone: a dock at the bottom instead of the tabs */
.dock { position: fixed; z-index: 6; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); display: none; gap: 4px; padding: 6px; border-radius: 999px; }
.dock a { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 78px; padding: 7px 0 6px; border-radius: 999px; font-size: 11px; color: var(--muted); }
.dock svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dock a.on { color: #000; background: var(--gold); }

.page-head { display: flex; align-items: flex-end; gap: 14px; margin: 6px 4px 16px; flex-wrap: wrap; }
.page-head h1 { font: 500 34px/1.1 var(--brand); margin: 0; overflow-wrap: anywhere; }
.page-head .sub { color: var(--muted); font-size: 14px; width: 100%; margin-top: -8px; }
.page-head .grow { flex: 1; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin: 0 4px 10px; }
.back:hover { color: var(--fg); }

.stack { display: grid; gap: 16px; }
.panel { padding: 22px 24px 20px; min-width: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.kicker .count { color: var(--faint); letter-spacing: 0.06em; }
.kicker .aside { margin-left: auto; letter-spacing: 0.02em; text-transform: none; font-weight: 400; }

/* ---------- money ---------- */

.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.figure .label { font-size: 13px; color: var(--muted); }
.figure .big { font: 500 clamp(30px, 4vw, 44px)/1.05 var(--brand); margin: 6px 0 2px; white-space: nowrap; }
.figure .big.gold { color: var(--gold); }
.figure .big.bad { color: var(--bad); }
.figure .sub { font-size: 12px; color: var(--faint); }

.hint { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: rgba(214, 166, 69, 0.08); box-shadow: inset 0 0 0 1px rgba(214, 166, 69, 0.3); font-size: 14px; color: var(--fg); }
.hint .pill { margin-left: auto; flex: none; }

/* ---------- chips, dots, pills ---------- */

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--muted); box-shadow: inset 0 0 0 1px var(--hair); }
.chip.overdue { color: #000; background: var(--bad); box-shadow: none; }
.chip.due { color: #000; background: var(--gold); box-shadow: none; }
.chip.upcoming { color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgba(214, 166, 69, 0.45); }
.chip.paid, .chip.clear, .chip.live, .chip.ok { color: var(--ok); box-shadow: inset 0 0 0 1px rgba(127, 199, 149, 0.4); }
.chip.waived { color: var(--faint); }
.chip.family { color: var(--fg); }
.chip.showing { color: #000; background: var(--gold-ink); box-shadow: none; }

.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--off); }
.dot.overdue { background: var(--bad); }
.dot.due { background: var(--gold); }
.dot.upcoming { background: rgba(214, 166, 69, 0.45); }
.dot.clear { background: var(--ok); }

.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(214, 166, 69, 0.3); background: rgba(214, 166, 69, 0.08); color: var(--gold-ink); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background var(--dur) var(--ease); }
.pill:hover { background: rgba(214, 166, 69, 0.16); }
.pill.solid { background: var(--gold); color: #000; border-color: var(--gold); }
.pill.solid:hover { background: var(--gold-ink); }
.pill.quiet { color: var(--fg); border-color: var(--hair); background: rgba(255, 255, 255, 0.05); }
.pill.quiet:hover { background: rgba(255, 255, 255, 0.1); }
.pill.danger { color: var(--bad); border-color: rgba(240, 132, 104, 0.35); background: rgba(240, 132, 104, 0.06); }
.pill:disabled { opacity: 0.5; cursor: default; }
.pill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill.wa svg { fill: currentColor; stroke: none; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- lists ---------- */

.list { margin: 0 -10px; }
.li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 10px; border-radius: 16px; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; }
.li + .li { box-shadow: 0 -1px 0 var(--hair); }
a.li:hover, button.li:hover { background: rgba(255, 255, 255, 0.04); }
.li .t { font-size: 15px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .s { grid-column: 2; font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .r { grid-column: 3; grid-row: 1 / span 2; text-align: right; }
.li .r .amt { font-size: 15px; font-weight: 500; }
.li .r small { display: block; font-size: 12px; color: var(--muted); }
.li > .dot { grid-row: 1 / span 2; }
.none { color: var(--faint); font-size: 14px; padding: 6px 0; }

/* attention cards on Home */
.due-card { padding: 16px 18px; border-radius: 20px; background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--hair); display: grid; gap: 10px; }
.due-card.overdue { box-shadow: inset 0 0 0 1px rgba(240, 132, 104, 0.45); }
.due-card.due { box-shadow: inset 0 0 0 1px rgba(214, 166, 69, 0.45); }
.due-card .top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.due-card .who { font-size: 16px; font-weight: 500; }
.due-card .what { color: var(--muted); font-size: 13px; }
.due-card .amt { margin-left: auto; font: 500 24px/1 var(--brand); }
.due-card .meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cards { display: grid; gap: 10px; }

.feed .row { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hair); font-size: 14px; }
.feed .row:first-child { border-top: 0; }
.feed .when { flex: none; width: 62px; color: var(--faint); font-size: 12px; padding-top: 2px; }
.feed .what { min-width: 0; overflow-wrap: anywhere; }
.feed .what small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- client page ---------- */

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 12px; color: var(--faint); }
.facts dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; white-space: pre-line; }
.facts .wide { grid-column: 1 / -1; }

.project { display: grid; gap: 16px; }
.project h2 { font: 500 26px/1.15 var(--brand); margin: 0; }
.project .ph { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.project .ph .grow { flex: 1; }
.project .link { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.project .link:hover { color: var(--gold-ink); }
.box { padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--hair); display: grid; gap: 8px; }
.box h3 { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.box h3 .aside { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; }
.box .line { font-size: 14px; }
.box .quiet { font-size: 13px; color: var(--muted); }
.plan-amt { font: 500 28px/1.1 var(--brand); }
.plan-amt small { font: 400 14px/1 var(--font); color: var(--muted); margin-left: 6px; }
.standing { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.standing .amt { font: 500 22px/1 var(--brand); }

.bills { width: 100%; border-collapse: collapse; font-size: 14px; }
.bills td { padding: 9px 6px; border-top: 1px solid var(--hair); vertical-align: middle; }
.bills tr:first-child td { border-top: 0; }
.bills td.n { text-align: right; white-space: nowrap; }
.bills td.a { text-align: right; width: 1%; white-space: nowrap; }
.bills small { display: block; color: var(--faint); font-size: 12px; }
.bills .pill { padding: 5px 11px; font-size: 12px; }

.ch { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 8px; border-top: 1px solid var(--hair); align-items: baseline; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer; border-radius: 0; }
.ch:first-child { border-top: 0; }
.ch:hover { background: rgba(255, 255, 255, 0.03); }
.ch .when { color: var(--faint); font-size: 12px; }
.ch .what { font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.ch .what small { display: block; color: var(--muted); font-size: 12px; }
.ch .r { text-align: right; display: grid; gap: 4px; justify-items: end; }

/* the banner as the client's app shows it (preview) */
.banner-demo { border-radius: 14px; padding: 14px 16px; background: #1b1206; box-shadow: inset 0 0 0 1px rgba(214, 166, 69, 0.6); display: grid; gap: 6px; }
.banner-demo.overdue { background: #1f0d08; box-shadow: inset 0 0 0 1px rgba(240, 132, 104, 0.7); }
.banner-demo b { font-size: 14px; }
.banner-demo p { margin: 0 !important; font-size: 14px; color: var(--fg) !important; }
.banner-demo .acts { margin-top: 4px; }

.search { width: 100%; padding: 12px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.35); color: var(--fg); font: 400 16px/1.2 var(--font); margin-bottom: 12px; }
.search:focus { outline: none; border-color: var(--gold); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filters button { padding: 6px 14px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.06); color: var(--muted); font-size: 13px; cursor: pointer; }
.filters button.on { background: var(--fg); color: #000; }

/* ---------- forms (in the sheet) ---------- */

.form { display: grid; gap: 12px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fl { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.fl .opt { color: var(--faint); font-weight: 400; }
.in, .sel, .area {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.4);
  color: var(--fg);
  font: 400 16px/1.3 var(--font);
}
.sel { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.sel option { background: #111; }
.area { min-height: 76px; resize: vertical; }
.in:focus, .sel:focus, .area:focus { outline: none; border-color: var(--gold); }
.in::-webkit-calendar-picker-indicator { filter: invert(0.8); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--fg); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); margin: 1px 0 0; flex: none; }
.check small { display: block; color: var(--muted); font-size: 12px; }
.form .note { font-size: 12px; color: var(--faint); margin: -4px 0 0; }

/* ---------- locked ---------- */

.lock { min-height: calc(100vh - 160px); display: grid; place-items: center; }
.lock .glass { width: min(440px, 100%); padding: 40px 34px 30px; text-align: center; }
.lock h1 { font: 500 34px/1.1 var(--brand); margin: 0 0 10px; }
.lock p { color: var(--muted); margin: 0 0 26px; }
.field { width: 100%; padding: 14px 16px; margin: 8px 0 16px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.35); color: var(--fg); font: 500 20px/1 var(--font); letter-spacing: 0.2em; text-align: center; }
.field:focus { outline: none; border-color: var(--gold); }
.lab { display: block; text-align: left; font-size: 13px; color: var(--muted); }
.btn { display: block; width: 100%; padding: 15px 20px; border: 0; border-radius: 999px; background: var(--gold); color: #000; font-weight: 600; font-size: 15px; cursor: pointer; transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.btn:hover { background: var(--gold-ink); }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.ghost { background: rgba(255, 255, 255, 0.08); color: var(--fg); margin-top: 10px; }
.btn.danger { background: rgba(240, 132, 104, 0.12); color: var(--bad); }
.linkbtn { margin-top: 18px; background: none; border: 0; color: var(--muted); font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- sheet + toast ---------- */

.sheet-back { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.55); }
.sheet { position: fixed; z-index: 21; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 26px; background: rgba(18, 18, 18, 0.78); overscroll-behavior: contain; }
.sheet h2 { font: 500 26px/1.2 var(--brand); margin: 0 0 6px; }
.sheet > p, .sheet .lead { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.sheet .actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet .actions .btn { margin: 0; }
.sheet .item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--hair); font-size: 14px; }
.sheet .item:first-of-type { border-top: 0; }
.sheet .item .what { flex: 1; min-width: 0; }
.sheet .item small { display: block; color: var(--muted); font-size: 12px; }
.sheet-h { margin: 22px 0 8px; font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.keybox { font: 500 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.5); box-shadow: inset 0 0 0 1px rgba(214, 166, 69, 0.45); overflow-wrap: anywhere; user-select: all; }

.toast { position: fixed; z-index: 30; left: 50%; bottom: max(90px, calc(env(safe-area-inset-bottom) + 80px)); transform: translateX(-50%); padding: 13px 22px; border-radius: 999px; font-size: 14px; background: rgba(30, 30, 30, 0.75); max-width: calc(100vw - 32px); }
.toast.bad { color: var(--bad); }

.rise { animation: rise 500ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } }

/* ---------- smaller screens ---------- */

@media (max-width: 860px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .figures { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .shell { padding-left: 10px; padding-right: 10px; }
  .bar { padding: 8px 8px 8px 18px; top: 8px; margin-bottom: 14px; }
  .mark { font-size: 17px; }
  .tabs { display: none; }
  .bar .iconbtn { margin-left: auto; }
  .dock:not([hidden]) { display: flex; }
  :root { --radius: 24px; }
  .panel { padding: 18px 16px 16px; }
  .figures { gap: 14px 12px; }
  .figure .big { font-size: 30px; }
  .page-head h1 { font-size: 30px; }
  .facts { grid-template-columns: 1fr; }
  .form .two { grid-template-columns: 1fr; }
  .sheet { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; max-height: 92dvh; border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .bills td { padding: 8px 4px; }
}

/* ---------- domains (2026-12-02) ---------- */

.dot.ok { background: var(--ok); }
.li .r .amt.bad { color: var(--bad); }
.li .r .amt.gold { color: var(--gold-ink); }
.dfacts { margin-top: 4px; }
.sheet .acts { margin-top: 16px; }
.alert-box { padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--hair); display: grid; gap: 10px; font-size: 14px; }
.alert-box p { margin: 0; color: var(--muted); }
