/* One stylesheet for the public pages, the customer area and the staff area. */
:root {
  --ink: #0e1726;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-2: #f6f8fb;
  --bg-3: #eef2f7;
  --brand: #0f766e;
  --brand-2: #14b8a6;
  --brand-ink: #ffffff;
  --brand-soft: #e6f6f4;
  --night: #0b1220;
  --night-2: #111a2e;
  --ok: #15803d;
  --ok-soft: #e8f6ec;
  --warn: #b45309;
  --warn-soft: #fdf3e2;
  --bad: #b91c1c;
  --bad-soft: #fdeaea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6edf7;
    --ink-2: #c3cede;
    --muted: #8b9ab1;
    --line: #223049;
    --bg: #0b1220;
    --bg-2: #0f1829;
    --bg-3: #15203a;
    --brand: #2dd4bf;
    --brand-2: #5eead4;
    --brand-ink: #062a27;
    --brand-soft: #0f2e2c;
    --ok: #4ade80;
    --ok-soft: #10291a;
    --warn: #fbbf24;
    --warn-soft: #2d2410;
    --bad: #f87171;
    --bad-soft: #2f1416;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--sans); color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: .9em; }
code { background: var(--bg-3); padding: .1em .35em; border-radius: 5px; }
pre { background: var(--night); color: #d6e2f3; padding: 1rem 1.1rem; border-radius: 10px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; padding: .65em 1.15em; border-radius: 9px; border: 1px solid transparent;
  font: 600 .95rem/1.2 var(--sans); cursor: pointer; background: var(--brand); color: var(--brand-ink); text-decoration: none; transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg-2); }
