:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #182b25;
  background: #f5f7f6;
  font-synthesis: none;
  --ink: #182b25;
  --muted: #66756e;
  --line: #dfe6e2;
  --brand: #173d30;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button, .button {
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  padding: 11px 17px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
button:hover:not(:disabled), .button:hover { filter: brightness(1.07); }
.subtle {
  color: var(--ink);
  background: #fff;
  border-color: #ccd8d0;
}
.text-button {
  padding: 5px 0;
  min-height: 32px;
  background: transparent;
  color: var(--brand);
  text-align: left;
  font-size: 12px;
}
:focus-visible { outline: 3px solid #64a990; outline-offset: 3px; }
a { color: var(--brand); }
input, select, textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  min-height: 44px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #ccd8d0;
  border-radius: 8px;
  font-size: 15px;
}
textarea { min-height: 90px; resize: vertical; }
input[readonly] { background: #f5f7f6; border-color: transparent; }
input::placeholder { color: #86938b; }
label {
  display: grid;
  gap: 7px;
  margin: 15px 0;
  color: #34483f;
  font-size: 13px;
  font-weight: 600;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 30px; font-weight: 650; letter-spacing: -.035em; }
h2 { margin-bottom: 12px; font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
h3 { margin-bottom: 12px; font-size: 16px; }
p { color: var(--muted); line-height: 1.55; font-size: 14px; }
small { font-size: 12px; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 15px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand, .workspace-brand { display: flex; gap: 10px; align-items: center; }
.brand strong { font-size: 19px; letter-spacing: -.04em; }
.brand small, .workspace-brand small { display: block; color: var(--muted); font-weight: 450; }
.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  background: var(--brand);
  color: white;
  border-radius: 10px;
  font-weight: 750;
  font-size: 24px;
}
.environment {
  padding: 7px 10px;
  border: 1px solid #e8d9a5;
  border-radius: 6px;
  background: #fffbef;
  color: #7c631e;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .035em;
}
main { max-width: 1460px; margin: auto; }
.login { max-width: 420px; margin: 8vh auto; }
.card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 3px 12px #173d3003;
  margin-bottom: 18px;
}
.eyebrow {
  margin-bottom: 8px;
  color: #547264;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.login h1 { font-size: 27px; }
.login form > button[type=submit] { width: 100%; }
.error { color: #b33d32; }
.operations-app #console { display: grid; grid-template-columns: 214px minmax(0, 1fr); min-height: calc(100vh - 145px); }
.workspace-sidebar {
  padding: 29px 18px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.workspace-brand { padding: 0 8px 30px; }
.workspace-brand strong { font-size: 17px; }
.workspace-brand small { font-size: 10px; margin-top: 3px; }
#workspace-nav { display: grid; gap: 5px; }
#workspace-nav button {
  display: flex;
  gap: 13px;
  align-items: center;
  min-height: 43px;
  width: 100%;
  padding: 10px 12px;
  color: #5c6b63;
  background: transparent;
  text-align: left;
  font-size: 13px;
}
#workspace-nav button[aria-current=page] { color: #173d30; background: #edf4ef; }
.nav-number { font-size: 10px; font-variant-numeric: tabular-nums; opacity: .65; }
.sidebar-note { margin-top: auto; padding: 40px 12px 0; color: #7b8b82; line-height: 1.5; font-size: 15px; }
.sidebar-note strong { color: #40574b; font-weight: 550; }
.sidebar-note small { display: block; margin-top: 18px; font-size: 10px; }
.workspace-body { min-width: 0; padding: 23px 30px 45px; }
.top, .toolbar, .screen-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.top { padding-bottom: 15px; }
.top .eyebrow { display: none; }
.company-name { margin: 0; font-size: 16px; letter-spacing: -.02em; }
#identity { font-size: 11px; margin: 5px 0 0; }
#logout { padding: 7px 11px; min-height: 36px; font-size: 12px; }
.toolbar { justify-content: flex-start; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.toolbar label { margin: 0; display: flex; align-items: center; gap: 9px; font-size: 11px; }
.toolbar select { padding: 7px 26px 7px 9px; min-height: 34px; font-size: 12px; max-width: 260px; }
#reload { min-height: 34px; padding: 6px 12px; font-size: 12px; }
#updated, #status { font-size: 11px; color: #7a8b80; }
#status { min-height: 18px; margin: 0 0 20px; }
.screen-heading { margin-bottom: 22px; align-items: flex-start; }
.screen-heading p { margin-bottom: 0; font-size: 13px; }
.screen-heading h1 { outline: none; }
.connection-state { flex-shrink: 0; font-size: 11px; color: #48715a; padding-top: 7px; }
.connection-state::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; }
.next-task { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-left: 3px solid #49765b; }
.next-task h2 { font-size: 22px; margin-bottom: 7px; }
.next-task p { margin-bottom: 0; max-width: 600px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.quick-actions button { padding: 17px; background: #fff; border-color: var(--line); color: var(--ink); text-align: left; }
.quick-actions strong, .quick-actions span { display: block; }
.quick-actions strong { font-size: 13px; font-weight: 650; }
.quick-actions span { margin-top: 6px; font-size: 11px; font-weight: 450; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid .card { padding: 18px; }
.grid .eyebrow { font-size: 9px; }
.grid h2 { font-size: 23px; margin: 0; font-variant-numeric: tabular-nums; }
.notice { padding: 19px; background: #edf3f0; border: 1px solid #d4e2d9; border-radius: 10px; margin-bottom: 18px; }
.notice p { margin: 7px 0 0; }
.notice button { margin-top: 12px; }
.warning { background: #fffbef; border-color: #e9ddb6; }
#shift-recovery-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
#shift-recovery-card button { flex-shrink: 0; margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.pos-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); gap: 26px; align-items: start; }
.trade-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trade-modes button { padding: 13px 12px; background: #fff; color: #4c6054; border: 1px solid #ccd8d0; text-align: left; font-size: 13px; }
.trade-modes button[aria-pressed=true] { color: #173d30; background: #edf5ef; border-color: #427654; box-shadow: inset 0 0 0 1px #427654; }
.trade-modes small { display: block; margin-top: 6px; font-size: 10px; font-weight: 450; line-height: 1.4; }
.trade-steps { display: flex; gap: 12px; padding: 16px 0 0; margin: 0 0 5px; list-style: none; color: #9aa69e; font-size: 10px; }
.trade-steps [aria-current=step] { color: #24583c; font-weight: 700; }
#trade-quantity { font-size: 28px; font-variant-numeric: tabular-nums; min-height: 61px; letter-spacing: -.03em; }
.trade-summary { background: #f4f7f5; border: 1px solid #dfe8e1; border-radius: 12px; padding: 23px; position: sticky; top: 20px; }
.money-direction { margin-top: 24px; }
.money-direction span { display: block; color: #75867b; font-size: 12px; }
.money-direction strong { display: block; margin-top: 6px; font-size: clamp(22px, 2vw, 30px); letter-spacing: -.04em; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.summary-rate { display: flex; justify-content: space-between; gap: 8px; margin-top: 26px; padding-top: 15px; border-top: 1px solid #d5e1d8; font-size: 12px; }
.summary-rate span { color: var(--muted); }
#summary-help { font-size: 11px; margin: 13px 0 0; }
#trade-quote { color: #365b45; font-size: 12px; line-height: 1.5; margin-top: 15px; }
#trade-submit { width: 100%; margin-top: 15px; }
#receipt-card { border-color: #9bc1a4; }
#receipt-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
#receipt-details p { font-size: 12px; overflow-wrap: anywhere; }
#new-trade { margin-left: 8px; }
.scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
th, td { padding: 13px 10px; border-bottom: 1px solid #e8ede9; text-align: left; }
th { color: #819087; text-transform: uppercase; font-size: 9px; letter-spacing: .06em; font-weight: 650; }
td { color: #364b3e; font-variant-numeric: tabular-nums; }
td button { padding: 6px 10px; min-height: 34px; font-size: 11px; }
.history-filters { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.history-filters label { flex: 1 1 180px; max-width: 280px; margin: 0; }
#history-page { padding-bottom: 12px; color: var(--muted); font-size: 11px; }
.count-group { border: 1px solid var(--line); border-radius: 9px; padding: 0 13px 10px; margin: 14px 0; }
.count-group summary { padding: 14px 0; cursor: pointer; font-weight: 650; color: #335541; font-size: 14px; }
.count-group summary output { float: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.count-line { display: grid; grid-template-columns: 40px minmax(70px, 1fr) minmax(65px, 1fr) minmax(100px, 1fr) auto; gap: 10px; align-items: center; margin: 8px 0; }
.count-line strong { color: #829187; font-size: 10px; }
.count-line output { text-align: right; color: #4e6657; font-size: 12px; font-variant-numeric: tabular-nums; }
.count-line button { min-height: 32px; padding: 4px 8px; font-size: 10px; }
.count-head { display: flex; justify-content: space-between; color: #839088; font-size: 10px; padding-bottom: 4px; }
.count-total { padding-top: 12px; font-size: 13px; font-weight: 650; color: #335541; }
footer { padding: 20px; text-align: center; color: #849187; font-size: 11px; }
footer a { color: #526e5a !important; }
.entry { max-width: 1000px; padding: 80px 28px; margin: auto; }
.entry h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.06; max-width: 650px; margin: 22px 0; }
.entry > p { max-width: 580px; font-size: 16px; }
.entry-actions { display: flex; gap: 10px; align-items: center; margin: 30px 0 45px; flex-wrap: wrap; }
.entry-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.entry-cards .card h2 { font-size: 16px; }
.entry-cards .card p { margin: 0; font-size: 12px; }
@media (max-width: 1080px) {
  .operations-app #console { grid-template-columns: 180px minmax(0, 1fr); }
  .workspace-body { padding: 22px; }
  .workspace-sidebar { padding: 24px 11px; }
  .pos-layout { grid-template-columns: minmax(0, 1fr); }
  .trade-summary { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
  .trade-summary > .eyebrow, .summary-rate, #summary-help, #trade-quote, #trade-submit { grid-column: 1 / -1; }
  .money-direction { margin-top: 12px; }
  .quick-actions { gap: 8px; }
}
@media (max-width: 760px) {
  header { padding: 12px 17px; min-height: 64px; }
  header .brand small { display: none; }
  .operations-app #console { display: flex; flex-direction: column; }
  .workspace-sidebar { padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
  .workspace-brand, .sidebar-note { display: none; }
  #workspace-nav { display: flex; gap: 3px; overflow-x: auto; }
  #workspace-nav button { width: auto; white-space: nowrap; min-height: 40px; padding: 9px 12px; font-size: 12px; }
  .nav-number { display: none; }
  .workspace-body { padding: 20px 15px 40px; }
  .screen-heading h1 { font-size: 27px; }
  .screen-heading p { max-width: 240px; }
  .card { padding: 18px; border-radius: 11px; }
  .quick-actions { grid-template-columns: 1fr; }
  .quick-actions button { display: flex; align-items: center; justify-content: space-between; padding: 14px; }
  .quick-actions span { margin: 0; }
  .grid { gap: 8px; grid-template-columns: 1fr 1fr; }
  .grid .card:first-child { grid-column: 1 / -1; }
  .grid .card { padding: 15px; }
  .next-task { align-items: flex-start; flex-direction: column; }
  .next-task h2 { font-size: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .trade-modes small { font-size: 10px; }
  .count-line { grid-template-columns: minmax(65px, 1fr) minmax(60px, 1fr) minmax(90px, 1fr) auto; gap: 6px; }
  .count-line strong { display: none; }
  .count-line input { padding: 9px 7px; font-size: 13px; }
  .count-line button { padding: 4px; }
  .count-line output { font-size: 10px; }
  .count-group { padding: 0 9px 8px; }
  #receipt-details { grid-template-columns: 1fr; }
  #receipt-card button { display: block; width: 100%; margin: 10px 0 0; }
  #shift-recovery-card { display: block; }
  #shift-recovery-card button { margin-top: 12px; }
  .login { margin: 35px 16px; max-width: none; }
  .environment { max-width: 170px; font-size: 8px; text-align: center; }
  .entry { padding: 45px 20px; }
  .entry-cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color .12s, border-color .12s; }
}

#toggle-signup { margin-top: 12px; }
#show-password { margin: -5px 0 12px; }

.finance-filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.finance-filters label { margin: 0; flex: 1 1 140px; }
.finance-filters button { margin-bottom: 0; }
.finance-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.finance-metrics .card { padding: 16px; margin-bottom: 0; background: #f5f8f6; }
.finance-metrics strong { font-size: 20px; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.finance-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.finance-tabs button { white-space: nowrap; background: #fff; color: #5c6b63; border-color: #dfe6e2; font-size: 11px; min-height: 36px; padding: 8px 10px; }
.finance-tabs [aria-pressed=true] { color: #173d30; border-color: #7ea68b; background: #edf5ef; }
.finance-actions { display: flex; gap: 8px; margin: 15px 0; }
.finance-actions button { font-size: 12px; min-height: 36px; }
#finance-scope { font-size: 11px; }
.finance-table { max-height: 650px; }
.finance-table td:last-child { max-width: 400px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .finance-metrics { grid-template-columns: 1fr 1fr; }
  .finance-metrics strong { font-size: 17px; }
  .finance-filters label { flex-basis: 40%; }
  .finance-filters button { width: 100%; }
}
@media print {
  body > header, body > footer, .workspace-sidebar, .top, .toolbar, #status, .screen-heading,
  .finance-filters, .finance-actions, .finance-tabs { display: none !important; }
  .operations-app #console { display: block; }
  .workspace-body { padding: 0; }
  .finance-table, .scroll { overflow: visible; max-height: none; }
  .finance-table table { white-space: normal; font-size: 9px; }
  .finance-table th, .finance-table td { padding: 6px 4px; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .finance-metrics .card { padding: 10px; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
}
