/* GoldDesk — simple, readable, mobile-first. Brand: Navy #0B1F44, Gold #D4A017, Off White #F5F6F8, Charcoal #1A1A1A, Montserrat. */
@font-face { font-family: "Montserrat"; src: url("fonts/Montserrat-var.ttf") format("truetype"); font-weight: 100 900; font-display: block; }
:root {
  /* GoldDesk brand palette */
  --navy: #0b1f44; --navy-2: #16326a; --navy-soft: #edf0f7; --navy-line: #d3daea;
  --gold: #d4a017; --gold-dark: #8a6a0c; --gold-soft: #fbf4df; --gold-line: #ecd894; --gold-bright: #f2cc4e;
  --green: #15803d; --green-soft: #e8f5ec;
  --ink: #1a1a1a; --muted: #5b6272; --bg: #f5f6f8; --card: #ffffff; --line: #e3e6ed;
  --ok: var(--green); --ok-bg: var(--green-soft); --err: #b42318; --err-bg: #fdecea; --info-bg: var(--navy-soft); --info: var(--navy);
  --warn-bg: #fff7dc; --radius: 10px;
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.45; }
a { color: var(--gold-dark); }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }

/* ---- layout ---- */
.topbar { background: var(--navy); color: #fff; display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; position: sticky; top: 0; z-index: 20; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: .3px; display: flex; align-items: center; gap: .45rem; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, var(--gold-bright), var(--gold)); display: inline-block; }
.topbar .who { margin-left: auto; font-size: .85rem; color: #c9d1e6; text-align: right; }
.topbar .who form { display: inline; }
.linkbtn { background: none; border: 0; color: var(--gold-bright); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.layout { display: flex; min-height: calc(100vh - 52px); }
.sidenav { width: 230px; background: #fff; border-right: 1px solid var(--line); padding: 1rem .5rem; flex-shrink: 0; }
.sidenav a { display: flex; justify-content: space-between; align-items: center; padding: .65rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.sidenav a:hover { background: var(--navy-soft); }
.sidenav a.active { background: var(--navy); color: #fff; font-weight: 700; }
.sidenav .sep { border-top: 1px solid var(--line); margin: .6rem .5rem; }
.sidenav .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .4rem .8rem; }
.count { background: var(--err); color: #fff; border-radius: 999px; font-size: .72rem; padding: .05rem .5rem; }
.main { flex: 1; padding: 1.25rem; max-width: 1200px; min-width: 0; }
.nav-toggle, .nav-toggle-label { display: none; }

@media (max-width: 860px) {
  .nav-toggle-label { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; background: var(--navy-2); color: #fff; font-size: 1.3rem; cursor: pointer; }
  .sidenav { display: none; position: fixed; top: 52px; left: 0; bottom: 0; width: 82%; max-width: 300px; z-index: 30; overflow-y: auto; box-shadow: 4px 0 24px rgba(0,0,0,.15); }
  .nav-toggle:checked ~ .layout .sidenav { display: block; }
  .main { padding: .9rem; }
  .topbar .who .name { display: none; }
}

/* ---- cards & grids ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.stat .k { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-size: 1.25rem; font-weight: 700; margin-top: .15rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .s { font-size: .8rem; color: var(--muted); }
.stat.gold { border-color: var(--gold-line); background: var(--gold-soft); }
.stat.neg .v { color: var(--err); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.quick a { display: block; text-align: center; padding: 1.1rem .5rem; background: #fff; border: 2px solid var(--gold-line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.05rem; }
.quick a:hover { border-color: var(--gold); background: var(--gold-soft); }
.quick a .ico { display: block; font-size: 1.6rem; margin-bottom: .2rem; }

/* ---- forms ---- */
label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
button, input, select, textarea { font-family: inherit; }
input[type=text], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: .7rem .75rem; font-size: 1rem; border: 1.5px solid #c9cfdb; border-radius: 8px; background: #fff; color: var(--ink); font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(160,125,28,.25); border-color: var(--gold); }
.field { margin-bottom: .9rem; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--err); background: #fffafa; }
.row { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.check input { width: 20px; height: 20px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; background: #fff; }
legend { font-weight: 700; padding: 0 .4rem; font-size: 1.05rem; }
.step { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; align-items: center; justify-content: center; font-size: .85rem; margin-right: .3rem; }
.inline-form { display: inline; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.1rem; font-size: 1rem; font-weight: 600; border-radius: 8px; border: 1.5px solid var(--gold); background: #fff; color: var(--gold-dark); cursor: pointer; text-decoration: none; min-height: 44px; font-family: inherit; }
.btn:hover { background: var(--gold-soft); }
.btn.primary { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn.primary:hover { background: var(--gold-dark); }
.btn.big { padding: .95rem 1.6rem; font-size: 1.1rem; width: 100%; }
.btn.danger { border-color: var(--err); color: var(--err); }
.btn.danger:hover { background: var(--err-bg); }
.btn.ok { border-color: var(--green); color: var(--green); }
.btn.ok:hover { background: var(--green-soft); }
.btn.small { padding: .35rem .7rem; min-height: 34px; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* choice pills (price additions, testing method) */
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choices label { display: inline-flex; align-items: center; gap: .45rem; border: 1.5px solid #c9cfdb; border-radius: 999px; padding: .55rem 1rem; cursor: pointer; font-weight: 600; background: #fff; margin: 0; min-height: 44px; }
.choices input { width: 18px; height: 18px; accent-color: var(--gold); }
.choices label:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-dark); }
.choices label.disabled { opacity: .45; cursor: not-allowed; }

/* payments */
.pay-row { display: grid; grid-template-columns: 1fr 1fr 44px; gap: .5rem; align-items: end; padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.pay-row > div:nth-child(3) { grid-column: 1; }
.pay-row > div:nth-child(4) { grid-column: 2; }
.pay-row .rm { grid-column: 3; grid-row: 1; }
.pay-row:last-of-type { border-bottom: 0; }
.pay-row .rm { height: 44px; }
@media (max-width: 760px) { .calc-sticky { position: static; } }
.pay-total { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; padding: .7rem; border-radius: 8px; background: var(--gold-soft); font-weight: 600; }
.pay-total.bad { background: var(--err-bg); color: var(--err); }
.pay-total.good { background: var(--ok-bg); color: var(--ok); }

/* live calculation panel */
.calc { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 1rem; }
.calc .line { display: flex; justify-content: space-between; padding: .25rem 0; border-bottom: 1px solid #2c3f6b; font-variant-numeric: tabular-nums; }
.calc .line:last-child { border-bottom: 0; }
.calc .total { font-size: 1.6rem; font-weight: 800; color: var(--gold-bright); margin-top: .5rem; text-align: right; }
.calc .err { color: #ffb4a8; }
.calc-sticky { position: static; margin-bottom: 1rem; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: .93rem; }
table.data th, table.data td { padding: .6rem .65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { background: var(--navy-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--navy); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr.voided td { color: #999; text-decoration: line-through; }
table.data tfoot td { font-weight: 700; background: var(--gold-soft); }
table.kv { width: 100%; border-collapse: collapse; }
table.kv th { text-align: left; color: var(--muted); font-weight: 600; padding: .45rem .5rem .45rem 0; width: 45%; vertical-align: top; }
table.kv td { padding: .45rem 0; font-variant-numeric: tabular-nums; }
table.kv tr { border-bottom: 1px solid var(--line); }
table.kv tr.total th, table.kv tr.total td { font-size: 1.15rem; font-weight: 800; color: var(--ink); border-top: 2px solid var(--gold); }
@media (max-width: 700px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: .6rem; padding: .3rem .2rem; background: #fff; }
  table.stack td { border: 0; padding: .3rem .6rem; text-align: right !important; }
  table.stack td::before { content: attr(data-label); float: left; color: var(--muted); font-size: .82rem; font-weight: 600; }
  table.stack tfoot { display: block; }
}

/* ---- badges & alerts ---- */
.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #eee; color: #444; white-space: nowrap; }
.badge.completed, .badge.approved, .badge.received { background: var(--ok-bg); color: var(--ok); }
.badge.pending, .badge.requested, .badge.in_transit { background: var(--warn-bg); color: #8a5a00; }
.badge.voided, .badge.rejected, .badge.cancelled, .badge.reversed { background: var(--err-bg); color: var(--err); }
.flash { padding: .8rem 1rem; border-radius: 8px; margin-bottom: .8rem; font-weight: 500; border: 1px solid transparent; }
.flash.success { background: var(--green-soft); color: var(--green); border-color: #b7e0c4; }
.flash.error { background: var(--err-bg); color: var(--err); border-color: #f5c2bd; }
.flash.info { background: var(--navy-soft); color: var(--navy); border-color: var(--navy-line); }
.notice { background: var(--warn-bg); border: 1px solid var(--gold-line); padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-bottom: 1rem; }
.filters .field { margin: 0; min-width: 140px; }
.tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs a { padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; }
.tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }

/* ---- auth ---- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--navy) url("brand/pattern.svg") center / 160px; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 14px; padding: 1.75rem; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.auth-card .brand { color: var(--ink); justify-content: center; font-size: 1.6rem; margin-bottom: .3rem; }

/* ---- print / receipt ---- */
.receipt { max-width: 760px; margin: 0 auto; background: #fff; padding: 1.5rem; }
.receipt-head { display: flex; justify-content: space-between; border-bottom: 3px solid var(--gold); padding-bottom: .6rem; margin-bottom: 1rem; gap: 1rem; }
.receipt-head .biz { font-size: 1.5rem; font-weight: 800; color: var(--gold-dark); }
.sign { display: flex; justify-content: space-between; margin-top: 2.5rem; gap: 2rem; }
.sign div { flex: 1; border-top: 1px solid #333; padding-top: .3rem; font-size: .85rem; }
.no-print { margin: 1rem auto; max-width: 760px; display: flex; gap: .5rem; }
@media print {
  .topbar, .sidenav, .no-print, .flash { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; }
  .receipt { padding: 0; }
}

/* show / hide password */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 4.6rem; }
.pw-toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: var(--gold-soft);
  color: var(--gold-dark); font: 600 .85rem system-ui, sans-serif; padding: .45rem .65rem; border-radius: 6px; cursor: pointer; min-height: 34px; }
.pw-toggle:hover { background: var(--gold-line); }
.check.remember { margin: .2rem 0 1rem; }
.check input { accent-color: var(--gold); }
.center { text-align: center; }

/* green for good news: money in, balances that add up, approvals */
.stat.pos .v, .num.pos { color: var(--green); }
.pay-total.good { background: var(--green-soft); color: var(--green); }
.stat.gold { border-color: var(--gold-line); background: var(--gold-soft); }
.stat { border-top: 3px solid var(--navy); }
.stat.gold { border-top-color: var(--gold); }
.auth-card { border-top: 5px solid var(--gold); }
.quick a:hover { border-color: var(--navy); background: var(--navy-soft); }
.receipt-head { border-bottom-color: var(--gold); }
.receipt-head .biz { color: var(--navy); }

/* ---- brand: logo, icons, pictures ---- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.brand { gap: .6rem; font-weight: 800; letter-spacing: -.2px; }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-divider { width: 2px; height: 26px; background: rgba(255,255,255,.85); }
.brand-word .g { color: var(--gold); } .brand-word .d { color: #fff; }
.brand-mark { display: none; }
.ico { width: 22px; height: 22px; flex-shrink: 0; }
.sidenav a { justify-content: flex-start; gap: .65rem; }
.sidenav a .count { margin-left: auto; }
.sidenav a .ico { color: var(--navy); }
.sidenav a.active .ico { color: #fff; }
.quick a .qi { width: 40px; height: 40px; display: block; margin: 0 auto .35rem; color: var(--navy); }
.btn .ico { width: 20px; height: 20px; }
.btn.primary .ico { color: var(--navy); }

/* sign-in page */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--navy); }
.auth-art { position: relative; background: var(--navy) url("brand/hero.svg") center / cover no-repeat; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 3rem; }
.auth-art .art-logo { height: 64px; width: auto; }
.auth-art .art-brand { display: flex; align-items: center; gap: 1rem; }
.auth-art .art-word { font-size: 2.6rem; font-weight: 800; letter-spacing: -1px; }
.auth-art .art-word .g { color: var(--gold); }
.auth-art .art-div { width: 3px; height: 54px; background: #fff; }
.tagline { font-weight: 600; letter-spacing: .02em; color: #dfe5f2; display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.tagline .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); display: inline-block; }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: var(--bg) url("brand/pattern-light.svg") center / 220px; }
.auth-card .card-logo { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: 1rem; }
.auth-card .card-logo img { height: 46px; }
.auth-card .card-logo .w { font-size: 1.65rem; font-weight: 800; letter-spacing: -.5px; }
.auth-card .card-logo .w .g { color: var(--gold); } .auth-card .card-logo .w .d { color: var(--navy); }
.auth-card .card-logo .dv { width: 2px; height: 34px; background: var(--navy); }
.auth-card h1 { font-size: 1.2rem; text-align: center; margin-bottom: 1rem; color: var(--navy); }
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-art { min-height: 220px; padding: 1.5rem; justify-content: flex-end; background-position: 15% 80%; }
  .tagline { font-size: .9rem; gap: .5rem; }
  .auth-art .art-word { font-size: 1.9rem; } .auth-art .art-logo { height: 46px; } .auth-art .art-div { height: 40px; }
  .auth-side { background: var(--navy) url("brand/pattern.svg") center / 160px; padding: 1.25rem 1rem 2.5rem; align-items: flex-start; }
}

/* dashboard welcome banner */
.hello { position: relative; border-radius: var(--radius); overflow: hidden; color: #fff; padding: 1.25rem 1.4rem; margin-bottom: 1rem;
  background: var(--navy) url("brand/banner.svg") right center / cover no-repeat; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; min-height: 112px; }
.hello h1 { color: #fff; margin: 0; font-size: 1.5rem; }
.hello p { margin: .2rem 0 0; color: #cfd7ea; }
.hello .btn { background: #fff; }
.hello .btn.primary { background: var(--gold); }
.empty-art { display: block; width: 92px; margin: 0 auto .6rem; opacity: .9; }
.receipt-logo { height: 54px; width: auto; display: block; }
.receipt-head .biz-name { font-size: .9rem; font-weight: 700; color: var(--navy); margin-top: .2rem; }
.tagline { text-shadow: 0 1px 8px rgba(0,0,0,.65); }

/* ---- page loading animation ---- */
#gd-loader { position: fixed; inset: 0; pointer-events: none; z-index: 1000; }
#gd-loader .bar { position: fixed; top: 0; left: 0; height: 4px; width: 0; opacity: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright), var(--gold)); background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(212,160,23,.85); border-radius: 0 3px 3px 0; }
html.gd-loading #gd-loader .bar { opacity: 1; animation: gd-bar 8s cubic-bezier(.1,.7,.2,1) forwards, gd-shine 1.1s linear infinite; }
@keyframes gd-bar { 0% { width: 0; } 8% { width: 38%; } 30% { width: 62%; } 100% { width: 94%; } }
@keyframes gd-shine { to { background-position: -200% 0; } }
#gd-loader .veil { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem;
  background: rgba(245,246,248,.86); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .15s; }
html.gd-slow #gd-loader .veil { opacity: 1; pointer-events: auto; }
#gd-loader .spin { position: relative; width: 86px; height: 86px; border-radius: 24px; background: #fff;
  box-shadow: 0 10px 30px rgba(11,31,68,.18); display: flex; align-items: center; justify-content: center; animation: gd-pulse 1.2s ease-in-out infinite; }
#gd-loader .spin img { width: 60px; height: auto; }
#gd-loader .spin::after { content: ""; position: absolute; inset: -7px; border-radius: 30px; border: 3px solid transparent;
  border-top-color: var(--gold); border-right-color: var(--gold); animation: gd-spin .9s linear infinite; }
#gd-loader .msg { font-weight: 700; color: var(--navy); font-size: .95rem; letter-spacing: .02em; }
@keyframes gd-spin { to { transform: rotate(360deg); } }
@keyframes gd-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(.95); } }

/* every page arrives with a short fade-up, and supporting browsers cross-fade between pages */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
.main, .auth-split, .receipt, .slip { animation: gd-enter .28s ease-out both; }
@keyframes gd-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html.gd-loading #gd-loader .bar { animation: none; width: 100%; }
  #gd-loader .spin, #gd-loader .spin::after, .main, .auth-split { animation: none; }
}
@media print { #gd-loader { display: none !important; } }
.brand-word { white-space: nowrap; }
@media (max-width: 860px) { .brand-word { font-size: 1.05rem; } .brand-logo { height: 28px; } .brand-divider { height: 22px; } .topbar .who { font-size: .78rem; } }

/* ---- owner dashboard ---- */
.owner-total { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 1.4rem 1.5rem; margin: 1rem 0; border-bottom: 4px solid var(--gold); }
.owner-total .k { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); font-weight: 600; }
.owner-total .v { font-size: clamp(2rem, 7vw, 3rem); font-weight: 800; line-height: 1.1; margin: .3rem 0; font-variant-numeric: tabular-nums; }
.owner-total .v.neg { color: #ffb4b4; }
.owner-total .s { font-size: .85rem; opacity: .8; }
.owner-worth { margin: .8rem 0 0; }
table.owner-places { max-width: 520px; }
table.data tfoot th { background: var(--gold-soft); font-weight: 700; }
.owner-split { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .owner-split { grid-template-columns: repeat(2, minmax(0, 1fr)); } .owner-split .stat { padding: .75rem .8rem; } .owner-split .stat .v { font-size: 1rem; } }

/* ---- live gold price ---- */
.gp { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem .8rem; margin: 1rem 0; }
.gp-head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: flex-end; }
.gp .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.gp-main .v { font-size: clamp(1.9rem, 6vw, 2.6rem); font-weight: 800; color: var(--navy); line-height: 1.1; margin: .2rem 0; font-variant-numeric: tabular-nums; border-radius: 6px; }
.gp-main .v.tick { animation: gp-tick 1.2s ease-out; }
@keyframes gp-tick { 0% { background: var(--gold-soft); } 100% { background: transparent; } }
.gp-change { font-weight: 600; font-size: .92rem; color: var(--muted); }
.gp-change.up, .gp-mini .s.up { color: var(--green); }
.gp-change.down, .gp-mini .s.down { color: var(--err); }
.gp-local { display: grid; grid-template-columns: repeat(3, auto); gap: .3rem 1.4rem; }
.gp-local > div { display: flex; flex-direction: column; }
.gp-local b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.gp-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin: 1rem 0 .4rem; }
.gp-controls .tabs { margin: 0; }
.tabs button { padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; }
.tabs button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.gp-chart { min-height: 240px; touch-action: pan-y; }
.gp-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.gp-msg { display: grid; place-items: center; min-height: 240px; color: var(--muted); text-align: center; padding: 1rem; }
.gp-grid { stroke: var(--line); stroke-width: 1; }
.gp-axis { fill: var(--muted); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.gp-empty { fill: var(--muted); font-size: 14px; font-family: inherit; }
.gp-line { fill: none; stroke: #B8860B; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.gp-line.mini { stroke-width: 1.8; }
.gp-last { fill: var(--green); stroke: #fff; stroke-width: 2; }
.gp-last.down { fill: var(--err); }
.gp-cross { stroke: var(--navy); stroke-width: 1; stroke-dasharray: 3 3; }
.gp-dot { fill: var(--navy); stroke: #fff; stroke-width: 2; }
.gp-tip { position: absolute; transform: translate(-50%, -100%); background: var(--navy); color: #fff; font-size: .82rem; font-weight: 600; padding: .35rem .6rem; border-radius: 6px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.gp-foot { font-size: .8rem; color: var(--muted); margin: .4rem 0 0; }
.gp-foot.live::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--green); margin-right: .4rem; animation: gp-pulse 2s infinite; }
@keyframes gp-pulse { 0% { box-shadow: 0 0 0 0 rgba(21,128,61,.5); } 70% { box-shadow: 0 0 0 7px rgba(21,128,61,0); } 100% { box-shadow: 0 0 0 0 rgba(21,128,61,0); } }
@media (max-width: 640px) { .gp-local { grid-template-columns: 1fr 1fr; } .gp { padding: .9rem .8rem .7rem; } }
.gp-mini { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--gold-line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: .7rem 1rem; margin: 0 0 1rem; text-decoration: none; color: var(--ink); }
.gp-mini:hover { background: var(--gold-soft); }
.gp-mini .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: .3rem; }
.gp-mini .k svg { width: 16px; height: 16px; }
.gp-mini .v { font-size: 1.3rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.gp-mini .s { font-size: .8rem; color: var(--muted); }
.gm-spark { width: 42%; max-width: 260px; min-width: 110px; }
.gm-spark svg { display: block; width: 100%; height: auto; }

/* ---- money owed to us ---- */
.neg-text { color: var(--err); font-weight: 600; }
details.cancel summary { list-style: none; cursor: pointer; }
details.cancel summary::-webkit-details-marker { display: none; }
details.cancel form { display: flex; gap: .4rem; margin-top: .4rem; }
details.cancel input { min-width: 160px; }
table.data tr.voided details { display: none; }
.owner-owed { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin-top: .8rem; text-decoration: none; color: var(--ink); }
.owner-owed:hover { border-color: var(--gold-line); background: var(--gold-soft); }
.owner-owed span { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.owner-owed b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
a.stat { text-decoration: none; color: inherit; }
a.stat:hover { border-color: var(--gold-line); }
