:root{--paper:#f6f4ed;--white:#fffdf8;--ink:#183545;--dim:#476271;--blue:#194e6a;--dark:#153e54;--line:#d8e0de;--pale:#eaf2f4;--gold:#f4e6b8;--green:#dcebe3;--sans:system-ui,sans-serif;--serif:Georgia,serif;color:var(--ink);font-family:var(--sans);background:var(--paper)}*{box-sizing:border-box}body{margin:0;min-width:300px}button,a,input,select{font:inherit}a{color:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #b36c24;outline-offset:3px}.wrap{width:min(1160px,calc(100% - 48px));margin-inline:auto}.top{background:var(--white);border-bottom:1px solid var(--line)}.bar{min-height:80px;display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;gap:11px;align-items:center;text-decoration:none;font:700 24px/1 var(--serif);min-width:max-content}.brand small{font:600 12px/1.3 var(--sans);display:block;margin-top:4px;color:var(--dim)}.mark{background:var(--blue);color:#fff8dc;border-radius:50%;width:42px;height:42px;display:grid;place-items:center}.bar nav{display:flex;gap:4px;background:var(--pale);padding:4px;border-radius:99px}.bar nav a{border-radius:99px;padding:9px 16px;text-decoration:none;font-size:14px;font-weight:650;color:var(--dim);text-align:center}.bar nav [aria-current]{background:white;color:var(--ink);box-shadow:0 1px 4px #294d6429}.reset{background:none;border:0;color:var(--dim);text-decoration:underline;text-underline-offset:4px;font-size:14px;padding:8px}.notice{color:var(--dim);font-size:14px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:27px 0 16px}.badge,.pill{font-size:13px;font-weight:750;border-radius:30px;background:var(--gold);padding:5px 10px;color:#53401c;display:inline-block}.hero{display:grid;grid-template-columns:1.02fr 1fr;background:#e6eef0;min-height:440px;border-radius:22px;overflow:hidden;border:1px solid #cfdcde}.hero-copy{padding:clamp(28px,5vw,68px) clamp(24px,4.5vw,60px);align-self:center}.eyebrow{letter-spacing:.095em;font-weight:750;font-size:13px;color:var(--blue);margin:0 0 14px;text-transform:uppercase}.hero h1{font:500 clamp(44px,5.6vw,85px)/.99 var(--serif);letter-spacing:-.06em;margin:0 0 20px}.hero p:not(.eyebrow){max-width:31ch;color:var(--dim);line-height:1.55}.art{display:block;width:100%;height:100%;object-fit:cover}svg.art{height:auto;min-height:100%;preserve-aspect-ratio:xMidYMid slice}.art-wrap{display:flex;background:#b5d9e8;overflow:hidden;align-items:center}.actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:17px}.primary,.secondary,.danger{padding:11px 16px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;font-weight:720;text-decoration:none;font-size:15px;min-height:43px}.primary{background:var(--blue);color:white;border:1px solid var(--blue)}.primary:hover{background:#102e41}.secondary{background:var(--white);color:var(--blue);border:1px solid #bcced3}.secondary:hover{background:var(--pale)}.danger{background:#fff7f2;color:#903d2f;border:1px solid #ebc9bd}.strip{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid var(--line);gap:20px;padding:20px 2px}.strip strong{display:block;font-size:16px}.strip span{font-size:14px;color:var(--dim)}.section{margin:30px 0}.section-title,h2{font:500 32px/1.1 var(--serif);letter-spacing:-.03em;margin:0 0 10px}.section-title{font-size:42px}.muted{color:var(--dim);margin:.5em 0;line-height:1.55}.order{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:30px;align-items:start}.panel,.stat{background:var(--white);border:1px solid var(--line);border-radius:14px;padding:22px;min-width:0}.panel h3,.panel p:last-child{margin-bottom:0}.grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.span{grid-column:1/-1}label{display:grid;gap:6px;font-size:14px;font-weight:650;min-width:0}input,select{border:1px solid #aabec6;border-radius:8px;padding:10px 11px;min-height:43px;min-width:0;width:100%;background:#fff;color:var(--ink);font-size:16px}input[readonly]{background:#f1f4f3}.fine{font-size:13px;color:var(--dim);line-height:1.5}.foot{margin-top:35px;padding:20px 0 28px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;color:var(--dim);font-size:13px}.dash-head{display:flex;gap:14px;justify-content:space-between;align-items:flex-end}.dash-head .muted{margin:0}.tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid #bfd1d6;margin:23px 0;padding-bottom:8px}.tabs a{font-weight:650;text-decoration:none;font-size:14px;border-radius:7px;padding:9px 13px}.tabs a[aria-current]{background:var(--blue);color:white}.tabs a:hover:not([aria-current]){background:var(--pale)}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 18px}.stat small{font-size:14px;color:var(--dim);font-weight:650;display:block}.stat strong{font:500 33px/1.2 var(--serif);display:block;margin-top:7px}.stat:nth-child(2){background:var(--pale)}.stat:nth-child(3){background:#f8edcc}.stack{display:grid;gap:13px}.row{display:flex;align-items:center;justify-content:space-between;gap:13px;flex-wrap:wrap}.row h3,.row p{margin:0}.row .muted{margin-top:4px}.pill.good{background:var(--green);color:#255041}.pill.neutral{background:var(--pale);color:var(--blue)}.detail{margin-top:13px;border-top:1px solid var(--line);padding-top:13px}.empty{padding:16px;border:1px dashed #aabdbe;border-radius:10px;color:var(--dim);line-height:1.55}.inline-form{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin-top:14px}.inline-form label{flex:1;min-width:110px}.inline-form label.short{max-width:180px}.toast{padding:12px 15px;background:var(--green);border-radius:8px;line-height:1.5;margin:0 0 16px}.error{color:#8e2d24}.ledger{padding:0;list-style:none;margin:12px 0 0}.ledger li{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-top:1px solid var(--line)}.filter{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin:12px 0}.filter label{flex:1;min-width:125px}.compact{margin:0}.hint{background:#e7eef0;border-radius:10px;color:var(--blue);padding:12px 16px;margin-bottom:14px;font-size:14px}.panel+.panel{margin-top:0}dialog{border:1px solid var(--line);border-radius:14px;padding:24px;color:var(--ink);max-width:min(400px,calc(100% - 28px));background:var(--white)}dialog::backdrop{background:#102e41a0}@media(max-width:760px){.wrap{width:calc(100% - 28px)}.bar{flex-wrap:wrap;padding:11px 0}.bar nav{order:3;width:100%}.bar nav a{flex:1;padding-inline:7px}.hero,.order{grid-template-columns:1fr}.hero{min-height:unset}.art-wrap{max-height:310px}.hero-copy{padding:28px 21px}.hero h1{font-size:clamp(41px,9vw,61px)}.strip{gap:10px}.strip strong{font-size:14px}.strip span{font-size:13px}.section-title{font-size:33px}.panel,.stat{padding:15px}.stats{gap:6px}.stat{padding:10px}.stat strong{font-size:24px}.stat small{font-size:12px}.tabs a{padding:7px 8px}.notice{margin-top:16px}.dash-head{align-items:flex-start}.foot{padding-bottom:16px}}@media(max-width:400px){.grid{grid-template-columns:1fr}.strip{grid-template-columns:1fr;gap:7px}.strip strong,.strip span{display:inline}.strip strong{margin-right:5px}.dash-head{display:block}.dash-head .secondary{margin-top:9px}.inline-form label.short{max-width:none}}

/* Shared polish and compact app shell */
:root {
  --shell-shadow: 0 12px 35px rgba(29, 66, 82, .08);
  --tap: 46px;
}
body {
  background: radial-gradient(ellipse at 95% 4%, #e7f1ee 0, transparent 34rem), var(--paper);
}
.skip-link {
  position: fixed; z-index: 30; left: 16px; top: 12px; padding: 10px 14px;
  background: white; transform: translateY(-140%); border-radius: 9px;
}
.skip-link:focus { transform: none; }
.reset { display: inline-flex; gap: 7px; align-items: center; }
.hero { box-shadow: var(--shell-shadow); }
.hero-copy { background: radial-gradient(ellipse at 15% 5%, #f4f6ef, transparent 85%); }
.strip { padding: 22px 18px; }
.strip div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.panel { box-shadow: 0 3px 12px #254e6010; }
.panel .row { align-items: center; }
.panel :where(h3) { letter-spacing: -.012em; }
.stat strong { font-variant-numeric: tabular-nums; }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: 7px; }
.tabs svg { width: 18px; height: 18px; flex-shrink: 0; }
.tab-pending {
  display: inline-block; width: 8px; height: 8px; background: #bd620f; border-radius: 50%;
  outline: 1px solid #fff;
}
[aria-current="page"] .tab-pending { background: #ffc66c; }
#request-area { scroll-margin-top: 22px; }
.primary,.secondary,.danger { transition: background-color .18s, box-shadow .18s; }

@media (max-width: 680px) {
  :root { --app-top: 114px; }
  .wrap { width: min(100% - 28px, 540px); }
  .top {
    position: sticky; top: 0; z-index: 10; background: #fffdf8;
    padding-top: env(safe-area-inset-top, 0px);
    box-shadow: 0 2px 14px #112f4010;
  }
  .bar { padding: 9px 0 8px; row-gap: 8px; }
  .brand { font-size: 22px; }
  .brand small { font-size: 11px; }
  .mark { width: 37px; height: 37px; }
  .reset {
    width: 44px; height: 44px; padding: 0; justify-content: center; border: 1px solid var(--line);
    border-radius: 13px; background: #f8f9f4;
  }
  .reset span { display: none; }
  .bar nav { flex: 0 0 100%; padding: 3px; border-radius: 12px; background: #eaf0ef; }
  .bar nav a { display: grid; place-items: center; min-height: 39px; padding: 6px; border-radius: 9px; }
  .notice { margin: 13px 0; align-items: center; gap: 6px; font-size: 12px; }
  .notice .badge { padding: 4px 8px; font-size: 11px; }
  .hero { display: grid; border-radius: 19px; grid-template-columns: 1fr; }
  .hero-copy { padding: 23px 20px 22px; }
  .hero h1 { font-size: clamp(42px, 10vw, 58px); margin-bottom: 12px; }
  .hero p:not(.eyebrow) { margin: 0; max-width: 37ch; }
  .hero .actions { margin-top: 15px; }
  .hero .primary { width: 100%; }
  .art-wrap { height: clamp(156px, 44vw, 246px); }
  svg.art { height: 100%; }
  .strip { padding: 12px 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; align-items: stretch; }
  .strip div, .strip div + div {
    padding: 9px 7px; border: 1px solid var(--line); background: #fffdf8; border-radius: 11px;
  }
  .strip strong,.strip span { display: block; }
  .strip strong { margin: 0; font-size: 13px; }
  .strip span { font-size: 12px; line-height: 1.3; margin-top: 4px; }
  .section { margin: 23px 0; }
  .order { display: flex; flex-direction: column; gap: 11px; }
  .order > * { width: 100%; }
  .request-intro .section-title { margin-bottom: 6px; }
  #request-area { scroll-margin-top: calc(var(--app-top) + env(safe-area-inset-top, 0px) + 8px); }
  .panel { padding: 15px; border-radius: 15px; }
  .primary,.secondary,.danger { min-height: var(--tap); }
  .dash-head { align-items: flex-start; flex-wrap: wrap; gap: 0; padding: 6px 0 17px; }
  .dash-head .section-title { margin-bottom: 6px; }
  .dash-head .eyebrow { margin-bottom: 8px; }
  .dash-head .secondary { min-height: 40px; margin: 9px 0 0; padding: 6px 11px; font-size: 14px; }
  body[data-view="dashboard"] { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  body[data-view="dashboard"] .tabs {
    position: fixed; inset: auto 0 0; z-index: 20; margin: 0;
    padding: 6px max(7px, env(safe-area-inset-right, 0px))
      calc(7px + env(safe-area-inset-bottom, 0px)) max(7px, env(safe-area-inset-left, 0px));
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;
    border: 0; border-top: 1px solid #cad9db; background: #fffdf8;
    box-shadow: 0 -4px 20px #153e541b;
  }
  .tabs a {
    min-width: 0; min-height: 55px; padding: 5px 1px; flex-direction: column; justify-content: center;
    gap: 3px; line-height: 1.08; text-align: center; font-size: 11px; border-radius: 11px;
  }
  .tabs svg { width: 21px; height: 21px; }
  .tabs a[aria-current="page"] { color: var(--dark); background: #dcecee; }
  .tab-pending { position: absolute; top: 6px; left: calc(50% + 10px); }
  .stats { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
  .stat { min-height: 79px; display: flex; flex-direction: column; justify-content: space-between; }
  .stat strong { font-size: clamp(19px, 6vw, 27px); overflow-wrap: anywhere; }
  .inline-form { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .inline-form label.short { max-width: none; }
  .row .actions { margin-top: 0; }
  .foot { margin-top: 25px; line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media (max-width: 370px) {
  .bar nav a { font-size: 13px; white-space: nowrap; }
  body[data-view="dashboard"] .tabs { grid-template-columns: .86fr 1.08fr 1.13fr 1.06fr .87fr; }
  .tabs a { font-size: 10px; }
}

#new-customer { margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--pale); }
#new-customer[hidden] { display: none; }
#new-customer .actions { margin-top: 0; }
#new-customer .error { grid-column: 1 / -1; }
#billing-customer { max-width: 100%; }
.ledger .row > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 680px) {
  #new-customer { grid-template-columns: 1fr; }
}

/* Public demo walkthrough */
.sample-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #eef4f3;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sample-profile div { min-width: 0; }
.sample-profile div span { display: block; color: var(--dim); font-size: .82rem; line-height: 1.45; }
.sample-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 41px;
  height: 41px;
  border-radius: 13px;
  background: #dcecee;
  color: var(--dark);
  font-weight: 750;
  font-size: .83rem;
}
.quick-start { background: #eaf3f2; border-color: #c8dddd; }
.quick-start .eyebrow { margin-bottom: 7px; font-size: .74rem; }
.quick-start .row > div { flex: 1 1 24rem; }
.quick-start .muted { margin-top: .4rem; }
input, select { max-width: 100%; }
input[type="date"] { display: block; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
#new-customer { scroll-margin-top: 24px; }

@media (max-width: 680px) {
  .bar nav a { min-height: 44px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .secondary { width: 100%; }
  .hero .art-wrap { height: clamp(132px, 40vw, 220px); }
  .notice { font-size: .79rem; }
  .notice .badge { font-size: .73rem; }
  .dash-head .muted { max-width: 34ch; font-size: .92rem; }
  .dash-head .secondary { min-height: 44px; }
  .billing-heading { align-items: stretch; gap: 8px; margin-bottom: 13px; }
  .billing-heading h2, .billing-heading label { flex: 1 0 100%; }
  .billing-heading h2 { margin-bottom: 0; overflow-wrap: anywhere; }
  .stats .stat { min-height: 80px; }
  .panel .ledger li .secondary { min-height: 44px; }
  .quick-start .row > .primary { width: 100%; }
  #new-customer { padding: 13px; scroll-margin-top: calc(125px + env(safe-area-inset-top, 0px)); }
  #new-customer .row > div { flex: 1 0 100%; }
  #new-customer .row .secondary { width: 100%; }
  #new-customer .actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  body[data-view="dashboard"].keyboard-open .tabs { display: none; }
}
@media (max-width: 370px) {
  .notice { column-gap: 8px; }
  .wrap .panel .row > .primary, .wrap .panel .row > .secondary { max-width: 100%; }
}
@media (max-width: 680px) {
  body[data-view="dashboard"]:not([data-screen="today"]) .dash-head { display: none; }
}
