@charset "UTF-8";
:root {
  color-scheme: light;
  --red: #d92332; --red-dark: #b51b28; --red-soft: #fff1f2;
  --ink: #242426; --muted: #717175; --subtle: #f6f6f7;
  --line: #e7e7e9; --white: #fff; --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--white); color: var(--ink); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
h1, h2, h3, p { margin: 0 0 16px; }
h1 { font-size: 36px; line-height: 1.2; letter-spacing: -1.3px; font-weight: 650; }
h2 { font-size: 20px; line-height: 1.35; letter-spacing: -.45px; font-weight: 650; }
h3 { font-size: 17px; }
small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.eyebrow { font-size: 10px; letter-spacing: 1.6px; font-weight: 650; color: var(--muted); margin-bottom: 9px; }
.icon { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 20; background: var(--red); color: white; padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* White navigation with a clear red current section. */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 252px; background: var(--white); border-right: 1px solid var(--line); padding: 31px 20px 20px; display: flex; flex-direction: column; overflow-y: auto; z-index: 5; }
.brand { font-size: 23px; font-weight: 750; display: inline-flex; align-items: center; gap: 10px; letter-spacing: -.8px; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 38px; flex: 0 0 auto; border-radius: 8px; background: var(--red); color: white; font-size: 15px; line-height: 1; letter-spacing: -.5px; }
.brand-name { display: block; line-height: 1.1; white-space: nowrap; }
.brand-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .5px; }
.sidebar-label { font-size: 9px; letter-spacing: 1.4px; font-weight: 600; color: var(--muted); margin: 36px 10px 0; }
.supplier-name { font-size: 13px; font-weight: 600; margin: 8px 10px 24px; overflow-wrap: anywhere; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 13px; min-height: 46px; border-radius: 8px; margin: 4px 0; font-size: 13px; color: #56565b; transition: background .15s, color .15s; }
.nav-link:hover { background: var(--subtle); color: var(--red); }
.nav-link.active { background: var(--red); color: var(--white); font-weight: 600; }
.nav-link .icon { opacity: .85; }
.count { margin-left: auto; background: var(--red-soft); color: var(--red-dark); border-radius: 5px; padding: 0 6px; font-size: 11px; }
.active .count { background: #ffffff26; color: white; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--line); padding: 20px 5px 0; display: flex; align-items: center; gap: 10px; font-size: 12px; }
.sidebar-bottom>span { overflow: hidden; text-overflow: ellipsis; }
.sidebar-bottom form { margin-left: auto; }
.avatar { width: 34px; height: 34px; flex: 0 0 auto; background: var(--subtle); border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-weight: 650; color: var(--muted); }
.logout { background: none; color: var(--muted); border: 0; border-radius: 6px; width: 36px; height: 36px; display: grid; place-items: center; }
.logout:hover { background: var(--red-soft); color: var(--red); }
.main { margin-left: 252px; max-width: 1800px; padding: 0 40px 24px; min-width: 0; }
.topbar { min-height: 79px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 20px; }
.breadcrumb { font-size: 12px; color: var(--muted); }
.breadcrumb span { margin: 0 12px; color: #bcbcc1; }
.sync { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sync i { width: 6px; height: 6px; background: #7e7e84; border-radius: 50%; flex: 0 0 auto; }
.sync.stale i { background: var(--red); }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 30px 0 25px; }
.page-heading h1 { margin: 0; }
.period-hint { font-size: 11px; color: var(--muted); padding-bottom: 4px; }

/* Summary and balances. */
.welcome { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: var(--radius); min-height: 241px; padding: 28px 32px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 30px; position: relative; overflow: hidden; margin-bottom: 20px; }
.welcome h2 { font-size: 35px; line-height: 1.13; letter-spacing: -1.2px; margin: 14px 0 13px; }
.welcome h2 em { font-style: normal; color: var(--red); }
.welcome p { font-size: 12px; color: var(--muted); margin: 0; }
.welcome-total { border-left: 1px solid var(--line); padding: 10px 0 10px 38px; z-index: 1; }
.welcome-total>span { font-size: 12px; display: block; color: var(--muted); }
.welcome-total strong { display: block; color: var(--red); font-size: clamp(28px, 2.75vw, 43px); line-height: 1.2; letter-spacing: -1.4px; margin: 12px 0 21px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.welcome-decoration { position: absolute; right: 16px; bottom: -50px; color: var(--subtle); font-size: 250px; line-height: 1; pointer-events: none; }
.pill { font-size: 11px; font-weight: 550; padding: 5px 10px; border-radius: 6px; background: #f0f0f2; color: #616166; display: inline-block; }
.pill.light { color: var(--red-dark); background: var(--red-soft); }
.pill.amber { background: var(--red-soft); color: var(--red-dark); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 20px 0 24px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-height: 145px; position: relative; }
a.stat { transition: border-color .15s, background .15s; }
a.stat:hover { border-color: #e9a1a7; background: #fffafa; }
a.stat::after { content: '↗'; position: absolute; right: 18px; top: 16px; color: var(--red); font-size: 16px; }
.stat>span { display: block; padding-right: 10px; font-size: 12px; color: #626268; }
a.stat>span { padding-right: 16px; }
.stat strong { display: block; font-size: 27px; line-height: 1.3; letter-spacing: -.8px; font-weight: 650; margin: 15px 0 6px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat small { font-size: 11px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-heading h2 { margin: 0 0 8px; }
.panel-heading a { font-size: 12px; color: var(--red); white-space: nowrap; }
.panel-heading>a:hover { text-decoration: underline; }
.panel>p { font-size: 12px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.list-row:last-child { border: 0; }
.list-row b { font-weight: 600; }
.list-row small { font-size: 11px; }
.list-row .pill { flex-shrink: 0; }
a.list-row:hover b { color: var(--red); }
.empty { text-align: center; padding: 38px 15px; color: var(--muted); }
.empty>span { font-size: 30px; color: var(--red); }
.empty h3 { margin: 10px 0 5px; color: #57575c; }
.empty p { font-size: 12px; margin-bottom: 0; }
.notice { padding: 12px 17px; border: 1px solid var(--line); border-left: 3px solid #a4a4aa; background: var(--subtle); border-radius: 7px; margin: 18px 0; font-size: 12px; color: #626268; }
.notice.success { border-left-color: var(--red); }
.notice.error { background: var(--red-soft); color: var(--red-dark); border-color: #f3c7cb; border-left-color: var(--red); }
.balance-strip { border: 1px solid var(--line); border-left: 3px solid var(--red); background: var(--white); padding: 25px 28px; border-radius: var(--radius); margin-bottom: 24px; }
.balance-strip span { display: block; font-size: 12px; color: var(--muted); }
.balance-strip strong { display: block; color: var(--red); font-size: 37px; font-weight: 650; letter-spacing: -1px; margin: 7px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.balance-strip p { font-size: 12px; color: var(--muted); margin: 0; }
.balance-strip.neutral { border-left-color: #a4a4aa; background: var(--subtle); }
.balance-strip.neutral strong { color: var(--ink); }

/* Forms and data. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 17px; min-height: 42px; border: 1px solid var(--red); border-radius: 7px; background: var(--red); color: white; font-size: 12px; font-weight: 600; text-align: center; transition: background .15s, border-color .15s; }
.button:hover { background: var(--red-dark); border-color: var(--red-dark); }
.button.secondary { background: white; color: var(--red); border-color: #e7c7ca; }
.button.secondary:hover { background: var(--red-soft); border-color: var(--red); }
.button.submit { margin-top: 16px; padding: 13px 24px; }
.filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin: 8px 0 24px; }
.filters label { min-width: 100px; }
.filters>.muted { align-self: center; margin-top: 20px; font-size: 12px; }
.grow { flex: 1; }
label { display: block; font-size: 12px; font-weight: 550; color: #626268; }
input, select, textarea { display: block; background: white; border: 1px solid #d7d7dc; border-radius: 7px; padding: 10px 12px; width: 100%; min-width: 0; color: var(--ink); margin-top: 6px; min-height: 42px; }
input:hover, select:hover, textarea:hover { border-color: #a7a7ae; }
input:focus, select:focus, textarea:focus { border-color: var(--red); }
input::placeholder, textarea::placeholder { color: #85858c; opacity: 1; }
input:autofill { box-shadow: 0 0 0 1000px white inset; -webkit-text-fill-color: var(--ink); }
input[type=hidden] { display: none; }
textarea { resize: vertical; }
.table-panel { padding: 0; overflow: auto; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; font-variant-numeric: tabular-nums; }
th { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; color: #6c6c74; background: var(--subtle); }
th, td { padding: 17px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
td b { font-weight: 600; }
td small { font-size: 11px; max-width: 300px; }
td a:hover { color: var(--red); text-decoration: underline; }
tbody tr:last-child td { border: 0; }
tbody tr:hover { background: #fcfcfc; }
.empty-cell { text-align: center; color: var(--muted); padding: 50px; }
.payment { padding: 0; }
.payment summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 25px; padding: 20px 24px; }
.payment summary::-webkit-details-marker { display: none; }
.payment summary::after { content: '+'; color: var(--red); font-size: 23px; font-weight: 400; }
.payment details[open] summary::after { content: '−'; }
.payment-receipt { border-top: 1px solid var(--line); padding: 16px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.payment-receipt small { color: var(--muted); }
.receipt-confirmed { font-weight: 600; color: var(--red-dark); }
.payment-review { max-width: 760px; margin-top: 20px; }
.payment-review h2 { font-size: 32px; }
.payment-confirm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (max-width: 540px) {
  .payment-receipt { padding: 16px 18px; }
  .payment-receipt .button, .payment-confirm-actions .button { width: 100%; }
}
.payment summary>strong { margin-left: auto; font-size: 20px; font-variant-numeric: tabular-nums; }
.payment-content { padding: 0 24px 24px; overflow-x: auto; }
.payment-content>p { font-size: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 17px; border-radius: 7px; color: var(--muted); font-size: 12px; }
.tabs a:hover { background: var(--subtle); }
.tabs .selected { background: var(--red-soft); color: var(--red-dark); font-weight: 600; }
.request-line { margin-top: 20px; }
.request-line .eyebrow { display: block; color: var(--red); }
.response-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.span-two { grid-column: span 2; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; }
.back { display: inline-block; font-size: 12px; color: var(--red); margin-bottom: 22px; }
dl { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; font-size: 12px; gap: 12px 24px; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.padded { padding: 22px 20px 10px; }
.chart svg { width: 100%; max-height: 280px; }
.chart summary { cursor: pointer; color: var(--red); font-size: 12px; }
.chart .muted { font-size: 11px; }
.chart .chart-grid { stroke: var(--line); }
.chart .chart-sale { fill: var(--red); }
.chart .chart-return { fill: #97979f; }
.chart .chart-label { fill: var(--muted); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 20px; font-size: 12px; color: var(--muted); margin: 4px 0 16px; }
.chart-legend span { display: inline-flex; gap: 7px; align-items: center; }
.chart-legend i { width: 9px; height: 9px; border-radius: 2px; background: var(--red); }
.chart-legend .returns i { background: #97979f; }
footer { color: var(--muted); font-size: 10px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Entry screens share the same palette and typography. */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-story { background: var(--subtle); border-top: 5px solid var(--red); border-right: 1px solid var(--line); padding: 50px 12%; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-story .brand { margin-bottom: 100px; align-self: start; }
.auth-story .eyebrow { color: var(--red); }
.auth-story h1 { font-size: 48px; line-height: 1.13; margin-top: 20px; z-index: 1; }
.auth-story p { color: var(--muted); z-index: 1; font-size: 14px; }
.auth-art { font-size: 440px; color: #e9e9ec; position: absolute; bottom: -90px; right: 0; line-height: 1; }
.auth-form { align-self: center; padding: 50px 15%; width: 100%; max-width: 680px; }
.auth-form h2 { font-size: 30px; }
.auth-form>p { font-size: 12px; }
.auth-form .button { width: 100%; margin-top: 10px; }
.auth-form .small { margin-top: 25px; }
.errorlist { padding-left: 16px; font-size: 12px; color: var(--red-dark); }
.helptext, .helptext ul { font-size: 11px; color: var(--muted); }
.invite-page { padding: 40px 15px; background: var(--subtle); }
.invite-card { max-width: 620px; margin: auto; padding: 35px; border-top: 3px solid var(--red); }
.invite-card h1 { font-size: 28px; }

@media (min-width: 1600px) {
  .main { padding-left: 55px; padding-right: 55px; }
  .welcome { min-height: 265px; }
}
@media (max-width: 1200px) {
  .sidebar { width: 226px; padding: 30px 14px 20px; }
  .main { margin-left: 226px; padding: 0 24px 20px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome { padding: 25px; gap: 25px; }
  .welcome-total { padding-left: 25px; }
  .welcome-total strong { font-size: 29px; }
  .welcome h2 { font-size: 30px; }
  .two-columns { grid-template-columns: 1fr; gap: 0; }
  .response-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: auto; padding: 18px 16px 0; display: grid; grid-template-columns: 1fr auto; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .brand { font-size: 21px; }
  .brand-mark { width: 32px; height: 36px; font-size: 14px; border-radius: 7px; }
  .sidebar-label, .supplier-name { display: none; }
  .sidebar nav { grid-column: 1 / -1; grid-row: 2; display: flex; overflow-x: auto; gap: 5px; margin: 16px -16px 0; padding: 0 16px 12px; scrollbar-width: thin; }
  .nav-link { white-space: nowrap; padding: 10px 12px; font-size: 12px; margin: 0; gap: 8px; min-height: 42px; }
  .nav-link .icon { width: 16px; height: 16px; }
  .sidebar-bottom { grid-column: 2; grid-row: 1; border: 0; padding: 0; margin: 0; gap: 4px; }
  .sidebar-bottom>span { display: none; }
  .avatar { width: 30px; height: 30px; }
  .main { margin: 0; padding: 0 16px 25px; }
  .topbar { min-height: 58px; align-items: start; flex-direction: column; gap: 6px; padding: 14px 0; }
  .page-heading { padding: 25px 0 20px; }
  .page-heading h1 { font-size: 30px; }
  .period-hint { display: none; }
  .welcome { padding: 24px; display: block; }
  .welcome h2 { font-size: 32px; }
  .welcome-total { margin-top: 24px; border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; position: relative; }
  .welcome-total strong { font-size: 34px; }
  .welcome-decoration { font-size: 240px; bottom: -40px; }
  .stat-grid { gap: 12px; }
  .stat { padding: 16px; min-height: 140px; }
  .stat strong { font-size: 24px; margin-top: 14px; }
  .stat>span { font-size: 11px; }
  a.stat::after { top: 12px; right: 12px; font-size: 14px; }
  .stat small { font-size: 10px; }
  .panel { padding: 18px; }
  .table-panel { padding: 0; }
  .panel-heading h2 { font-size: 18px; }
  .panel-heading>a { font-size: 11px; }
  .panel-heading>.muted { font-size: 11px; }
  .list-row { gap: 10px; font-size: 12px; }
  .pill { font-size: 10px; padding: 5px 8px; }
  th, td { padding: 13px 14px; }
  .filters label { flex: 1; min-width: 135px; }
  .filters .grow { flex-basis: 100%; }
  .filters>.muted { margin-top: 0; }
  .payment summary { padding: 18px; flex-wrap: wrap; gap: 10px; }
  .payment summary>div { flex: 1 1 100%; }
  .payment summary>strong { font-size: 18px; }
  .payment-content { padding: 0 18px 18px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-story { padding: 30px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-story .brand { margin-bottom: 35px; }
  .auth-story h1 { font-size: 35px; }
  .auth-art { font-size: 250px; }
  .auth-form { padding: 40px 30px; }
  dl { grid-template-columns: minmax(100px, 1fr) 1.3fr; gap: 12px; }
  .balance-strip { padding: 22px; }
  .balance-strip strong { font-size: 30px; }
}
@media (max-width: 430px) {
  .response-grid { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .request-line .panel-heading { align-items: start; }
  .request-line .panel-heading>strong { white-space: nowrap; }
  .tabs a { padding: 9px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

