/* KumoAcct build 0.25.2 — panel styles. Colour/spacing tokens ported from template.zip (KumoDNS UI);
   plain CSS, no CDN, no build step. */
:root {
  --bg: #f5f7fa; --surface: #ffffff; --ink: #253044; --text: #405064; --muted: #7a8798; --border: #e7eaf0;
  --border-strong: #d8dde6; --primary: #747ba7; --primary-hover: #666d99; --link: #69719f;
  --danger: #b42318; --danger-bg: #fdf3f2; --head-bg: #f8f9fb; --radius: 14px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: linear-gradient(180deg, #fafbfc, var(--bg)); min-height: 100vh; overflow-x: hidden; }
h1, h2 { color: var(--ink); line-height: 1.25; }
h1 { font-size: 1.5rem; margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; margin: 0 0 1rem; }
a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible, .table-scroll:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.break { word-break: break-all; }

.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: rgba(252, 253, 255, .96); border-right: 1px solid var(--border); padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.nav-link:hover { background: var(--head-bg); }
.sidebar-user { margin-top: auto; font-size: .9rem; }
.user-name { color: var(--ink); font-weight: 600; }
.user-meta { color: var(--muted); font-size: .8rem; margin-bottom: 8px; word-break: break-all; }
.content { padding: 32px; min-width: 0; }
.page-head { margin-bottom: 24px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 2px rgba(69, 76, 110, .03); margin-bottom: 24px; }
.card.narrow { max-width: 440px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 8px; }
.stat-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--ink); margin: 6px 0; }
.stat-meta { font-size: .85rem; color: var(--muted); }

