/* PT BLACKGOLD — River Quarry Extraction & Reporting System
   "Black Gold" dark theme: brand orange #FC8800 from the official logo, black shell, charcoal work areas. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  /* palette */
  --ink: #f3efe8;
  --ink-2: #dcd5c9;
  --ink-3: #b3ab9d;
  --ground: #121110;
  --paper: #1c1b19;
  --surface-2: #24221f;
  --surface-3: #2b2925;
  --well: #141311;
  --line: #2f2d29;
  --line-2: #46433d;
  --orange: #fc8800;
  --orange-press: #e47b00;
  --orange-tint: rgba(252, 136, 0, 0.14);
  --shell: #000000;
  --shell-2: #0b0b0a;
  --shell-line: #2b2a27;
  --shell-muted: #bdb5a7;
  --ok: #67d394;
  --ok-solid: #1d7a46;
  --ok-tint: #12301f;
  --ok-line: #1f5537;
  --bad: #ff8f80;
  --bad-solid: #c0392b;
  --bad-tint: #3a1512;
  --bad-line: #6b2a22;
  --wait: #f2c94c;
  --wait-tint: #3a2e08;
  --wait-line: #6b5410;
  --info: #8cc8ff;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.35);
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* names the app's inline styles already use, mapped onto the palette */
  --bg-dark: var(--ground);
  --bg-panel: var(--paper);
  --bg-card: var(--surface-2);
  --bg-card-hover: var(--surface-3);
  --border: var(--line);
  --text-main: var(--ink);
  --text-muted: var(--ink-3);
  --accent-amber: var(--orange);
  --accent-amber-hover: var(--orange-press);
  --accent-blue: var(--info);
  --accent-green: var(--ok);
  --accent-purple: var(--orange);
  --accent-red: var(--bad);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  background: var(--ground);
  color: var(--ink);
  min-height: 100vh;
  caret-color: var(--orange);
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--orange); color: #000; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
* { scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }
a { color: var(--orange); text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: 0.92em; color: var(--ink-2); }
strong { font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* line icons that replace the old emoji */
.ico {
  width: 1.15em; height: 1.15em; flex: none;
  display: inline-block; vertical-align: -0.2em;
  stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------------------------------------------------------------- top bar */
.topbar {
  background: var(--shell);
  border-bottom: 1px solid var(--shell-line);
  padding: 10px 22px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { display: block; width: 40px; height: 40px; object-fit: contain; }
.brand-title { min-width: 0; }
.brand-title h1 { font-size: 15px; font-weight: 800; letter-spacing: 0.01em; line-height: 1.15; color: #fff; }
.brand-title span { display: block; font-size: 12.5px; font-weight: 700; color: var(--orange); margin-top: 2px; }
.topbar-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.date-control { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--shell-muted); white-space: nowrap; }
.date-control .form-control { padding: 7px 10px; font-size: 14px; background: var(--shell); border-color: var(--shell-line); color: #fff; min-height: 38px; }
.topbar .btn-secondary, .topbar .btn-danger { background: transparent; color: #f5f2ec; border-color: var(--shell-line); }
.topbar .btn-secondary:hover, .topbar .btn-danger:hover { border-color: var(--shell-muted); background: #121211; }

.role-pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 0 14px 0 5px;
  border-radius: 999px;
  background: #161514; border: 1px solid var(--shell-line);
  font-size: 13px; font-weight: 700; color: #f5f2ec; white-space: nowrap;
}
.role-pill i { width: 28px; height: 28px; border-radius: 50%; background: var(--orange); color: #000; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 12px; }
.role-pill small { font-size: 12px; font-weight: 500; color: var(--shell-muted); }
.role-boss i { background: var(--orange); }
.role-admin i { background: #f5f2ec; }
.role-accounting i { background: var(--ok); }
.role-checker i { background: var(--info); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-2);
  background: var(--surface-2);
  color: var(--ink);
  font: 700 14px/1.15 var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
}
/* short controls stay on one line; long full-width actions (hold to record, submit EOD) may wrap */
.table-responsive td .btn, .topbar .btn, .truck-chip { white-space: nowrap; }
.app-shell .nav-tab { white-space: normal; }
.btn { text-align: center; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--orange); border-color: var(--orange); color: #000; }
.btn-primary:hover { background: var(--orange-press); border-color: var(--orange-press); }
.btn-secondary { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-success { background: var(--ok-solid); border-color: var(--ok-solid); color: #fff; }
.btn-success:hover { background: #22894f; border-color: #22894f; }
/* danger actions stay quiet until hovered; the confirm-cancellation buttons set solid red inline */
.btn-danger { background: transparent; border-color: var(--bad-line); color: var(--bad); }
.btn-danger:hover { background: var(--bad-tint); border-color: var(--bad); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 6px; }

/* ---------------------------------------------------------------- sign-in */
.login-wrapper { position: relative; min-height: 100vh; overflow: hidden; background: #050505; }
.login-photo {
  position: fixed; inset: 0;
  background: #0a0806 url("/img/excavator-river-1920.webp") 6% center / cover no-repeat;
  transform: scale(1.03);
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: photo-settle 2.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.login-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 78%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0) 42%),
    rgba(0, 0, 0, 0.18);
}
@keyframes photo-settle { from { transform: scale(1.09); filter: brightness(0.55); } to { transform: scale(1.03); filter: none; } }
.login-layout {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 400px; align-items: center; gap: 48px;
  padding: 40px 56px;
}
.login-info { align-self: end; max-width: 560px; padding-bottom: 8px; position: relative; }
.login-info::before { content: ""; position: absolute; inset: -60px -90px -30px -80px; z-index: -1; background: radial-gradient(closest-side, rgba(4, 5, 6, 0.8), rgba(4, 5, 6, 0)); }
.login-headline { font-size: 44px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; text-wrap: balance; color: #fff; }
.login-lede { font-size: 17px; color: #e8dfd0; max-width: 46ch; }
.login-secure { display: flex; gap: 8px; align-items: center; margin-top: 18px; font-size: 14px; color: #cfc4b2; }
.login-card {
  background: rgba(17, 16, 15, 0.95);
  border: 1px solid #3a2a14;
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(252, 136, 0, 0.18);
}
.login-lockup { display: block; width: 150px; height: auto; margin: 0 auto 6px; }
.login-system { text-align: center; font-size: 13px; color: var(--ink-3); margin-bottom: 22px; }
.login-title { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.login-hint { font-size: 14px; color: var(--ink-3); margin: 4px 0 18px; }
.login-card form .form-group { margin-bottom: 14px; }
.login-card form .btn-primary { width: 100%; min-height: 52px; font-size: 16px; margin-top: 4px; }
.login-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.login-note .ico, .login-secure .ico { color: var(--orange); }
@media (prefers-reduced-motion: reduce) { .login-photo { animation: none; transition: none; } }
@media (max-width: 767px) {
  /* phones: photo on top, the sign-in card right under it (button visible without scrolling), intro text after */
  .login-wrapper { overflow-x: hidden; overflow-y: visible; }
  .login-photo { position: absolute; inset: 0 0 auto 0; height: 34vh; background-image: url("/img/excavator-river-1100.webp"); background-position: 24% center; animation: none; transform: none !important; }
  .login-photo::after { background: linear-gradient(0deg, #050505 0%, rgba(5, 5, 5, 0) 45%), rgba(0, 0, 0, 0.12); }
  .login-layout { display: flex; flex-direction: column; gap: 18px; padding: calc(34vh - 36px) 12px 28px; min-height: 0; }
  .login-card { order: 1; padding: 20px 18px 18px; }
  .login-info { order: 2; padding: 0 6px; align-self: stretch; }
  .login-info::before { display: none; }
  .login-headline { font-size: 24px; margin-bottom: 6px; }
  .login-lede { font-size: 15px; color: var(--ink-3); }
  .login-secure { display: flex; margin-top: 12px; font-size: 13px; }
  .login-lockup { width: 104px; }
  .login-system { margin-bottom: 14px; }
  .login-hint { margin-bottom: 14px; }
  .login-card form .form-group { margin-bottom: 12px; }
}

/* legacy login helpers (kept for any quick-account buttons) */
.quick-accounts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.account-preset-btn { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 10px; text-align: left; color: var(--ink); cursor: pointer; }
.account-preset-btn:hover { border-color: var(--orange); }
.account-preset-btn strong { display: block; font-size: 14px; }
.account-preset-btn small { color: var(--ink-3); font-size: 12px; }

/* ---------------------------------------------------------------- shell layout */
.app-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.main-container { padding: 22px 26px 48px; min-width: 0; }
.app-shell .nav-tabs {
  position: sticky; top: 64px; align-self: start;
  height: calc(100vh - 64px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 12px;
  background: var(--shell-2); border-right: 1px solid var(--shell-line);
}
.nav-tab {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px;
  background: transparent; border: 0; border-radius: 8px;
  color: #d9d2c5; font: 700 14px/1.25 var(--font); text-align: left;
  cursor: pointer; transition: background 0.15s, color 0.15s;
}
.nav-tab .ico { width: 19px; height: 19px; }
.nav-tab:hover { background: #1a1917; color: #fff; }
.nav-tab.active { background: var(--orange); color: #000; }

/* phone preview frame (desktop button) and small screens: tabs scroll across the top */
.mobile-frame-mode {
  max-width: 440px; margin: 16px auto;
  border: 8px solid #26241f; border-radius: 30px; overflow: hidden;
  background: var(--ground); box-shadow: var(--shadow-lg);
}
.mobile-frame-mode .main-container { padding: 12px 12px 32px; }
.mobile-frame-mode .nav-tabs,
.app-shell .nav-tabs.is-compact { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 0; gap: 0; background: var(--paper); border-right: 0; border-bottom: 1px solid var(--line); }
.mobile-frame-mode .nav-tab { width: auto; flex: none; border-radius: 0; padding: 12px 14px 12px; color: var(--ink-3); white-space: nowrap; }
.mobile-frame-mode .nav-tab.active { background: transparent; color: var(--ink); box-shadow: inset 0 -3px 0 var(--orange); }
@media (max-width: 1023px) {
  .app-shell { display: block; }
  .app-shell .nav-tabs { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 0; gap: 0; background: var(--paper); border-right: 0; border-bottom: 1px solid var(--line); }
  .app-shell .nav-tab { width: auto; flex: none; border-radius: 0; padding: 12px 14px 12px; color: var(--ink-3); white-space: nowrap; }
  .app-shell .nav-tab.active { background: transparent; color: var(--ink); box-shadow: inset 0 -3px 0 var(--orange); }
  .main-container { padding: 14px 12px 40px; }
}
@media (max-width: 767px) {
  .topbar { padding: 10px 12px; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-title h1 { font-size: 13px; }
  .topbar-controls { width: 100%; gap: 8px; }
  .date-control { margin-right: auto; }
  .date-control span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .date-control .form-control { width: 124px; min-height: 34px; padding: 5px 6px; font-size: 13px; }
  .role-pill { padding: 0 10px 0 4px; gap: 6px; }
  .topbar-controls { gap: 6px; flex-wrap: nowrap; }
  .role-pill small { display: none; }
  .topbar .btn-sm { min-height: 34px; }
  .role-pill { min-height: 32px; font-size: 12.5px; }
  .role-pill i { width: 24px; height: 24px; font-size: 11px; }
  #toggle-mobile-frame-btn { display: none; }
}

/* ---------------------------------------------------------------- hero band */
.hero-band {
  position: relative; overflow: hidden;
  min-height: 128px; margin-bottom: 18px;
  display: flex; align-items: center;
  padding: 22px 26px;
  border-radius: var(--radius); border: 1px solid #3a2a14;
  background: #0b0b0a url("/img/excavator-river-1100.webp") right 0 top 42% / 62% auto no-repeat;
  box-shadow: var(--shadow);
}
.hero-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0b0b0a 0%, rgba(11, 11, 10, 0.92) 38%, rgba(11, 11, 10, 0) 72%); }
.hero-band > * { position: relative; }
.hero-band h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.015em; color: #fff; }
.hero-band p { color: #e4dccd; font-size: 14px; margin-top: 4px; }
@media (max-width: 767px) {
  .hero-band { min-height: 96px; padding: 16px; background-size: auto 100%; background-position: right center; }
  .hero-band::before { background: linear-gradient(90deg, #0b0b0a 0%, rgba(11, 11, 10, 0.85) 55%, rgba(11, 11, 10, 0.2) 100%); }
  .hero-band h2 { font-size: 19px; }
}

/* ---------------------------------------------------------------- KPI strip */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.kpi-card { padding: 16px 20px 18px; border-left: 1px solid var(--line); margin-left: -1px; }
.kpi-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.kpi-value { font-size: 32px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; margin: 6px 0 4px; color: var(--ink); }
.kpi-sub { font-size: 13px; color: var(--ink-3); }

/* ---------------------------------------------------------------- panels */
.panel-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
@media (max-width: 1500px) { .panel-grid { grid-template-columns: minmax(0, 1fr); } }
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel-grid > .panel, .panel-grid > div > .panel { margin-bottom: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px 12px; }
.panel-title { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 9px; color: var(--ink); }
.panel-title .ico { color: var(--orange); width: 20px; height: 20px; }
.panel h3, .panel h4 { color: var(--ink); }
.panel ul { padding-left: 1.2rem; }
.panel p { color: inherit; }

/* ---------------------------------------------------------------- checker: capacity tiles + hold to record */
.capacity-selector-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; margin: 12px 0 20px; }
@media (max-width: 600px) { .capacity-selector-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
.capacity-btn {
  position: relative; overflow: hidden;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 92px; padding: 12px 6px;
  background: var(--surface-2);
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), 0 8px 18px rgba(0, 0, 0, 0.25);
  color: var(--ink); font-family: var(--font);
  cursor: pointer; text-align: center;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
}
.capacity-btn:hover { border-color: var(--orange); }
.capacity-btn:active { transform: translateY(2px); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.capacity-btn.selected { background: var(--orange); border-color: #ffb14d; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 8px 18px rgba(0, 0, 0, 0.3); color: #000; }
.capacity-btn .cap-num { position: relative; z-index: 2; font-size: 34px; font-weight: 800; line-height: 1; color: inherit; }
.capacity-btn .cap-unit { position: relative; z-index: 2; font-size: 12px; font-weight: 700; color: var(--ink-3); margin-top: 4px; }
.capacity-btn .cap-hold-hint { position: relative; z-index: 2; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-3); margin-top: 3px; }
.capacity-btn.selected .cap-unit, .capacity-btn.selected .cap-hold-hint { color: #2b1700; }
.hold-progress-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: rgba(0, 0, 0, 0.22) !important; pointer-events: none; z-index: 1; transition: width 0.05s linear; }
.capacity-btn:not(.selected) .hold-progress-fill { background: rgba(252, 136, 0, 0.35) !important; }
.hold-submit-btn { position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.hold-submit-btn.btn-primary, #record-load-btn { min-height: 58px; font-size: 16px; font-weight: 800; border-radius: 12px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 8px 18px rgba(0, 0, 0, 0.3); }
.hold-submit-btn .hold-btn-label { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-group label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.form-control {
  width: 100%; min-height: 44px;
  background: var(--well);
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--ink);
  font: 500 15px var(--font);
  outline: none;
}
.form-control::placeholder { color: #938c80; }
.form-control:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-tint); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23dcd5c9' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input[type="date"].form-control::-webkit-calendar-picker-indicator { filter: invert(0.85); cursor: pointer; }
textarea.form-control { min-height: 84px; resize: vertical; }
input[type="checkbox"] { accent-color: var(--orange); width: 16px; height: 16px; }

.truck-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.truck-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 12px;
  background: var(--surface-2); border: 1.5px solid var(--line-2); border-radius: 999px;
  color: var(--ink-2); font: 700 13px/1 var(--font); cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.truck-chip:hover { border-color: var(--ink-3); }
.truck-chip.active { background: var(--orange); border-color: var(--orange); color: #000; }

/* ---------------------------------------------------------------- tables */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 11px; text-align: left; border-bottom: 1px solid #292724; vertical-align: middle; }
th { color: var(--ink-3); font-weight: 700; font-size: 12px; letter-spacing: 0.02em; background: var(--surface-2); white-space: nowrap; }
tr:hover td { background: #211f1c; }
td small { color: var(--ink-3); }
.table-responsive td:first-child, .table-responsive th { white-space: nowrap; }
.table-responsive td.no-print { min-width: 196px; }
.table-responsive td:first-child strong { font-size: 12.5px; font-weight: 700; }
.table-responsive th, .table-responsive td { padding-left: 8px; padding-right: 8px; }
.table-responsive td.no-print > div { flex-wrap: wrap !important; justify-content: flex-end; gap: 6px !important; }
.table-responsive td .badge { white-space: normal; max-width: 160px; }
.table-responsive td:has(> br) { min-width: 150px; }

/* ---------------------------------------------------------------- bars */
.bar-row { margin-bottom: 12px; }
.bar-label-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 5px; }
.bar-track { height: 10px; background: #2a2825; border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--orange); border-radius: 3px; transition: width 0.3s ease; }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 5px;
  font: 700 11.5px/1.25 var(--font); letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge .ico { width: 13px; height: 13px; }
.badge-verified { background: var(--ok-tint); color: var(--ok); border-color: var(--ok-line); }
.badge-logged { background: var(--surface-2); color: var(--ink-2); border-color: #5a564e; border-style: dashed; }
.badge-client { background: var(--surface-2); color: var(--ink-2); border-color: var(--line-2); }
.table-responsive td .badge-client { white-space: nowrap; }

/* ---------------------------------------------------------------- boss oversight */
.oversight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 18px; }
.oversight-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

/* ---------------------------------------------------------------- toasts */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #1f1d1a; color: var(--ink);
  border: 1px solid #5a3a10; border-radius: 10px;
  padding: 13px 16px; max-width: 420px;
  box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: 700;
  animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideIn { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

.print-only-header { display: none; }
.print-only-statement { display: none; }

/* ---------------------------------------------------------------- print (statement of account stays black on white) */
@media print {
  @page { size: A4 portrait; margin: 6mm 8mm; }
  * { box-shadow: none !important; text-shadow: none !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body { background: #fff !important; color: #000 !important; font-family: Arial, Helvetica, sans-serif !important; font-size: 8.5pt !important; line-height: 1.15 !important; min-height: auto !important; }
  .topbar, .nav-tabs, .no-print, .screen-only-view, .hero-band, #toast-container { display: none !important; }
  .app-shell { display: block !important; min-height: 0 !important; }
  .main-container, .mobile-frame-mode { max-width: 100% !important; width: 100% !important; margin: 0 !important; padding: 0 !important; border: none !important; background: #fff !important; }
  .print-only-statement { display: block !important; width: 100% !important; color: #000 !important; background: #fff !important; }
  .soa-header-box { display: flex !important; align-items: center !important; justify-content: space-between !important; border-bottom: 2px solid #000 !important; padding-bottom: 5px !important; margin-bottom: 5px !important; }
  .soa-brand-left { display: flex !important; align-items: center !important; gap: 10px !important; }
  .soa-company-name { font-size: 13pt !important; font-weight: 900 !important; letter-spacing: 0.04em !important; color: #000 !important; line-height: 1.05 !important; }
  .soa-company-sub { font-size: 7.2pt !important; font-weight: 700 !important; letter-spacing: 0.11em !important; color: #222 !important; border-top: 1.2px solid #000 !important; padding-top: 2px !important; margin-top: 2px !important; }
  .soa-title-right { text-align: right !important; }
  .soa-doc-title { font-size: 11.5pt !important; font-weight: 900 !important; color: #000 !important; letter-spacing: 0.04em !important; }
  .soa-invoice-tag { font-size: 8.5pt !important; font-weight: 800 !important; color: #c2410c !important; }
  .soa-meta-grid { display: grid !important; grid-template-columns: 1.4fr 1fr !important; gap: 2px 12px !important; font-size: 8pt !important; margin-bottom: 5px !important; padding: 4px 6px !important; border: 1px solid #000 !important; background: #f8fafc !important; }
  .soa-meta-row { display: flex !important; gap: 5px !important; line-height: 1.25 !important; }
  .soa-meta-label { font-weight: 800 !important; min-width: 92px !important; color: #000 !important; }
  .soa-table { width: 100% !important; border-collapse: collapse !important; font-size: 7.8pt !important; margin-bottom: 6px !important; }
  .soa-table th, .soa-table td { border: 1px solid #000 !important; padding: 1.5px 4px !important; line-height: 1.15 !important; color: #000 !important; vertical-align: middle !important; background: transparent; }
  .soa-table th { background: #e2e8f0 !important; font-weight: 800 !important; font-size: 7.4pt !important; text-transform: uppercase !important; text-align: center !important; }
  .soa-table tr { page-break-inside: avoid !important; }
  .soa-table tfoot td { background: #f1f5f9 !important; font-weight: 900 !important; font-size: 8.2pt !important; padding: 2.5px 4px !important; }
  .soa-cap-pill { display: inline-block !important; font-weight: 800 !important; padding: 0 4px !important; border-radius: 3px !important; min-width: 26px !important; text-align: center !important; }
  .soa-summary-strip { display: flex !important; justify-content: space-between !important; align-items: flex-start !important; gap: 10px !important; font-size: 7.5pt !important; margin-top: 4px !important; page-break-inside: avoid !important; }
  .soa-mini-box { border: 1px solid #000 !important; padding: 3px 6px !important; flex: 1 !important; }
  .soa-signatures { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 18px !important; margin-top: 12px !important; font-size: 7.5pt !important; page-break-inside: avoid !important; }
  .soa-sig-line { border-top: 1px solid #000 !important; margin-top: 16px !important; padding-top: 2px !important; text-align: center !important; font-weight: 700 !important; }
  tr:hover td { background: transparent !important; }
}
