:root {
  color-scheme: light;
  --ink: #182626;
  --soft-ink: #4b6261;
  --muted: #607573;
  --line: #dbe6e3;
  --canvas: #f3f7f5;
  --white: #fff;
  --accent: #0c5d4d;
  --accent-deep: #0a4439;
  --accent-pale: #e3f3ec;
  --radius: 15px;
  font-family: "Aptos", "Inter", system-ui, sans-serif;
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
h1, h2, p { margin: 0; }
a { color: var(--accent); text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #0e8b72; outline-offset: 3px; }
[hidden] { display: none !important; }

.shell { display: grid; grid-template-columns: 251px minmax(0,1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #fcfefd; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 770; letter-spacing: -.045em; font-size: 23px; overflow-wrap: anywhere; }
.sidebar > .brand { margin: 25px 22px 29px; }
.brand-mark { display: grid; place-items: center; height: 36px; width: 36px; flex: 0 0 36px; border-radius: 11px; background: #0d4d42; color: #b7f2d7; font-size: 21px; box-shadow: 0 3px 7px #204f4630; }
.sidebar nav { display: grid; gap: 21px; overflow: auto; padding: 0 13px 18px; }
.nav-group > div { margin: 0 10px 7px; color: var(--muted); font-size: 10px; font-weight: 760; letter-spacing: .12em; }
.nav-group a { display: flex; align-items: center; padding: 7px 10px; margin: 2px 0; min-height: 36px; gap: 10px; color: var(--soft-ink); text-decoration: none; font-weight: 580; border-radius: 8px; font-size: 13px; }
.nav-group a:hover, .nav-group a.selected { color: var(--accent-deep); background: var(--accent-pale); }
.nav-group a.selected { font-weight: 740; }
.nav-icon { display: inline-grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; color: var(--accent); font-size: 20px; line-height: 1; font-weight: 500; }
.sidebar footer { margin-top: auto; padding: 14px 17px; border-top: 1px solid var(--line); }
.sidebar footer a { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.sidebar footer strong, .sidebar footer small { display: block; }
.sidebar footer strong { max-width: 165px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.sidebar footer small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.avatar { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; background: #d9ece6; color: #175a4c; border-radius: 50%; font-weight: 750; }
.topbar { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 29px; background: #fcfefd; border-bottom: 1px solid var(--line); }
.crumb { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb span { margin: 0 7px; opacity: .65; }
.crumb strong { color: var(--ink); }
.top-actions, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.top-link { text-decoration: none; font-size: 13px; color: var(--soft-ink); white-space: nowrap; }
.menu-toggle { display: none; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); padding: 5px 10px; }
.workspace-body { padding: 27px 29px 52px; max-width: 1490px; margin: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 25px; padding: 3px 0 0; }
.page-head h1 { font-size: clamp(28px,3.2vw,43px); line-height: 1.11; font-weight: 750; letter-spacing: -.053em; overflow-wrap: anywhere; }
.page-head p { margin-top: 9px; color: var(--soft-ink); font-size: 14px; }
.page-head p:empty { display: none; }

.button { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; border: 1px solid transparent; border-radius: 8px; padding: 8px 13px; min-height: 38px; font-size: 12px; font-weight: 740; line-height: 1.2; }
.button.primary { color: #fff; background: var(--accent); }
.button.primary:hover { background: var(--accent-deep); }
.button.secondary { color: var(--accent-deep); border-color: #c9dcd6; background: #fbfefd; }
.button.secondary:hover, .button.quiet:hover { background: var(--accent-pale); }
.button.quiet { color: var(--accent-deep); border-color: transparent; background: transparent; min-height: 33px; }
.button + .button, td .inline-form + .inline-form { margin-left: 4px; }
.inline-form { display: inline-flex; vertical-align: middle; margin: 0; }

.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 19px; }
.metric { display: grid; gap: 8px; align-content: start; text-decoration: none; color: var(--ink); min-height: 124px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.metric:hover { border-color: #9ac9ba; }
.metric .nav-icon { width: 31px; height: 31px; border-radius: 8px; background: #e9f6f1; }
.metric > span:not(.nav-icon) { font-size: 12px; color: var(--soft-ink); font-weight: 610; }
.metric strong { font-size: clamp(20px,2.5vw,30px); letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); gap: 16px; align-items: start; }
.panel, .fold { margin: 0 0 16px; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); min-width: 0; }
.panel-title { display: flex; align-items: center; justify-content: space-between; padding: 16px 17px; gap: 10px; }
.panel-title h2, .product h2 { font-size: 16px; line-height: 1.2; letter-spacing: -.023em; font-weight: 750; }
.subtle { color: var(--accent); font-size: 12px; text-decoration: none; font-weight: 690; white-space: nowrap; }
.subtle:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; border-radius: 0 0 14px 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th, td { padding: 10px 13px; border-top: 1px solid #e8efed; overflow-wrap: anywhere; }
th:first-child, td:first-child { padding-left: 17px; }
th:last-child, td:last-child { padding-right: 17px; }
th { background: #f7faf8; color: var(--soft-ink); font-weight: 730; font-size: 11px; letter-spacing: .018em; white-space: nowrap; }
td a { font-weight: 670; text-decoration: none; }
td a:hover { text-decoration: underline; }
td .button { min-height: 31px; padding: 5px 8px; }
tr:hover td:not(.empty) { background: #fafffc; }
.empty { padding: 19px 17px; color: var(--muted); font-size: 13px; }
.table-filter { display: flex; gap: 13px; align-items: center; padding: 0 17px 13px; color: var(--muted); font-size: 12px; }
.table-filter input { max-width: 250px; }
.badge { display: inline-block; background: #e8f1fa; color: #234f76; border-radius: 30px; line-height: 1.25; padding: 4px 8px; font-size: 11px; font-weight: 730; white-space: nowrap; }
.badge.good { background: #e1f3e8; color: #18533a; }
.badge.warn { background: #fff2d9; color: #704711; }
.badge.bad { background: #f9e8e7; color: #822d2b; }
.badge.muted { background: #edf0ef; color: #4a5956; }
.activity { display: flex; align-items: flex-start; gap: 10px; padding: 12px 17px; border-top: 1px solid #e8efed; font-size: 13px; overflow-wrap: anywhere; }
.activity i { flex: 0 0 8px; height: 8px; margin-top: 5px; background: #38a488; border-radius: 50%; }
.activity small { display: block; color: var(--muted); margin-top: 3px; }
.pad { padding: 16px 17px; }
.pad .fold { margin-top: 10px; }

.form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px 17px; }
.form > .field { flex: 1 1 210px; min-width: 0; max-width: 100%; }
.form > .field:has(textarea) { flex-basis: 100%; }
.form > .button { align-self: flex-end; }
.field { display: grid; gap: 6px; font-size: 12px; font-weight: 650; }
.check { align-self: center; display: flex; gap: 6px; align-items: center; font-size: 13px; min-height: 38px; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; min-width: 0; border: 1px solid #cbdcd6; background: #fcfefd; color: var(--ink); border-radius: 8px; padding: 8px 10px; min-height: 38px; font-size: 13px; }
textarea { resize: vertical; }
.fold > summary { cursor: pointer; padding: 12px 17px; font-weight: 720; font-size: 13px; color: var(--accent-deep); }
.fold[open] > summary { border-bottom: 1px solid var(--line); }
.notice { background: #e2f3ec; padding: 12px 15px; border-radius: 9px; color: var(--accent-deep); margin-bottom: 16px; overflow-wrap: anywhere; font-size: 13px; }
.notice.error { background: #fbe8e6; color: #812c27; }
.prose { white-space: pre-wrap; line-height: 1.65; overflow-wrap: anywhere; }
.facts { display: flex; flex-wrap: wrap; gap: 16px 25px; margin: 0; padding: 0 17px 17px; }
.facts dt { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 680; }
.invoice-address { display: grid; grid-template-columns: 1fr 1fr; padding: 8px 17px 21px; gap: 15px; color: var(--soft-ink); font-size: 13px; }
.invoice-address strong { display: block; margin-bottom: 5px; color: var(--ink); }
.invoice-totals { display: grid; justify-content: end; padding: 15px 17px; }
.invoice-totals div { display: flex; justify-content: space-between; gap: 21px; padding: 4px 0; font-size: 13px; }
.invoice-totals div:last-child { font-weight: 720; }
.products { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.product { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; min-width: 0; overflow-wrap: anywhere; }
.product > span:not(.badge) { color: var(--accent); font-size: 11px; font-weight: 730; }
.product h2 a { text-decoration: none; color: var(--ink); }
.product h2 a:hover { text-decoration: underline; }
.product p { color: var(--soft-ink); font-size: 13px; line-height: 1.5; }
.product strong { font-size: 21px; letter-spacing: -.025em; margin-top: auto; }
.product small { font-size: 11px; color: var(--soft-ink); font-weight: 500; letter-spacing: 0; }
.product .form { display: grid; padding: 4px 0 0; width: 100%; }
.tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 13px; }
.tab { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; text-decoration: none; font-weight: 690; font-size: 12px; background: var(--white); }
.tab.selected { background: var(--accent-pale); color: var(--accent-deep); }
.message { display: flex; gap: 12px; border-top: 1px solid var(--line); padding: 15px 17px; }
.message > div { min-width: 0; }
.message header { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 5px; align-items: baseline; }
.message small { color: var(--muted); }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.13fr 1fr; align-items: stretch; }
.auth-copy { position: relative; overflow: hidden; min-height: 540px; padding: 38px clamp(24px,5vw,72px); display: flex; flex-direction: column; justify-content: space-between; gap: 70px; isolation: isolate; background: #103d35; color: #fcfffd; }
.auth-copy > div { margin: 0 0 19vh; }
.auth-copy .brand { color: #fcfffd; }
.auth-copy .brand-mark { background: #b7f2d7; color: #103d35; }
.eyebrow { color: #ade0cc; font-size: 10px; font-weight: 740; letter-spacing: .16em; }
.auth-copy h1 { font-size: clamp(38px,5.3vw,78px); font-weight: 750; line-height: 1.01; letter-spacing: -.067em; margin: 14px 0 16px; }
.auth-copy p { color: #c8e4da; line-height: 1.6; max-width: 39ch; }
.auth-decoration { z-index: -1; width: 640px; height: 640px; position: absolute; left: 25%; top: 49%; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0, transparent 22px, #b7f2d71b 23px, transparent 24px, transparent 36px); }
.auth-card { align-self: center; justify-self: center; width: min(100% - 48px,405px); background: var(--white); padding: 28px; border-radius: 18px; border: 1px solid var(--line); }
.auth-card h2 { margin-bottom: 19px; font-size: 26px; letter-spacing: -.045em; }
.auth-card .form { display: grid; padding: 0; }
.auth-links { margin-top: 14px; display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; }

@media (max-width:1050px) {
  .shell { grid-template-columns: 211px minmax(0,1fr); }
  .workspace-body,.topbar { padding-left: 18px; padding-right: 18px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); gap: 0; }
  .products { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:740px) {
  .shell { display: block; }
  .sidebar { position: fixed; display: none; z-index: 3; width: min(260px,85vw); height: calc(100dvh - 54px); top: 54px; box-shadow: 12px 0 30px #132e2d2d; }
  .sidebar.open { display: flex; }
  .topbar { min-height: 54px; position: sticky; top: 0; z-index: 2; }
  .topbar .crumb { margin-right: auto; }
  .menu-toggle { display: block; }
  .top-link { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 17px; }
  .workspace-body { padding-top: 19px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .metric { min-height: 105px; padding: 11px; }
  .auth-page { grid-template-columns: 1fr; min-height: 100vh; align-content: start; }
  .auth-copy { min-height: auto; gap: 20px; padding: 18px 24px 24px; }
  .auth-copy > div { margin: 0; }
  .auth-copy h1 { margin: 7px 0; }
  .auth-card { margin: 23px 0; }
}
@media (max-width:430px) { .products { grid-template-columns: 1fr; } }
@media print {
  body, .workspace-body { background: white; }
  .shell { display: block; }
  .sidebar, .topbar, .button, form, .notice { display: none !important; }
  .panel { break-inside: avoid; }
}

.setup-body { background: linear-gradient(150deg,#e4f3ed 0,#f7faf8 420px); }
.setup-wrap { width: min(100% - 36px, 700px); margin: 0 auto; padding: 44px 0; }
.setup-header { display: grid; gap: 22px; margin-bottom: 20px; }
.setup-header h1 { font-size: clamp(28px,6vw,44px); font-weight: 750; letter-spacing: -.052em; }
.setup-panel { padding: clamp(18px,4vw,30px); }
.setup-panel p { color: var(--soft-ink); line-height: 1.5; }
.setup-panel > .button { margin-top: 16px; }
.setup-panel .notice.error { color: #812c27; }
.setup-form { display: grid; gap: 14px; margin-top: 22px; }
.setup-form h2 { font-size: 17px; }
.setup-form > .button { justify-self: start; }
.setup-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
p.setup-hint { font-size: 12px; }
@media (max-width:515px) { .setup-fields { grid-template-columns: 1fr; } }
.setup-checks { display:flex; flex-wrap:wrap; gap:8px 17px; padding:0; list-style:none; color:var(--soft-ink); font-size:12px; }
.setup-checks li { display:flex; align-items:center; gap:6px; }