.btn.light { background: #fff; color: var(--night); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { padding: .4em .8em; font-size: .85rem; }
.btn.big { padding: .85em 1.5em; font-size: 1.05rem; }
.btn.block { width: 100%; }
button.link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }
button.link:hover { text-decoration: underline; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.logo small { font-weight: 600; color: var(--muted); font-size: .8rem; letter-spacing: 0; }
.mainnav { display: flex; gap: 22px; flex: 1; }
.mainnav a { color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.mainnav a.on, .mainnav a:hover { color: var(--brand); text-decoration: none; }
.top .actions { display: flex; gap: 10px; align-items: center; }
.navtoggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; color: var(--ink); cursor: pointer; }
@media (max-width: 880px) {
  .navtoggle { display: block; margin-left: auto; }
  .mainnav, .top .actions { display: none; }
  .top.open .wrap { flex-wrap: wrap; height: auto; padding-block: 12px; }
  .top.open .mainnav { display: flex; flex-direction: column; width: 100%; order: 3; gap: 12px; padding-top: 8px; }
  .top.open .actions { display: flex; width: 100%; order: 4; padding-bottom: 6px; }
}

/* ---------- marketing ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 80% -10%, rgba(20, 184, 166, .22), transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(37, 99, 235, .14), transparent 60%), var(--night); color: #e8eef8; padding: 88px 0 72px; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { font-size: 1.2rem; color: #b7c4d8; max-width: 56ch; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 18px; }
.hero .btn.ghost { color: #e8eef8; border-color: #2a3a58; }
.hero .btn.ghost:hover { background: #16223a; }
.hero .note { color: #8ea0bb; font-size: .9rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-2); margin-bottom: 14px; }
.section .eyebrow { color: var(--brand); }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }

.mock { background: #0e1830; border: 1px solid #22314f; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); overflow: hidden; font-size: .85rem; }
.mock .bar { display: flex; gap: 6px; padding: 10px 12px; background: #0b1428; border-bottom: 1px solid #1d2a45; }
.mock .bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3a58; }
.mock .body { display: grid; grid-template-columns: 150px 1fr; min-height: 300px; }
.mock .side { background: #0b1428; padding: 14px 10px; border-right: 1px solid #1d2a45; }
.mock .side b { display: block; color: #fff; margin: 0 6px 12px; }
.mock .side span { display: block; padding: 6px 8px; border-radius: 6px; color: #8ea0bb; }
.mock .side span.on { background: #13253f; color: #5eead4; }
.mock .main { padding: 16px; }
.mock .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.mock .tile { background: #12203a; border: 1px solid #1d2a45; border-radius: 9px; padding: 10px; }
.mock .tile small { color: #8ea0bb; display: block; }
.mock .tile strong { color: #fff; font-size: 1.15rem; }
.mock .meter { height: 6px; background: #1d2a45; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.mock .meter i { display: block; height: 100%; background: linear-gradient(90deg, #14b8a6, #38bdf8); }
.mock .rows div { display: flex; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid #1a2741; color: #c3cede; }
.mock .rows em { font-style: normal; color: #4ade80; font-size: .8rem; }
@media (max-width: 520px) { .mock .body { grid-template-columns: 1fr; } .mock .side { display: none; } }

.logos { display: flex; flex-wrap: wrap; gap: 10px 26px; color: #8ea0bb; font-weight: 600; font-size: .9rem; margin-top: 34px; }
.logos span::before { content: "✓"; color: var(--brand-2); margin-right: 6px; }

.section { padding: 84px 0; }
.section.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section .head { max-width: 680px; margin-bottom: 44px; }
.section .head.center { margin-inline: auto; }
.section .head p { color: var(--muted); font-size: 1.1rem; }
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.feature { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.feature .ic svg { width: 22px; height: 22px; }
.feature p { color: var(--muted); margin: 0; }
.feature ul { margin: .6em 0 0; padding-left: 1.1em; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: .7em; }
.checks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%230f766e'%3E%3Cpath d='M8.2 13.6 4.8 10.2l-1.2 1.2 4.6 4.6 8.4-8.4-1.2-1.2z'/%3E%3C/svg%3E") center/14px no-repeat; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li { counter-increment: s; position: relative; padding: 18px 20px 18px 66px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(s); position: absolute; left: 20px; top: 18px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.steps li h3 { margin-bottom: .25em; }
.steps li p { margin: 0; color: var(--muted); }
.quote { font-size: 1.15rem; border-left: 3px solid var(--brand); padding-left: 18px; color: var(--ink-2); }
.cta-band { background: linear-gradient(120deg, #0f766e, #0e5f8a); color: #fff; border-radius: 18px; padding: 48px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .2em; }
.cta-band p { margin: 0; color: #d3f1ec; }
.terminal { background: var(--night); border-radius: 12px; border: 1px solid #1d2a45; overflow: hidden; }
.terminal .bar { padding: 8px 12px; background: #0b1428; color: #8ea0bb; font: 12px var(--mono); display: flex; justify-content: space-between; align-items: center; }
.terminal pre { margin: 0; border-radius: 0; }
.copy { background: #1a2741; color: #c3cede; border: 0; border-radius: 6px; padding: 3px 9px; font: 12px var(--sans); cursor: pointer; }
.copy:hover { background: #22345a; }
.compare { width: 100%; border-collapse: collapse; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.compare th { background: var(--bg-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .8em 0 0; color: var(--muted); }
.prose h2 { margin-top: 1.8em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { color: var(--ink-2); }
.pagehead { padding: 64px 0 36px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.pagehead p { color: var(--muted); font-size: 1.15rem; max-width: 62ch; margin: 0; }
.pagehead .center p, .pagehead.center p, .center > p { margin-inline: auto; }

/* ---------- pricing ---------- */
.toggle { display: inline-flex; background: var(--bg-3); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 34px; }
.toggle a { padding: 7px 18px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.toggle a.on { background: var(--bg); color: var(--ink); box-shadow: var(--shadow); text-decoration: none; }
.toggle a:hover { text-decoration: none; }
.save { background: var(--ok-soft); color: var(--ok); font-size: .75rem; padding: 2px 8px; border-radius: 999px; margin-left: 6px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; align-items: stretch; }
.plan { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; }
.storegroup { margin: 34px 0 16px; }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.plan .tag { position: absolute; top: -12px; left: 28px; background: var(--brand); color: var(--brand-ink); font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { font-size: 1.3rem; margin-bottom: .2em; }
.plan .tagline { color: var(--muted); min-height: 3em; }
.plan .price { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 0; }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .billed { color: var(--muted); font-size: .88rem; margin-bottom: 20px; }
.plan ul { flex: 1; margin-bottom: 24px; }
.plan input[type=radio] { position: absolute; opacity: 0; }
label.plan { cursor: pointer; }
label.plan:has(input:checked) { border: 2px solid var(--brand); box-shadow: var(--shadow); }
label.plan:has(input:focus-visible) { outline: 3px solid var(--brand-2); outline-offset: 2px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: .65em .8em; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
textarea { min-height: 160px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: .3em; }
.hp { position: absolute; left: -9999px; }
.authbox { max-width: 440px; margin: 56px auto 80px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 34px; box-shadow: var(--shadow); }
.authbox h1 { font-size: 1.6rem; }
.authbox .alt { text-align: center; margin-top: 18px; color: var(--muted); font-size: .92rem; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .95rem; border: 1px solid; }
.alert.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); color: var(--ok); }
.alert.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad); }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.alert.info { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); color: var(--ink-2); }
/* Impersonation ("login as user") banner: deliberately loud and persistent. */
.alert.impersonate { background: var(--bad-soft); border-color: var(--bad); border-left-width: 5px; color: var(--bad); font-weight: 600; }
.alert.impersonate .link { font-weight: 700; text-decoration: underline; }
.alert form { display: inline; }

