:root {
  --bg: #eff9fc;
  --panel: #fff;
  --line: #d5ecf4;
  --ink: #07154a;
  --muted: #4c6c8c;
  --accent: #0077B6;
  --side: #03045E;
  --ok: #1a9b5c;
  --warn: #c77700;
  --bad: #d23c3c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; background: var(--bg); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link, var(--accent)); cursor: pointer; }

/* ------------------------------------------------------------- Sidebar */
.side { width: 220px; flex-shrink: 0; background: var(--side); color: #CAF0F8; display: flex; flex-direction: column; }
.co-switch { padding: 16px 14px; border-bottom: 1px solid #1a2496; }
.co-cur { display: flex; gap: 10px; align-items: center; cursor: pointer; border-radius: 8px; padding: 6px; margin: -6px; }
.co-cur:hover { background: #0b1380; }
.co-cur img, .co-cur .ph { width: 38px; height: 38px; border-radius: 8px; object-fit: contain; background: #fff; flex-shrink: 0; }
.co-cur .ph { display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; }
.co-cur b { color: #fff; display: block; font-size: 13.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.co-cur small { color: #90E0EF; }
.co-menu[hidden] { display: none; }
.co-menu { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.co-menu a { color: #CAF0F8; padding: 6px 8px; border-radius: 6px; text-decoration: none; font-size: 13px; }
.co-menu a:hover { background: #0b1380; }
.co-menu a.on { color: #fff; font-weight: 600; }
nav { padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
nav a { color: #CAF0F8; text-decoration: none; padding: 8px 12px; border-radius: 7px; }
nav a:hover { background: #0b1380; color: #fff; }
nav a.on { background: var(--accent); color: #fff; }
nav .new { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 6px; padding-left: 8px; }
nav .new a { font-size: 13px; color: #90E0EF; padding: 6px 12px; }
nav .sep { height: 1px; background: #1a2496; margin: 8px 4px; }
.side-foot { padding: 12px 16px; font-size: 11.5px; color: #90E0EF; }

/* ------------------------------------------------------------- Main */
main { flex: 1; overflow: auto; min-width: 0; }
.view { padding: 26px 30px 60px; max-width: 1100px; }
.view.wide { max-width: none; padding: 0; height: 100%; }
.view h2 { margin: 0 0 4px; font-size: 22px; }
.view .sub { color: var(--muted); margin: 0 0 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card .hint { color: var(--muted); font-size: 12.5px; margin: 0 0 14px; }

.btn { border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c4cad6; background: #fafbfc; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.ghost { border-color: transparent; background: none; }
.btn:disabled { opacity: .5; cursor: default; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid .full { grid-column: 1 / -1; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
label.f > input, label.f > select, label.f > textarea, .inp {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--ink); font-size: 14px; width: 100%;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
label.chk { display: flex; gap: 8px; align-items: center; cursor: pointer; padding: 3px 0; }

/* image pickers (logo, signature, stamp) */
.pick { display: flex; gap: 14px; align-items: center; }
.pick .img { width: 150px; height: 84px; border: 1px dashed #c4cad6; border-radius: 10px; display: grid; place-items: center; background: #fafbfc
  repeating-conic-gradient(#f0f2f5 0 25%, #fff 0 50%) 0 0 / 14px 14px; overflow: hidden; color: var(--muted); font-size: 12px; text-align: center; }
.pick .img img { max-width: 92%; max-height: 92%; object-fit: contain; }
.pick .acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* ------------------------------------------------------------- Lists */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat small { color: var(--muted); display: block; font-size: 12px; }
.stat b { font-size: 20px; display: block; margin-top: 4px; }
.filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.filters .inp { width: 240px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 7px 12px; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent); color: #fff; }
table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.list th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 14px; background: #fafbfc; border-bottom: 1px solid var(--line); }
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover td { background: #f7f9fd; }
table.list .r { text-align: right; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: #eef1f6; color: #4a5468; }
.badge.paid { background: #e3f6ec; color: var(--ok); }
.badge.partial { background: #fff3dc; color: var(--warn); }
.badge.unpaid { background: #fde8e8; color: var(--bad); }
.badge.overdue { background: var(--bad); color: #fff; }
.badge.t-invoice { background: #CAF0F8; color: #0077B6; }
.badge.t-receipt { background: #e3f6ec; color: var(--ok); }
.badge.t-quote { background: #f1e8fc; color: #7a3fd6; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 12px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }

/* ------------------------------------------------------------- Editor */
.editor { display: flex; height: 100%; }
.ed-form { width: 520px; flex-shrink: 0; overflow: auto; padding: 18px 20px 60px; border-right: 1px solid var(--line); background: var(--bg); }
.ed-prev { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #d9dee7; }
.ed-bar { display: flex; gap: 8px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.ed-bar .status { color: var(--muted); font-size: 12.5px; }
.paper-wrap { flex: 1; overflow: auto; padding: 24px; }
.paper { margin: 0 auto; background: #fff; box-shadow: 0 6px 30px rgba(20, 30, 50, .18); transform-origin: top left; }
.paper iframe { border: 0; display: block; background: #fff; }
.ed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ed-head h2 { margin: 0; font-size: 19px; }
.ed-form .card { padding: 14px 16px; }
.items-ed { width: 100%; border-collapse: collapse; }
.items-ed th { font-size: 11.5px; color: var(--muted); text-align: left; font-weight: 600; padding: 0 4px 6px; }
.items-ed td { padding: 3px 4px; vertical-align: top; }
.items-ed .inp { padding: 6px 8px; font-size: 13.5px; }
.items-ed textarea.inp { min-height: 34px; field-sizing: content; }
.items-ed .amt { text-align: right; padding-top: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.items-ed .x { border: 0; background: none; color: #a0a8b8; cursor: pointer; font-size: 18px; padding: 4px; }
.items-ed .x:hover { color: var(--bad); }
.tot-mini { display: flex; justify-content: flex-end; gap: 18px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.tot-mini b { color: var(--ink); font-size: 15px; }
.tax-row { display: grid; grid-template-columns: 1fr 90px auto auto; gap: 8px; align-items: center; margin-bottom: 6px; }

/* ------------------------------------------------------------- Design */
.tpls { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tpl { border: 2px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; background: #fff; text-align: center; font-weight: 600; font-size: 13px; }
.tpl.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.tpl .mini { height: 80px; border-radius: 6px; margin-bottom: 8px; background: #f5f6f9; position: relative; overflow: hidden; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.sw.on { box-shadow: 0 0 0 2px var(--ink); }
.design-wrap { display: flex; gap: 20px; align-items: flex-start; }
.design-wrap .left { flex: 1; min-width: 0; }
.design-wrap .right { width: 420px; flex-shrink: 0; position: sticky; top: 0; }
.design-wrap .paper-wrap { padding: 0; background: #d9dee7; border-radius: 12px; padding: 16px; height: calc(100vh - 60px); }

/* ------------------------------------------------------------- Modal, toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 20, 30, .45); display: grid; place-items: center; z-index: 50; }
.modal { background: #fff; border-radius: 14px; padding: 20px; width: min(560px, 92vw); max-height: 88vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal h3 { margin: 0 0 12px; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.sigpad { border: 1px solid var(--line); border-radius: 10px; width: 100%; height: 200px; touch-action: none; cursor: crosshair; background: #fff; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(120px); background: #07154a; color: #fff; padding: 11px 16px;
  border-radius: 10px; transition: transform .25s; z-index: 60; display: flex; gap: 12px; align-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
#toast.show { transform: translateX(-50%) translateY(0); }
#toast a { color: #90E0EF; font-weight: 600; }

.welcome { max-width: 560px; margin: 8vh auto; text-align: center; }
.welcome h1 { font-size: 30px; margin: 0 0 8px; }
.welcome p { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.ac { position: relative; }
.ac-list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 20; max-height: 220px; overflow: auto; }
.ac-list div { padding: 8px 10px; cursor: pointer; font-size: 13px; }
.ac-list div:hover, .ac-list div.on { background: #f0f4fd; }
.ac-list small { color: var(--muted); margin-left: 6px; }

@media (max-width: 1100px) {
  .ed-form { width: 440px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .design-wrap { flex-direction: column; }
  .design-wrap .right { width: 100%; position: static; }
}

/* ------------------------------------------------------------- Calculator & Ghana VAT panel */
.tools { position: fixed; right: 22px; bottom: 22px; width: 340px; max-height: calc(100vh - 44px); display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(15, 20, 30, .28); z-index: 40; }
.tools[hidden] { display: none; }
.tools-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--line); cursor: move; user-select: none; }
.tools-head .seg button { padding: 5px 10px; font-size: 12.5px; }
.tools-x { border: 0; background: none; font-size: 22px; line-height: 1; color: #8a93a5; cursor: pointer; padding: 0 4px; }
.tools-x:hover { color: var(--ink); }
.tools-body { padding: 12px; overflow: auto; }
.tools-body[hidden] { display: none; }
.calc-screen { background: #03045E; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.calc-in { width: 100%; border: 0; background: none; color: #fff; font-size: 24px; text-align: right; font-variant-numeric: tabular-nums; outline: none; padding: 0; }
.calc-in::placeholder { color: #5c6780; }
.calc-res { color: #90E0EF; text-align: right; font-size: 14px; min-height: 18px; font-variant-numeric: tabular-nums; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc-keys button { border: 1px solid var(--line); background: #fafbfc; border-radius: 9px; padding: 11px 0; font-size: 16px; cursor: pointer; }
.calc-keys button:hover { background: #eef1f6; }
.calc-keys button:active { transform: translateY(1px); }
.calc-keys .fn { font-size: 13px; color: var(--muted); }
.calc-keys .op { color: var(--accent); font-weight: 600; }
.calc-keys .eq { background: var(--accent); border-color: var(--accent); color: #fff; }
.tools-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tools-acts .btn { white-space: normal; text-align: left; }
.calc-mem { font-size: 12px; color: var(--muted); margin-top: 6px; min-height: 0; }
.calc-tape { margin-top: 8px; border-top: 1px solid var(--line); max-height: 150px; overflow: auto; }
.calc-tape div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 2px; font-size: 12.5px; cursor: pointer; border-bottom: 1px dashed var(--line); }
.calc-tape div:hover { background: #f5f7fb; }
.calc-tape span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg.full { display: flex; }
.seg.full button { flex: 1; font-size: 12.5px; }
.vat-tab { width: 100%; border-collapse: collapse; margin-top: 12px; font-variant-numeric: tabular-nums; }
.vat-tab td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.vat-tab .sub td { color: var(--muted); font-size: 13px; }
.vat-tab .grand td { font-weight: 700; font-size: 15px; border-bottom: 0; background: color-mix(in srgb, var(--accent) 8%, #fff); }
.vat-tab .r { text-align: right; }
.vat-tab small { font-size: 11px; }
.vat-note { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.45; }

/* sums in amount boxes, rate editing, line discounts */
.sum-tip { position: fixed; z-index: 70; background: #03045E; color: #90E0EF; font-size: 12px; padding: 3px 8px; border-radius: 6px; pointer-events: none; font-variant-numeric: tabular-nums; }
.sum-tip[hidden] { display: none; }
input.bad-sum { border-color: var(--warn) !important; }
.pv-grid { display: grid; grid-template-columns: 56px 1fr 64px 84px; gap: 6px; }
.pv-grid .inp { padding: 7px 8px; }
.vat-edit { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.vat-edit[hidden] { display: none; }
.ve-rows { margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.ve-row { display: grid; grid-template-columns: 1fr 54px auto auto auto; gap: 5px; align-items: center; }
.ve-row .inp { padding: 6px 7px; font-size: 13px; }
.ve-row span { color: var(--muted); font-size: 12px; }
.ve-row .chk { font-size: 12px; padding: 0; white-space: nowrap; }
.doc-taxes { margin-top: 14px; }
.label-sm { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.tax-row.doc { grid-template-columns: auto 1fr 70px auto auto; }
.tax-row .x { border: 0; background: none; color: #a0a8b8; cursor: pointer; font-size: 18px; padding: 4px; }
.tax-row .x:hover { color: var(--bad); }

/* payments, records, void */
.banner { background: #eef3ff; border: 1px solid #d5e0fb; color: #29407a; border-radius: 10px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }
.banner.bad { background: #fdeaea; border-color: #f5c6c6; color: #9b2121; }
.badge.void { background: #3b3f48; color: #fff; }
tr.voided td { color: #9aa1ad; text-decoration: line-through; }
tr.voided td .badge, tr.voided td .issued-mark { text-decoration: none; }
.issued-mark { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.pay-list { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.pay-list td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.pay-list .r { text-align: right; }
.pay-list .x, table.list .x { border: 0; background: none; color: #a0a8b8; cursor: pointer; font-size: 18px; padding: 0 4px; }
.pay-list .x:hover, table.list .x:hover { color: var(--bad); }
.muted { color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.chip b { color: var(--ink); margin-left: 4px; }
.aging { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.aging div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.aging small { display: block; color: var(--muted); font-size: 12px; }
.aging b { font-size: 16px; }
.aging .late b { color: var(--bad); }
.modal.wide-modal { width: min(900px, 94vw); }
.issued-view { background: #d9dee7; border-radius: 10px; padding: 15px; max-height: 70vh; }
code { font-size: 12px; background: #f1f3f7; padding: 2px 6px; border-radius: 5px; word-break: break-all; }

/* cash flow */
.stats.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; }
.cash-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.cash-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.cash-chart { display: block; margin-top: 8px; }
.chart-tip { position: fixed; z-index: 70; background: #03045E; color: #fff; font-size: 12px; line-height: 1.5; padding: 7px 10px; border-radius: 8px; white-space: pre; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.chart-tip[hidden] { display: none; }
.cat-row { display: grid; grid-template-columns: 1fr 34px; gap: 2px 8px; align-items: center; margin: 7px 0; font-size: 13px; }
.cat-top { display: flex; justify-content: space-between; gap: 8px; grid-column: 1 / -1; }
.cat-top span { color: var(--ink); }
.cat-track { height: 6px; background: #eef0f4; border-radius: 3px; overflow: hidden; }
.cat-track div { height: 100%; border-radius: 3px; }
.cat-row small { color: var(--muted); text-align: right; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }
.ed-bar .btn { padding: 7px 11px; font-size: 13px; }
@media (max-width: 1200px) { .cash-grid { grid-template-columns: 1fr; } .stats.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* company setup save bar, businesses */
.save-bar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 8px; background: rgba(243,245,249,.96); backdrop-filter: blur(6px);
  margin: -26px -30px 14px; padding: 12px 30px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.co-menu a[data-go-biz] { color: #8fa3c8; }
.biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.biz { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.biz.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.biz-top { display: flex; gap: 12px; align-items: center; }
.biz-top img, .biz-top .ph { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; flex-shrink: 0; border: 1px solid var(--line); }
.biz-top .ph { display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 20px; border: 0; }
.biz-top b { display: block; font-size: 15px; } .biz-top small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-top .badge { margin-left: auto; }
.biz-stats { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); } .biz-stats b { color: var(--ink); }
.biz-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.biz.add { border-style: dashed; cursor: pointer; justify-content: center; align-items: center; text-align: center; min-height: 150px; color: var(--muted); }
.biz.add b { color: var(--accent); font-size: 15px; } .biz.add:hover { background: #f8faff; }

/* credit notes, withholding tax, budgets, reports */
.badge.t-credit { background: #fdeee3; color: #b4530f; }
.wht-box { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; background: #fafbfc; }
.cat-row.budget { grid-template-columns: 1fr 120px; }
.budget-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; max-height: 260px; overflow: auto; padding-right: 4px; }
.budget-grid label.f { font-size: 11.5px; }
.report-wrap { background: #d9dee7; border-radius: 12px; }
[data-outonly][hidden], [data-duef][hidden] { display: none; }

/* watermark settings */
label.f > input[type="range"] { padding: 0; border: 0; background: none; accent-color: var(--accent); height: 22px; }
input[type="range"]:focus { outline: none; }
.range-val { float: right; color: var(--ink); font-weight: 600; }
.wm-opts.off { opacity: .45; pointer-events: none; }
.range-ends { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: -8px; }

/* ------------------------------------------------------------- Security & cloud */
body.staff [data-owner] { display: none !important; }
nav > div[data-owner] { display: flex; flex-direction: column; gap: 2px; }
.side-foot { display: flex; flex-direction: column; gap: 6px; line-height: 1.35; }
.side-foot .who { display: flex; justify-content: space-between; align-items: center; color: #CAF0F8; }
.side-foot .who a { color: #90E0EF; font-weight: 600; text-decoration: none; }

.lock { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 0%, #1b2b63 0%, #0b1226 62%); }
.lock-card { width: 380px; background: rgba(255,255,255,.97); border-radius: 22px; padding: 34px 30px 26px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.lock-card h1 { margin: 6px 0 2px; font-size: 22px; letter-spacing: .08em; }
.lock-icon { width: 84px; height: 84px; }
.lock-name { color: var(--muted); margin: 4px 0 16px; }
.lock-in { text-align: center; font-size: 18px; letter-spacing: .12em; padding: 11px; }
.lock-msg { min-height: 20px; color: var(--bad); font-size: 13px; margin: 10px 0 4px; }
.lock-link { font-size: 13px; display: inline-block; }
.lock-form { display: flex; flex-direction: column; gap: 8px; }
.lock-users { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 16px; }
.lock-user { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.lock-user span { width: 26px; height: 26px; border-radius: 50%; background: #CAF0F8; color: #0077B6; display: grid; place-items: center; font-weight: 700; }
.lock-user.on { border-color: #0077B6; box-shadow: 0 0 0 3px rgba(0,119,182,.16); }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.rkey { font: 700 21px/1.4 "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; text-align: center; padding: 16px; border: 2px dashed #c4cad6; border-radius: 12px; background: #fafbfc; user-select: all; }

.score { padding: 4px 12px; border-radius: 99px; font-size: 13px; }
.score.ok { background: #e3f6ec; color: var(--ok); } .score.mid { background: #fff3dc; color: var(--warn); } .score.low { background: #fde8e8; color: var(--bad); }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.check > span { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #fff3dc; color: var(--warn); }
.check.ok > span { background: #e3f6ec; color: var(--ok); }
.check b { display: block; font-size: 13.5px; } .check small { color: var(--muted); }
table.act td { font-size: 13px; padding: 8px 12px; } table.act tbody tr { cursor: default; }
tr.warnrow td { background: #fff8ec; }

.pv { width: 34px; height: 34px; border-radius: 9px; color: #fff; font-weight: 800; display: inline-grid; place-items: center; flex-shrink: 0; }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pv-card { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.pv-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.pv-card small { color: var(--muted); font-size: 11.5px; word-break: break-all; }
.cloud-state { margin: 14px 0 10px; padding: 10px 12px; border-radius: 10px; background: #eef3ff; color: #29407a; font-weight: 600; font-size: 13.5px; }
.cloud-state.ok { background: #e3f6ec; color: #13774a; } .cloud-state.warn { background: #fff3dc; color: #8a5300; } .cloud-state.bad { background: #fde8e8; color: #9b2121; }
.net { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #fde8e8; color: var(--bad); }
.net.on { background: #e3f6ec; color: var(--ok); }
.kv3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kv3 small { display: block; color: var(--muted); font-size: 12px; } .kv3 b { font-size: 14px; }
ul.how { margin: 6px 0 0; padding-left: 20px; color: #3b4456; line-height: 1.7; font-size: 13.5px; }
