:root { --accent:#5b3fd6; --ink:#1d1b2a; --muted:#6b6880; --line:#e3e1ec; --bg:#f6f5fa; --card:#fff; --bad:#b3261e; --good:#1b7a43; }
* { box-sizing:border-box; }
body { margin:0; font:16px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; color:var(--ink); background:var(--bg); }
.loading { text-align:center; margin-top:20vh; color:var(--muted); }
header.top { background:var(--card); border-bottom:1px solid var(--line); padding:10px 20px; display:flex; align-items:center; gap:8px; position:sticky; top:0; z-index:5; }
header.top .brand { font-weight:700; font-size:18px; display:flex; align-items:center; gap:8px; margin-right:auto; }
header.top .brand img { width:28px; height:28px; }
header.top button.nav { background:none; border:0; padding:8px 12px; border-radius:8px; font:inherit; color:var(--muted); cursor:pointer; white-space:nowrap; }
header.top button.nav.on { color:var(--accent); background:#efecfb; font-weight:600; }
main { max-width:1100px; margin:0 auto; padding:24px 20px 60px; }
h1 { font-size:26px; margin:0 0 4px; } h2 { font-size:19px; margin:0 0 12px; }
p.lead { color:var(--muted); margin:0 0 20px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:20px; }
.tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; margin-bottom:24px; }
.tile .label { color:var(--muted); font-size:14px; } .tile .value { font-size:30px; font-weight:700; }
.list { display:grid; gap:12px; }
.biz { display:flex; align-items:center; gap:14px; }
.biz .logo { width:48px; height:48px; border-radius:10px; background:#efecfb; display:grid; place-items:center; font-weight:700; color:var(--accent); overflow:hidden; flex:none; }
.biz .logo img { max-width:100%; max-height:100%; }
.biz .meta { flex:1; min-width:0; } .biz .meta small { color:var(--muted); display:block; }
button, .btn { font:inherit; border-radius:8px; border:1px solid var(--line); background:var(--card); padding:9px 16px; cursor:pointer; color:var(--ink); }
button.primary { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600; }
button.link { border:0; background:none; color:var(--accent); padding:4px 0; }
button:disabled { opacity:.55; cursor:default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.spread { justify-content:space-between; }
label.field { display:block; margin-bottom:14px; }
label.field > span { display:block; font-weight:600; font-size:14px; margin-bottom:4px; }
label.field small { display:block; color:var(--muted); font-weight:400; margin-top:3px; }
label.field small.error { color:var(--bad); font-weight:600; }
input[type=text], input[type=email], input[type=number], input[type=password], select, textarea { width:100%; font:inherit; padding:9px 11px; border:1px solid #cfcbe0; border-radius:8px; background:#fff; color:var(--ink); }
input.bad, textarea.bad, select.bad { border-color:var(--bad); }
textarea { min-height:78px; resize:vertical; }
input[type=color] { width:52px; height:38px; padding:2px; border:1px solid #cfcbe0; border-radius:8px; background:#fff; }
.two { display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }
.split { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; align-items:start; }
.steps { display:flex; gap:6px; margin:0 0 18px; padding:0; list-style:none; flex-wrap:wrap; }
.steps li { font-size:13px; padding:5px 11px; border-radius:99px; background:#eceaf4; color:var(--muted); }
.steps li.on { background:var(--accent); color:#fff; font-weight:600; } .steps li.done { background:#dcd5f7; color:var(--accent); }
.notice { padding:10px 14px; border-radius:8px; margin:0 0 14px; background:#eef7f1; color:var(--good); }
.notice.bad { background:#fbeceb; color:var(--bad); }
.signin { max-width:400px; margin:12vh auto 0; }
section.group { margin-bottom:22px; } section.group h2 { padding-bottom:8px; border-bottom:1px solid var(--line); }
/* the sample invoice */
.preview { position:sticky; top:76px; }
.preview .caption { font-size:13px; color:var(--muted); margin:0 0 6px; }
.paper { background:#fff; border:1px solid var(--line); border-radius:6px; box-shadow:0 6px 24px rgba(40,30,90,.08); padding:28px; font-size:12.5px; line-height:1.45; min-height:520px; display:flex; flex-direction:column; }
.paper .head { display:flex; justify-content:space-between; gap:16px; margin-bottom:22px; }
.paper .head img { max-height:64px; max-width:170px; display:block; margin-bottom:6px; }
.paper .bizname { font-size:17px; font-weight:700; }
.paper .title { font-size:24px; font-weight:700; letter-spacing:.04em; text-align:right; }
.paper .facts { text-align:right; white-space:nowrap; } .paper .pre { white-space:pre-line; }
.paper table { width:100%; border-collapse:collapse; margin:14px 0; }
.paper th { text-align:left; color:#fff; padding:6px 8px; font-weight:600; } .paper td { padding:7px 8px; border-bottom:1px solid var(--line); }
.paper .num { text-align:right; } .paper .total td { font-weight:700; font-size:14px; border-bottom:0; }
.paper .pay { margin-top:8px; padding:10px 12px; background:#f7f6fb; border-radius:6px; }
.paper .foot { margin-top:auto; padding-top:16px; color:var(--muted); font-size:11px; text-align:center; }
.muted { color:var(--muted); }
@media (max-width:820px) { .split { grid-template-columns:1fr; } .preview { position:static; } .two { grid-template-columns:1fr; } main { padding:16px 14px 50px; } header.top { padding:8px 12px; gap:2px; } header.top button.nav { padding:8px 9px; } }