/* ---------- footer ---------- */
.foot { background: var(--night); color: #8ea0bb; padding: 56px 0 30px; margin-top: 0; font-size: .92rem; }
.foot .cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 30px; }
.foot h4 { color: #fff; font-size: .9rem; margin-bottom: 12px; }
.foot a { color: #b7c4d8; display: block; margin-bottom: 7px; }
.foot .logo { color: #fff; }
.foot .legal { border-top: 1px solid #1d2a45; margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .foot .cols { grid-template-columns: 1fr 1fr; } }

/* ---------- portal ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--night); color: #b7c4d8; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .logo { color: #fff; margin: 4px 8px 24px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #b7c4d8; font-size: .93rem; font-weight: 500; }
.sidebar nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.sidebar nav a:hover { background: #16223a; text-decoration: none; color: #fff; }
.sidebar nav a.on { background: #13253f; color: #5eead4; }
.sidebar nav .badge { margin-left: auto; }
.sidebar .group { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #5d6f8c; margin: 22px 10px 6px; }
.sidebar .me { margin-top: auto; border-top: 1px solid #1d2a45; padding: 14px 10px 0; font-size: .85rem; }
.sidebar .me strong { color: #fff; display: block; overflow: hidden; text-overflow: ellipsis; }
.sidebar .me button { color: #8ea0bb; }
.content { padding: 30px 36px 60px; min-width: 0; background: var(--bg-2); }
.content > .inner { max-width: 1080px; }
/* a page whose main matter is a list uses the width there is, so its table needs no sideways scrolling */
.content > .inner:has(> .card.flush table.list):not(:has(.cols2)) { max-width: 1680px; }
table.list .mono { white-space: nowrap; }
.pagebar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.pagebar h1 { font-size: 1.6rem; margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.mobilebar { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .app.open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
  .mobilebar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--night); color: #fff; position: sticky; top: 0; z-index: 30; }
  .mobilebar .logo { color: #fff; font-size: 1.05rem; }
  .mobilebar button { background: none; border: 1px solid #2a3a58; color: #fff; border-radius: 8px; padding: 5px 10px; }
  .content { padding: 22px 16px 50px; }
}
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.card > h2, .card > h3 { font-size: 1.05rem; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 18px 22px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat small { color: var(--muted); font-size: .82rem; display: block; }
.stat strong { font-size: 1.6rem; letter-spacing: -.02em; }
.tablewrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.list th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: var(--bg-2); }
table.list td.r, table.list th.r { text-align: right; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty .btn { margin-top: 12px; }
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--bg-3); color: var(--ink-2); text-transform: capitalize; white-space: nowrap; }
.badge.active, .badge.paid, .badge.answered { background: var(--ok-soft); color: var(--ok); }
.badge.unpaid, .badge.grace, .badge.customer-reply, .badge.open, .badge.pending, .badge.high { background: var(--warn-soft); color: var(--warn); }
.badge.expired, .badge.suspended, .badge.urgent, .badge.void, .badge.cancelled { background: var(--bad-soft); color: var(--bad); }
.badge.count { background: var(--brand); color: var(--brand-ink); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.keybox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 600 1.15rem var(--mono); letter-spacing: .04em; background: var(--bg-2); border: 1px dashed var(--line); padding: 12px 16px; border-radius: 10px; }
.keybox .copy { background: var(--bg-3); color: var(--ink-2); font-family: var(--sans); letter-spacing: 0; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions-row form { margin: 0; }
.cols2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
@media (max-width: 980px) { .cols2 { grid-template-columns: 1fr; } }
.thread { display: grid; gap: 14px; }
.msg { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.msg.staff { border-left: 3px solid var(--brand); background: color-mix(in srgb, var(--brand-soft) 45%, var(--bg)); }
.msg .who { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.msg .who strong { color: var(--ink); }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.invoice-doc { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
.invoice-doc .ihead { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.invoice-doc .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
@media (max-width: 600px) { .invoice-doc { padding: 20px; } .invoice-doc .parties { grid-template-columns: 1fr; } }
.invoice-doc .totals { margin-left: auto; max-width: 320px; margin-top: 16px; }
.invoice-doc .totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.invoice-doc .totals .grand { border-top: 2px solid var(--ink); font-weight: 800; font-size: 1.15rem; margin-top: 6px; padding-top: 10px; }
.paybox { background: var(--bg); border: 2px solid var(--brand); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { width: auto; }
.search { display: flex; gap: 8px; max-width: 420px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
details.edit summary { cursor: pointer; color: var(--brand); font-weight: 600; }
details.edit[open] { background: var(--bg-2); border-radius: 10px; padding: 14px; }
.qr { margin: 4px 0 12px; } .qr svg { display: block; border-radius: 8px; border: 1px solid var(--line, #ddd); max-width: 100%; height: auto; }
.qr-secret { font: 600 1rem var(--mono); letter-spacing: .12em; word-break: break-all; background: var(--bg-2); padding: 10px 14px; border-radius: 8px; }
.foot .footabout { margin-top: 14px; max-width: 34ch; }
.foot a.inl { display: inline; }
.signout { margin-top: 8px; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 1rem; } .mt2 { margin-top: 2rem; } .mb0 { margin-bottom: 0; } .mb1 { margin-bottom: 1rem; }
.lead2 { font-size: 1.1rem; color: var(--muted); }
.mock .meter i.w38 { width: 38%; } .mock .meter i.w62 { width: 62%; } .mock .meter i.w45 { width: 45%; }
.cta-band .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .4); }
.cta-band .btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.terminal .muted { color: #6b7d99; }
.narrow-field { max-width: 220px; }
.total { font-size: 1.05rem; font-weight: 600; margin: 12px 0 0; }
.total small { font-weight: 400; color: var(--muted); }

.logo img.brandlogo { height: 28px; width: auto; max-width: 160px; }
.appfoot { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.form.narrow-form { max-width: 460px; }
.form.narrow-form .field { margin-bottom: 10px; }

/* the software's version: under the logo in the staff area, under the sign-in box */
.appver { color: var(--muted); font-size: .78rem; margin: -6px 0 12px; padding: 0 12px; }
.sidebar .appver { color: inherit; opacity: .6; }
.appver.center { text-align: center; margin: 18px 0 0; padding: 0; }
.content > .inner:has(> .card.flush table.list.wide) { max-width: 1680px; }

/* a form in light frames: related fields together, two to a row */
.frames { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.frame { border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px 16px; margin: 0; min-width: 0; }
.frame legend { font-weight: 700; font-size: .95rem; padding: 0 8px; margin-left: -8px; }
.frame.span2 { grid-column: 1 / -1; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: start; }
.fgrid .wide { grid-column: 1 / -1; }
.fgrid .field { margin: 0; min-width: 0; }
.fgrid .hint.wide { margin-top: -6px; }
.formend { margin-top: 18px; display: flex; gap: 12px; align-items: center; }
@media (max-width: 900px) { .frames { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .fgrid { grid-template-columns: 1fr; } }

/* the menu's icons each have a colour, so an entry is found by eye; the
   colours repeat down the menu */
.sidebar nav a svg { color: #38bdf8; opacity: 1; }
.sidebar nav a:nth-of-type(8n+2) svg { color: #34d399; }
.sidebar nav a:nth-of-type(8n+3) svg { color: #a78bfa; }
.sidebar nav a:nth-of-type(8n+4) svg { color: #fbbf24; }
.sidebar nav a:nth-of-type(8n+5) svg { color: #f472b6; }
.sidebar nav a:nth-of-type(8n+6) svg { color: #fb923c; }
.sidebar nav a:nth-of-type(8n+7) svg { color: #2dd4bf; }
.sidebar nav a:nth-of-type(8n+8) svg { color: #f87171; }