label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin: 16px 0 6px; }
.field { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; font: inherit; color: var(--ink); background: #fff; }
.btn { display: inline-block; margin-top: 20px; padding: 10px 18px; border: 0; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { margin-top: 0; padding: 6px 0; background: none; color: var(--link); }
.alert { padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f2c4c0; }
.codes { columns: 2; list-style: none; padding: 0; }
.codes li { padding: 4px 0; }

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { background: var(--head-bg); text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 10px 12px; }
table.data td { padding: 10px 12px; border-top: 1px solid var(--border); white-space: nowrap; }
table.data .num { text-align: right; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--head-bg); border: 1px solid var(--border); font-size: .8rem; text-transform: capitalize; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar nav { flex-direction: row; }
  .sidebar-user { margin-top: 0; margin-left: auto; }
  .user-meta { display: none; }
  .content { padding: 16px; }
}

/* ---- 0.2.0: customers & invoices screens ---- */
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nav-link.is-active { background: var(--head-bg); color: var(--ink); font-weight: 600; }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions .btn, .actions form .btn { margin-top: 0; }
.crumbs { margin: 0 0 4px; font-size: .9rem; }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--head-bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-small { padding: 4px 10px; font-size: .85rem; margin-top: 0; }
.btn.is-disabled { opacity: .5; pointer-events: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.inline { display: inline; }
.alert { margin-bottom: 16px; }
.alert-success { background: #ecfdf3; color: #0f7b4f; border: 1px solid #b7ebcf; }
.alert-info { background: #eef4ff; color: #3b4f8f; border: 1px solid #c9d7fb; }
.copy-row { display: flex; gap: 8px; margin-top: 8px; }
.copy-row .field { flex: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px 20px; }
.filters .form-field { margin: 0; }
.filters .form-field.grow { flex: 1 1 220px; }
.filters label { margin-top: 0; }
.filters .btn { margin-top: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; }
.card-head h2 { margin-bottom: 12px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); }
table.data th a { color: inherit; text-decoration: none; }
table.data td.wrap, table.data td .prewrap { white-space: normal; }
table.data tfoot td { border-top: 1px solid var(--border); }
table.data tfoot .total-total td { font-weight: 700; color: var(--ink); }
table.data tfoot .total-balance td { font-weight: 700; background: var(--head-bg); }
a.quiet { color: var(--text); text-decoration: none; }
.pill-active, .pill-paid { background: #ecfdf3; border-color: #b7ebcf; color: #0f7b4f; }
.pill-suspended, .pill-overdue, .pill-void, .pill-cancelled { background: #fdf3f2; border-color: #f2c4c0; color: var(--danger); }
.pill-draft { background: #fff8e6; border-color: #f3dca4; color: #9a6700; }
.pill-partially_paid { background: #eef4ff; border-color: #c9d7fb; color: #3b4f8f; }
.pill-refunded { background: #f3f4f6; border-color: #d9dce3; color: #4b5563; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.tab { padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.is-active { color: var(--ink); border-bottom-color: var(--primary); font-weight: 600; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-bottom: 24px; }
.pager .btn { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 20px; }
.form-grid fieldset { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.form-grid legend { font-weight: 700; color: var(--ink); padding: 0; margin-bottom: 4px; }
.span-all { grid-column: 1 / -1; }
.span-2 { grid-column: span 2; }
.form-field label { margin-top: 12px; }
.form-field.has-error .field, .field.is-invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; margin: 4px 0 0; padding-left: 0; list-style: none; }
.field-hint { color: var(--muted); font-size: .8rem; margin: 4px 0 0; }
.req { color: var(--danger); }
.form-actions { display: flex; gap: 8px; }
.form-actions .btn { margin-top: 4px; }
textarea.field { resize: vertical; }
select.field { padding: 9px 10px; }
.field.num { text-align: right; }
.stack { display: flex; flex-direction: column; gap: 6px; }
.stack label { margin-top: 6px; }
.stack .btn { align-self: flex-start; }
.stack-lg > * + * { margin-top: 16px; }
.row-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-form label { margin: 0; }
.row-form .btn { margin-top: 0; }
.row-form .field { width: auto; flex: 1 1 200px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.mt { margin-top: 16px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-top: 1px solid var(--border); display: grid; gap: 2px; }
.list li:first-child { border-top: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 6px 0; border-top: 1px dashed var(--border); }
.danger-zone { border-color: #f2c4c0; }
.prewrap { white-space: pre-wrap; }
.nowrap { white-space: nowrap; }
table.lines td { vertical-align: top; white-space: normal; }
table.lines .w-desc { min-width: 240px; }
table.lines .field { padding: 7px 8px; }
table.lines input[type=date] { width: 9.5rem; margin-bottom: 4px; display: block; }
table.lines td.nowrap .field { display: inline-block; width: auto; }
details summary { cursor: pointer; color: var(--link); }
@media (max-width: 760px) {
  .span-2 { grid-column: 1 / -1; }
  .row { flex-direction: column; }
  .filters { padding: 12px 16px; }
}

/* ---- 0.3.0: settings, email ---- */
.logo-preview { max-width: 260px; max-height: 120px; border: 1px solid var(--border); border-radius: 8px; padding: 8px; background: #fff; }
.logo-preview.watermark-preview { max-height: 160px; }
fieldset.plain { border: 0; padding: 0; margin: 0; }
fieldset.plain legend { font-weight: 600; color: var(--ink); font-size: .85rem; margin-bottom: 6px; }

/* 0.4.0 — staff, roles and logs */
.center { text-align: center; }
.check > span { line-height: 1.35; }
.check input[type=checkbox] { align-self: flex-start; margin-top: 3px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; margin-bottom: 8px; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; }
.perm-group h3 { margin: 8px 0 4px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.perm-group .check { margin-bottom: 6px; }
table.matrix th[scope=row] { white-space: normal; min-width: 220px; font-weight: 400; }
table.log-table details pre { margin: 0; max-width: 60ch; font-size: .8rem; }
table.log-table details[open] { min-width: 320px; }
.sev-warning, .pill-pending, .pill-unverified, .pill-invited, .pill-running, .pill-received, .pill-refused { background: #fff8e6; border-color: #f3dca4; color: #9a6700; }
.sev-critical, .sev-error, .pill-failed, .pill-rejected, .pill-disabled { background: #fdf3f2; border-color: #f2c4c0; color: var(--danger); }
.pill-sent, .pill-ok, .pill-succeeded, .pill-processed, .pill-performed { background: #ecfdf3; border-color: #b7ebcf; color: #0f7b4f; }
.sev-notice, .pill-ignored, .pill-cancelled, .pill-sending { background: #eef4ff; border-color: #c9d7fb; color: #3b4f8f; }

/* 0.4.2 — navigation icons */
.nav-icon { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.nav-link.is-active .nav-icon { opacity: 1; color: var(--primary); }
.nav-button { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.sidebar-user .nav-link { margin-top: 4px; }
@media (max-width: 760px) {
  .nav-link { padding: 8px; }
  .sidebar nav .nav-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sidebar nav .nav-icon { width: 22px; height: 22px; }
  .sidebar-user .user-name, .sidebar-user .user-meta { display: none; }
  .sidebar-user { display: flex; gap: 4px; }
  .sidebar-user .nav-link { margin-top: 0; }
  .sidebar-user .nav-link span { display: none; }
  .sidebar .brand span { display: none; }
  .sidebar nav { flex-wrap: wrap; }
}

/* 0.4.2 — sign-in pages (design follows the KumoBunker login). Geist: SIL OFL 1.1, see assets/fonts/Geist-OFL.txt */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 800; font-display: swap; src: url(../fonts/geist-var.woff2) format("woff2"); }
body.auth { background-color: #f8f7f4; background-image: radial-gradient(rgba(22,24,29,.13) 1px, transparent 1.2px); background-size: 22px 22px; }
.auth, .auth input, .auth button { font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.auth-stage { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 45rem; text-align: center; color: #232b3e; border: 1px solid #dde2ec; border-radius: 1.25rem;
  box-shadow: 0 30px 80px rgba(35,43,62,.14); padding: 4rem 2rem 4.25rem; background-color: #eef1f6; background-image:
  linear-gradient(135deg, transparent 0 16%, rgba(242,107,29,.09) 16% 24%, transparent 24% 100%),
  linear-gradient(135deg, transparent 0 25.5%, rgba(242,107,29,.55) 25.5% 26.1%, transparent 26.1% 100%),
  linear-gradient(135deg, transparent 0 31%, rgba(242,107,29,.05) 31% 40%, transparent 40% 100%),
  linear-gradient(135deg, transparent 0 58%, rgba(35,43,62,.035) 58% 72%, transparent 72% 100%),
  linear-gradient(135deg, transparent 0 80%, rgba(35,43,62,.05) 80% 83%, transparent 83% 100%),
  linear-gradient(135deg, #f4f6fa 0%, #eef1f6 45%, #e5eaf2 100%); }
.auth-card > .alert, .auth-card .login-form, .auth-card .login-lead, .auth-card .auth-codes { max-width: 28rem; margin-left: auto; margin-right: auto; text-align: left; }
.login-badge { width: 8.5rem; height: 8.5rem; margin: 0 auto; border-radius: 50%; background: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 6px rgba(35,43,62,.06), 0 16px 40px rgba(35,43,62,.16); overflow: hidden; }
.login-badge img { width: 5rem; height: auto; max-height: 4.4rem; object-fit: contain; }
.login-word { margin: 1.4rem auto 2.1rem; font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; color: #232b3e; }
.auth-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; color: #16181d; margin: 0 0 .6rem; }
.login-lead { margin: 0 auto 1.4rem; font-size: 1rem; line-height: 1.5; color: #3a3e48; }
.login-lead.small { margin-top: 1.4rem; font-size: .85rem; text-align: center; }
.login-form { display: flex; flex-direction: column; gap: 1.1rem; }
.login-form + .login-form { margin-top: 1.1rem; }
.pill-field { position: relative; display: flex; align-items: center; border: 1.5px solid #c9d0dd; border-radius: 999px; background: #fff;
  box-shadow: 0 2px 6px rgba(35,43,62,.05); transition: border-color .15s, box-shadow .15s; }
.pill-field:focus-within { border-color: #f26b1d; box-shadow: 0 0 0 4px rgba(242,107,29,.16); }
.pill-icon { flex: none; width: 1.2rem; height: 1.2rem; margin-left: 1.15rem; fill: #5b6478; stroke: none; }
.pill-icon path[stroke] { stroke: #5b6478; }
.pill-field input { flex: 1; min-width: 0; border: 0; background: transparent; color: #16181d; font-size: 1.05rem; padding: .95rem 1rem .95rem .8rem; border-radius: 999px; }
.pill-field input:focus { outline: none; }
.pill-field input::placeholder { color: #7a8296; }
.pill-field input.code-input { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.pill-field input.code-input::placeholder { letter-spacing: normal; }
.pill-eye { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-right: .35rem; border: 0; border-radius: 50%; background: transparent; color: #5b6478; cursor: pointer; }
.pill-eye svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pill-eye:hover, .pill-eye:focus-visible { background: #eef1f6; color: #232b3e; outline: none; }
.pill-eye[aria-pressed="true"] .eye-slash { display: none; }
.login-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; font-size: .9rem; }
.login-link { color: #232b3e; text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }
.login-link:hover, .login-link:focus-visible { color: #b4470a; }
.login-btn { align-self: center; display: inline-block; min-width: 12rem; margin-top: 1rem; padding: .9rem 2.4rem; border: 0; border-radius: 999px; background: #c2460c;
  color: #fff; font-size: 1rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer; box-shadow: 0 10px 24px rgba(194,70,12,.28); }
.login-btn:hover { background: #a63b0a; color: #fff; }
.login-btn:focus-visible { outline: 3px solid #232b3e; outline-offset: 3px; }
.auth-card .field-hint, .auth-card .field-error { margin: -.6rem 0 0 1.2rem; text-align: left; }
.auth-label { font-weight: 600; font-size: .9rem; }
.auth-details { text-align: left; }
.auth-back { margin-top: 1.6rem; }
.auth-foot { margin-top: 1.2rem; font-size: .8rem; color: #6b7685; }
@media (max-width: 420px) {
  .auth-card { padding: 2.75rem 1.25rem 3rem; border-radius: 1rem; }
  .login-badge { width: 7rem; height: 7rem; }
}

/* 0.5.3 — top bar with the account menu (top right), following the supplied topmenu.png sample */
.main-col { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; min-height: 40px; padding: 4px 24px; background: #e9edf3; border-bottom: 1px solid var(--border); color: var(--ink); }
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 8px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.user-btn:hover, .user-menu[open] > .user-btn { background: rgba(37, 48, 68, .07); }
.user-menu > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.user-icon { width: 20px; height: 20px; fill: var(--muted); }
.user-caret { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.user-btn-name { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 10px); min-width: 240px; max-width: calc(100vw - 32px); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(20, 28, 45, .18); padding: 8px; }
.user-menu-head { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.user-menu-head .user-meta { margin-bottom: 0; }
.user-menu-panel .nav-link { margin-top: 2px; }
@media (max-width: 760px) {
  .topbar { padding: 4px 16px; min-height: 38px; }
  .user-menu-head .user-meta { display: block; }
}

/* 0.5.5 — two-factor QR code, sidebar group separator */
.qr-box { margin: 0 auto 1.2rem; text-align: center; }
.qr { display: inline-block; width: 222px; height: 222px; max-width: 100%; height: auto; padding: 10px; background: #fff; border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(35, 43, 62, .12); image-rendering: pixelated; }
.nav-sep { border: 0; border-top: 1px solid var(--border); margin: 8px 6px; }
@media (max-width: 760px) { .nav-sep { display: none; } }

/* 0.5.7 — settings tabs: part of the page (no inner scrolling); on narrow screens they wrap onto another line */
.settings-tabs { flex-wrap: wrap; overflow: visible; }
.settings-tabs .tab { white-space: nowrap; }
/* 0.5.9 — same tab bar for Logs */
.tab-bar { flex-wrap: wrap; overflow: visible; }
.tab-bar .tab { white-space: nowrap; }
/* 0.7.0 — dashboard summary */
.dash-heading { font-size: 1rem; margin: 8px 0 12px; }
.dash-heading .muted { font-weight: 400; }
.dash-grid { margin-bottom: 16px; }
.dash-grid .card { margin-bottom: 0; }
a.stat-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s; }
a.stat-link:hover, a.stat-link:focus-visible { border-color: var(--border-strong); }
.stat-good .stat-value { color: #0f7b4f; }
.stat-bad .stat-value { color: var(--danger); }
.dash-notes { margin: 0 0 24px; color: var(--text); }
.dash-trend tr.is-current th, .dash-trend tr.is-current td { font-weight: 600; }
.dash-trend .bars-col { width: 34%; min-width: 120px; }
.bar { display: block; height: 7px; border-radius: 4px; width: 0; }
.bar + .bar { margin-top: 3px; }
.bar-billed, .legend-billed { background: #b9bedb; }
.bar-received, .legend-received { background: #4fb286; }
.legend { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 8px; vertical-align: -1px; }
.bar.w0 { width: 0%; }
.bar.w5 { width: 5%; }
.bar.w10 { width: 10%; }
.bar.w15 { width: 15%; }
.bar.w20 { width: 20%; }
.bar.w25 { width: 25%; }
.bar.w30 { width: 30%; }
.bar.w35 { width: 35%; }
.bar.w40 { width: 40%; }
.bar.w45 { width: 45%; }
.bar.w50 { width: 50%; }
.bar.w55 { width: 55%; }
.bar.w60 { width: 60%; }
.bar.w65 { width: 65%; }
.bar.w70 { width: 70%; }
.bar.w75 { width: 75%; }
.bar.w80 { width: 80%; }
.bar.w85 { width: 85%; }
.bar.w90 { width: 90%; }
.bar.w95 { width: 95%; }
.bar.w100 { width: 100%; }
/* 0.7.0 — email template editor */
.tpl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .tpl-layout { grid-template-columns: 1fr; } }
.tpl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tpl-preview { display: none; width: 100%; height: 640px; margin-top: 16px; border: 1px solid var(--border); border-radius: 10px; background: #f5f7fa; }
.tpl-preview.is-open { display: block; }
.tpl-placeholders { list-style: none; margin: 0; padding: 0; }
.tpl-placeholders li { margin: 0 0 10px; }
.tpl-placeholders .btn { margin: 0 0 3px; font-size: .78rem; }
.tpl-placeholders span { display: block; color: var(--text); }
.tpl-history { list-style: none; margin: 0; padding: 0; }
.tpl-history li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.tox-tinymce { border-radius: 10px !important; }
.setting-group { margin: 12px 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.setting-sep { border: 0; border-top: 1px solid var(--border); margin: 16px 0 4px; width: 100%; }
/* 0.7.4: Branding section on the General settings tab; sortable History headers */
.settings-branding { margin-top: 32px; scroll-margin-top: 16px; }
.settings-branding > .section-title { margin-bottom: 4px; }
table.data th[aria-sort] a { color: var(--ink); font-weight: 700; }
/* 0.7.5: Currencies — click a row to edit (dialog), drag handle at the right to reorder */
.card-note { padding: 0 20px; margin: 4px 0 8px; }
.currency-table .handle-col { width: 44px; text-align: right; padding-right: 12px; }
.drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); color: var(--muted); cursor: grab; touch-action: none; }
.drag-handle:hover, .drag-handle:focus-visible { color: var(--ink); border-color: var(--border-strong); }
.drag-handle .nav-icon { width: 18px; height: 18px; opacity: 1; }
.is-reordering, .is-reordering .drag-handle { cursor: grabbing; user-select: none; }
.currency-table tr.is-dragging td { background: var(--head-bg); box-shadow: inset 0 1px 0 var(--primary), inset 0 -1px 0 var(--primary); }
.is-saving { opacity: .6; pointer-events: none; }
dialog.modal { border: 1px solid var(--border); border-radius: var(--radius); padding: 0; width: min(480px, calc(100% - 32px));
  max-height: calc(100% - 32px); background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgba(37, 48, 68, .18); }
dialog.modal::backdrop { background: rgba(37, 48, 68, .45); }
dialog.modal:not(:modal)[open] { position: relative; margin: 0 auto 24px; } /* no-JS: shown inline below the list */
.modal-body { padding: 20px 24px 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal-head h2 { margin: 0; }
.modal-close { font-size: 24px; line-height: 1; color: var(--muted); text-decoration: none; padding: 4px 8px; border-radius: 8px; }
.modal-close:hover { color: var(--ink); background: var(--head-bg); }
.modal-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px; }
.modal-foot form { margin: 0; }
/* 0.7.7: settings Save asks for the reason in a pop-up; "not saved" notice */
.toast { position: fixed; top: 16px; right: 16px; z-index: 1000; max-width: min(420px, calc(100% - 32px)); margin: 0;
  box-shadow: 0 8px 24px rgba(37, 48, 68, .16); cursor: pointer; transition: opacity .4s ease; }
.toast.is-leaving { opacity: 0; }
dialog[data-reason-dialog] label { display: block; margin-bottom: 6px; font-weight: 600; }
dialog[data-reason-dialog] .field { width: 100%; }
/* 0.8.0 (all tabs since 0.8.1): settings as rows — label | control + description (owner's billing.png reference) */
.form-grid.setting-rows { grid-template-columns: 1fr; gap: 0; }
.setting-rows .setting-row { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 0 12px; align-items: stretch; margin-bottom: 3px; }
.setting-row-label { text-align: right; font-weight: 600; color: var(--ink); padding: 8px 0; align-self: center; }
.setting-row-control { background: #eef1f5; border-radius: 6px; padding: 6px 10px; }
.setting-row-label label { margin: 0; }
.setting-row-label .pill { margin-left: 6px; font-size: .7rem; vertical-align: middle; }
.setting-row-control .field { max-width: 420px; }
.setting-row-control.is-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.setting-row-control.is-inline .field-hint, .setting-row-control .check .field-hint { margin: 0; }
.setting-row-control .field.field-days { width: 5.5rem; flex: 0 0 auto; }
.setting-row-control textarea.field { max-width: 640px; }
.setting-row-control > .field-hint { display: block; }
.setting-row-control.is-inline > .field-hint { display: inline; font-size: .85rem; }
.setting-row-control .check { font-size: .9rem; }
.setting-row.has-error .field { border-color: var(--danger); }
.pill-muted { color: var(--muted); text-transform: none; }
.setting-rows .setting-group { margin-top: 16px; }
/* 0.8.1: every settings tab uses the rows; fixed label column so Save buttons line up under the inputs */
.setting-rows .setting-row { grid-template-columns: 220px minmax(0, 1fr); }
.setting-rows .form-actions { padding-left: 232px; margin-top: 12px; }
.setting-rows fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.setting-rows legend { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 400; margin: 16px 0 6px; }
.setting-rows fieldset > .field-hint { margin: 0 0 6px 232px; }
.setting-row-control .field.field-short { width: 9rem; flex: 0 0 auto; }
.setting-row-control.is-inline form { margin: 0; }
.card.setting-rows > h2 { margin-bottom: 8px; }
@media (max-width: 760px) {
  .setting-rows .setting-row { grid-template-columns: 1fr; }
  .setting-row-label { text-align: left; }
  .setting-rows .form-actions { padding-left: 0; }
  .setting-rows fieldset > .field-hint { margin-left: 0; }
}
/* 0.8.2: Lock-outs — "Add to trusted list" beside the "not in the trusted list" pill */
.ip-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 12px; }
.ip-line form { margin: 0; }
/* 0.9.0: Transactions (owner's transaction.png) — folder tabs that open a panel, net revenue chart */
.panel-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--border); margin: 8px 0 0; padding: 0 4px; flex-wrap: wrap; }
.panel-tab { display: inline-block; padding: 8px 18px; border: 1px solid var(--border); border-bottom: 0; border-radius: 8px 8px 0 0;
  background: var(--head-bg); color: var(--ink); text-decoration: none; font-weight: 600; margin-bottom: -1px; }
.panel-tab:hover, .panel-tab:focus-visible { background: var(--surface); }
.panel-tab.is-open { background: var(--surface); border-bottom: 1px solid var(--surface); }
.panel-body { border-top-left-radius: 0; border-top-right-radius: 0; margin-top: 0; }
.chart-card { margin-top: 16px; }
.chart { display: block; width: 100%; height: auto; max-height: 360px; }
.tx-table td.num, .tx-table th.num { white-space: nowrap; }
.panel-body[hidden], .form-field[hidden] { display: none; }
/* 0.9.2: Settings → Payment gateways (owner's gateway.png) — one panel per gateway, grey title bar, rows */
.gw-list { display: grid; gap: 16px; margin: 8px 0 24px; }
.gw-panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.gw-panel.is-dragging { box-shadow: 0 0 0 2px var(--primary); }
.gw-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--head-bg); border-bottom: 1px solid var(--border); }
.gw-name { margin: 0; font-size: 1.1rem; font-weight: 600; }
.gw-module { margin-left: auto; color: var(--muted); }
.gw-handle { width: 30px; height: 30px; }
.gw-panel.is-inactive .gw-name { color: var(--muted); }
.gw-toggle { cursor: pointer; padding: 8px 16px; color: var(--muted); font-size: .9rem; }
.gw-details[open] > .gw-toggle { border-bottom: 1px solid var(--border); }
.gw-body { padding: 12px 16px 16px; }
.gw-actions { align-items: center; flex-wrap: wrap; }
.gw-actions form { margin: 0; }
.gw-instructions { min-height: 8rem; font-family: inherit; }
.setting-row-control textarea.field.gw-instructions { max-width: 100%; width: 100%; }
.gw-sub { margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--border); }
/* 0.9.3: Payment gateways reached from Billing; activate dialog */
.gw-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.gw-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 16px 0 8px; }
.gw-pick { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.gw-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.gw-option:has(input:checked) { border-color: var(--primary); background: var(--head-bg); }
.gw-option input { margin-top: 3px; }
dialog#gw-activate { width: min(560px, calc(100% - 32px)); }
/* 0.9.5: Payment gateways heading with Back to Billing; Set default beside each name */
.gw-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px 16px; margin: 16px 0 4px; } /* 0.9.6: button right beside the heading */
.gw-title .btn { margin-top: 0; }
.gw-title-h { margin: 0; }
.gw-default-form { margin: 0; display: inline; }
.gw-qr { width: 120px; height: auto; border: 1px solid var(--border); border-radius: 6px; background: #fff; padding: 4px; }
/* 0.9.7: Airwallex connection setup dialog (rows need more width than the default dialog) */
dialog.gw-aw-modal { width: min(820px, calc(100% - 32px)); }
.gw-aw-modal .modal-foot form { display: inline; }
.gw-aw-test { margin: 16px 0 0; } /* 0.9.8: Test connection result inside the dialog, above Save */

/* 0.10.0 Reports */
table.report-table tbody th, table.report-table tfoot th { background: none; text-transform: none; letter-spacing: 0; font-size: inherit; color: var(--ink);
  font-weight: 600; border-top: 1px solid var(--border); white-space: nowrap; }
table.report-table tfoot td, table.report-table tfoot th { background: var(--head-bg); }
table.report-table tfoot tr.muted td, table.report-table tfoot tr.muted th { font-weight: 400; color: var(--muted); background: none; }
table.report-table .bars-col { width: 22%; min-width: 120px; }
.text-bad { color: var(--danger); }

/* 0.12.2 invoice page: Refund pop-up (from the Transactions table) */
dialog.refund-modal { width: min(680px, calc(100% - 32px)); }
.refund-modal .setting-row { padding: 10px 0; }
.refund-modal .rf-amount { max-width: 160px; }
.refund-modal .alert { margin: 8px 0 0; }
.refund-modal .refund-form .field { width: 100%; }
.refund-modal [hidden] { display: none !important; } /* setting rows are display:grid, which would override [hidden] */

/* 0.13.1 invoice page: one row of action buttons below Transactions, each opening a pop-up */
.inv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.inv-actions-card h2 { margin-bottom: 12px; }
.inv-actions .btn { margin-top: 0; }
dialog.inv-modal-wide { width: min(860px, calc(100% - 32px)); }
.inv-modal h3 { font-size: 1rem; }

/* 0.13.2 coloured action buttons (soft tint: light background, coloured text and border) */
.btn-tint { border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease; }
.btn-tint-blue   { background: #eef4ff; color: #2f4fb3; border-color: #c9d7fb; }
.btn-tint-blue:hover   { background: #dde8ff; border-color: #a9c0f5; }
.btn-tint-teal   { background: #e8f7f5; color: #0f7068; border-color: #b6e3dd; }
.btn-tint-teal:hover   { background: #d4f0ec; border-color: #8fd2c9; }
.btn-tint-red    { background: #fdf3f2; color: #b42318; border-color: #f2c4c0; }
.btn-tint-red:hover    { background: #fbe4e2; border-color: #eba8a2; }
.btn-tint-slate  { background: #f1f3f7; color: #3d4a5e; border-color: #d8dde6; }
.btn-tint-slate:hover  { background: #e5e9f0; border-color: #c4cbd6; }
.btn-tint-violet { background: #f3f0ff; color: #5b47b8; border-color: #d9d0fb; }
.btn-tint-violet:hover { background: #e8e2ff; border-color: #c2b4f5; }
.btn-tint-green  { background: #ecfdf3; color: #0f7b4f; border-color: #b7ebcf; }
.btn-tint-green:hover  { background: #d9f7e6; border-color: #93dbb4; }
.btn-tint-amber  { background: #fff8e6; color: #8a5a00; border-color: #f3dca4; }
.btn-tint-amber:hover  { background: #fdefc9; border-color: #e9c777; }
.btn-tint:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* 0.14.0 Add Payment: charge saved card */
.charge-card { border: 1px solid #c9d7fb; background: #f7f9ff; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
.charge-card h3 { margin: 0 0 8px; }
.charge-card .row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.charge-card .row-form .btn { margin-top: 0; }

/* 0.15.0 customer portal */
body.portal { background: var(--bg); }
.portal-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.portal-brand img { max-height: 40px; max-width: 200px; display: block; }
.portal-brand span { font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.portal-brand { text-decoration: none; }
.portal-user { display: flex; align-items: center; gap: 12px; }
.portal-main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 40px; }
.portal-card { max-width: 520px; margin: 40px auto; }
.portal-card .btn { margin-top: 8px; }
.portal-choice { margin: 8px 0; }
.portal-actions { display: flex; gap: 6px; }
.portal-actions .btn { margin-top: 0; }
.portal-foot { text-align: center; padding: 16px; }

/* 0.16.0 Cloudflare Turnstile widget on sign-in forms */
.turnstile-row { margin: 12px auto; min-height: 65px; display: flex; justify-content: center; } /* 0.16.4: normal widget (300 x 65 px), centred */
.auth-card .login-lead.login-lead-center { text-align: center; }
.otp-setup { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.otp-setup img { border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.otp-key { font-size: 1.05rem; letter-spacing: .05em; }
.portal-narrow { max-width: 420px; }
.portal-staffbar { background: #fff8e6; border-bottom: 1px solid #f3dca4; color: #8a5a00; text-align: center; padding: 8px 16px; font-size: .9rem; }
.portal-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.portal-filter .btn { margin-top: 0; }
.auth-card .login-lead.login-lead-top { margin-top: 0; text-align: center; } /* 0.16.7 forgot-password: instruction right under the logo */
/* 0.16.8 sign-in: Turnstile at the left of "Forgot password?" (wraps under it on narrow screens) */
.login-row.login-row-check { flex-wrap: wrap; margin: 4px 0 2px; align-items: flex-start; } /* 0.16.9: "Forgot password?" at the top of the row */
.turnstile-row.turnstile-inline { margin: 0; justify-content: flex-start; }
.login-row-check .login-link { margin-left: auto; }
/* 0.16.11 inline field errors on sign-in / password forms (shown by app.js under the field) */
.auth-card .js-field-error { margin: -.55rem 0 .5rem 1.2rem; font-weight: 500; }
.stack .js-field-error { margin: -4px 0 6px; }
.pill-field:has(input[aria-invalid="true"]) { box-shadow: 0 0 0 2px rgba(180, 35, 24, .55); }
/* 0.16.12 Customers list: narrow ID column, so Name starts further left */
table.data th.col-id, table.data td.col-id { width: 1%; white-space: nowrap; padding-right: 8px; }
/* 0.18.1 searchable menus: a button that opens a list with a search field at the top (app.js); the real select is hidden */
.combo { position: relative; width: 100%; }
.combo-native { display: none; }
.combo-btn { width: 100%; text-align: left; color: var(--ink); background-color: #fff; cursor: pointer; padding-right: 2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.combo-pop { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0; min-width: 16rem; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 10px 24px rgba(16, 24, 40, .14); padding: 6px; }
.combo-search { width: 100%; margin: 0 0 6px; }
.combo-list { list-style: none; margin: 0; padding: 0; max-height: 15rem; overflow-y: auto; }
.combo-list li { padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.combo-list li[aria-selected="true"] { font-weight: 600; }
.combo-list li.is-active, .combo-list li[role=option]:hover { background: rgba(116, 123, 167, .14); }
.combo-list li.combo-none { color: var(--muted); cursor: default; background: none; }
/* 0.18.3: phone code dropdown and number side by side (the open list may be wider than the code box) */
.phone-row { display: flex; gap: 8px; align-items: flex-start; }
.phone-row .combo, .phone-row select { flex: 0 0 42%; width: auto; min-width: 0; }
.phone-row input[type="tel"] { flex: 1 1 auto; width: auto; min-width: 0; }
/* 0.18.4 phone field like the common "flag +65 ▾ | number" control: one bordered field; the list spans the field */
@font-face { font-family: "Twemoji Country Flags"; font-display: swap; src: url(../fonts/twemoji-country-flags.woff2) format("woff2");
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F; }
.flag { font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 1.15em; line-height: 1; width: 1.5em; display: inline-block; }
.phone-row.tel-field { position: relative; gap: 0; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; }
.phone-row.tel-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(116, 123, 167, .18); }
.has-error .phone-row.tel-field { border-color: var(--danger); }
.tel-field .combo { position: static; flex: 0 0 auto; width: auto; }
.tel-field .combo-btn-tel { display: inline-flex; align-items: center; gap: 4px; width: auto; border: 0; background: transparent; font: inherit; color: var(--ink);
  padding: 10px 6px 10px 12px; cursor: pointer; border-radius: 10px 0 0 10px; white-space: nowrap; }
.tel-field .combo-btn-tel::after { content: ""; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; margin-left: 4px; }
.tel-field .combo-btn-tel:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.tel-field input[type="tel"] { flex: 1 1 auto; border: 0; box-shadow: none; outline: none; background: transparent; padding-left: 6px; }
.tel-field .combo-pop { left: -1px; right: -1px; min-width: 0; }
.combo-list li { display: flex; align-items: center; gap: 4px; }
.combo-list .combo-dial { margin-left: 4px; }
.combo-list .muted { color: var(--muted); }
.combo-list li.combo-sep { height: 0; padding: 0; margin: 6px -6px; border-top: 1px solid var(--border-strong); border-radius: 0; cursor: default; background: none; }
/* 0.18.5 flags in the country menu button */
.combo-btn .flag { margin-right: 4px; vertical-align: -1px; }
/* 0.19.0 small "optional" and (?) notes next to field names; password + Generate row */
.label-row { display: flex; align-items: center; gap: 6px; margin: 12px 0 6px; }
.label-row label { margin: 0; }
.opt { font-size: .72rem; font-weight: 500; color: var(--muted); text-transform: lowercase; margin-left: 2px; }
.help-tip { position: relative; display: inline-flex; }
.help-tip-btn { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid var(--border-strong); background: #fff; color: var(--muted);
  font: 600 .7rem/16px var(--font); cursor: help; text-align: center; }
.help-tip-btn:hover, .help-tip-btn:focus-visible { color: var(--ink); border-color: var(--primary); outline: none; }
.help-tip-text { display: none; position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 16rem;
  padding: 8px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 400; line-height: 1.4; box-shadow: 0 6px 16px rgba(16, 24, 40, .18); }
.help-tip:hover .help-tip-text, .help-tip-btn:focus + .help-tip-text { display: block; }
.pw-gen-row { display: flex; gap: 8px; }
.pw-gen-row .field { flex: 1 1 auto; min-width: 0; }
/* 0.20.0 Payment gateways: currency checkboxes */
.gw-currencies { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 4px; }
.gw-currencies .check-inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
/* 0.20.3 customer form columns: Business | Contact + Billing | Address | Customer portal login + Status */
.form-grid.customer-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid.customer-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.customer-grid .form-col { min-width: 0; }
@media (max-width: 1100px) { .form-grid.customer-grid.cols-4, .form-grid.customer-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .form-grid.customer-grid.cols-4, .form-grid.customer-grid.cols-3 { grid-template-columns: 1fr; } }
/* 0.21.0 customer form sections as grey panels with small uppercase headings, like Settings */
.customer-grid { gap: 16px; align-items: start; }
.customer-grid fieldset:not(.span-all) { background: #eef1f5; border-radius: 10px; padding: 12px 14px 14px; margin: 0; }
.customer-grid fieldset > legend { float: left; width: 100%; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin: 0 0 2px; }
.customer-grid fieldset > legend + * { clear: both; }
.customer-grid fieldset .field { background: #fff; }
.customer-grid .form-col > fieldset + fieldset { margin-top: 28px; }
.customer-grid fieldset.span-all { margin-top: 4px; }
/* 0.23.0 customer portal laid out like the staff panel */
.portal-sidebrand { display: block; padding: 4px 4px 14px; text-decoration: none; }
.portal-sidebrand img { max-width: 100%; max-height: 48px; display: block; }
.portal-sidebrand span { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.portal-who { padding: 10px 12px; margin: 0 0 12px; background: #eef1f5; border-radius: 10px; }
.portal-who-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.portal-switch { display: flex; gap: 6px; margin-top: 8px; }
.portal-switch .field { min-width: 0; flex: 1 1 auto; padding: 6px 8px; }
.portal-app .portal-foot { padding: 0 24px 20px; text-align: left; }
.portal-app .topbar .pill { margin-left: auto; }
/* 0.24.1 Payment Methods: card security note */
.card-security-note { display: flex; gap: 10px; align-items: flex-start; }
.card-security-note .nav-icon { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; }
.card-security-note p { margin: 0; }
/* 0.25.2 Transactions: refund rows */
.data tr.tx-refund td:nth-child(6) { color: var(--danger); }
