/* Shared workspace: readable type, restrained surfaces, comfortable controls. */
:root {
  --canvas: #f5f7fa;
  --ink: #26364a;
  --muted: #607186;
  --line: #e3e9f0;
  --primary: #285f8f;
  --primary-dark: #1e4c75;
  --primary-tint: #edf4fa;
  --nav: #192c3d;
  --radius: 12px;
}
body { -webkit-font-smoothing: antialiased; }
::selection { background: #dcebf7; color: #193f63; }
h1 { font-size: 28px; letter-spacing: -.6px; }
h1[tabindex="-1"]:focus { outline: none; }
main { padding-top: 28px; }
.page-heading { margin-bottom: 22px; }
.page-heading p { font-size: 14px; margin-top: 7px; }
.sidebar { background: var(--nav); }
.brand small { font-size: 10px; }
.workspace { background: #22394c; border-color: #304658; }
.workspace small, .sidebar-note p { color: #adc0d0; font-size: 11px; }
.nav-item { font-size: 14px; min-height: 46px; }
.nav-item.active { background: #31516d; box-shadow: inset 3px 0 #a9cde9; }
.nav-label, .sidebar-note > span { color: #9fb2c4; font-size: 11px; }
.breadcrumb, .storage-status { font-size: 12px; }
.topbar-actions { gap: 16px; }
.account-button { min-height: 36px; padding: 6px 11px; }
.account-button > span, .role-chip { font-size: 11px; }
.button { min-height: 42px; padding: 9px 16px; border-radius: 7px; font-size: 14px; }
.primary { box-shadow: 0 1px 2px #193f6312; }
.text-button { min-height: 32px; font-size: 13px; }
.icon-button { width: 38px; height: 38px; flex-shrink: 0; }
.overview { margin-bottom: 22px; padding: 18px 0; box-shadow: 0 2px 5px #243d5603; }
.overview > div > div > span { font-size: 13px; }
.overview p, .overview strong small { font-size: 12px; }
.overview strong { font-size: 30px; margin-top: 2px; }
.panel { box-shadow: 0 2px 6px #243d5603; }
.list-top { padding-top: 18px; padding-bottom: 10px; }
.list-top .muted { font-size: 12px; }
.filter-tabs { gap: 23px; }
.filter { font-size: 13px; min-height: 46px; padding-bottom: 12px; }
.filter > span { font-size: 11px; min-width: 19px; }
.filter.active { border-bottom-width: 3px; }
.table-toolbar { padding-block: 12px; }
.search { min-height: 42px; width: 380px; border-radius: 7px; background: #fcfdff; }
.search input { font-size: 13px; }
.search input::placeholder { color: #78899b; }
.search:focus-within { background: #fff; box-shadow: 0 0 0 3px #285f8f12; }
.clear-search { min-width: 26px; min-height: 26px; }
.sort-label, .sort-label select { font-size: 12px; }
.sort-label select { min-height: 38px; }
th { font-size: 12px; padding-block: 11px; background: #f6f8fb; }
td { padding-block: 16px; font-size: 14px; color: #53677f; }
td small { font-size: 12px; }
.record-title { font-size: 14px; line-height: 1.6; }
.batch-link { font-size: 13px; }
.qty { font-size: 22px; }
.qty.zero { color: #708294; }
.unit { font-size: 11px; color: #607186; }
.badge { font-size: 12px; padding: 4px 9px; border-radius: 5px; }
.pending { background: #fcf3e4; color: #865b19; }
.rework { background: #edf0f6; color: #536782; }
.review { background: #eaf2fb; color: #2c6496; }
.closing { background: #eaf5f2; color: #326e66; }
.closed { background: #eef5ef; color: #466e53; }
.row-action { min-height: 36px; font-size: 13px; }
.panel-footer, .panel-footer .text-button, .page-footnote { font-size: 12px; }
.panel-footer { padding-block: 11px; }
.page-footnote { line-height: 1.85; margin-top: 16px; }
.mobile-qty-label { display: none; }

/* A form's current task is primary; supporting facts stay quieter but readable. */
.drawer { width: 680px; }
.dialog-header { padding-block: 22px 18px; }
.dialog-header h2 { font-size: 22px; }
.dialog-kicker, .dialog-header p, .dialog-header p > .badge { font-size: 12px; }
.record-summary { padding-block: 18px; }
.record-summary span, .record-summary strong small { font-size: 12px; }
.record-summary strong { font-size: 28px; }
.detail-tabs > button { font-size: 13px; min-height: 46px; }
.detail-tabs > button > span { font-size: 11px; }
.drawer-body { scrollbar-gutter: stable; }
.task-heading h3 { font-size: 18px; }
.task-heading .eyebrow, .task-heading .text-button { font-size: 12px; }
.task-description, .form-intro { font-size: 13px; line-height: 1.85; }
.field > span, .check, .instruction { font-size: 13px; }
.field input, .field select, .field textarea { font-size: 14px; min-height: 44px; border-radius: 7px; }
.field input::placeholder, .field textarea::placeholder { font-size: 13px; color: #7a8a9d; }
.field input:read-only { color: #536c84; background: #f3f6f9; }
.field :disabled { color: #65788b; background: #f2f5f8; cursor: wait; }
.field-help { font-size: 12px; }
.field > .field-help { color: var(--muted); font-size: 12px; }
.check { padding-block: 4px; }
.check input { width: 17px; height: 17px; margin-top: 3px; }
.instruction > span, .footer-hint, .form-error, .quantity-check, .success-note { font-size: 12px; }
.dialog-footer { min-height: 78px; box-shadow: 0 -4px 16px #203b5604; }
.footer-hint { max-width: 280px; line-height: 1.7; }
.details-grid dt, .details-grid small, .round-item summary small, .timeline time, .timeline small { font-size: 12px; }
.details-grid dd, .round-item strong, .round-body dl, .timeline p, .timeline strong { font-size: 13px; }
.round-result { font-size: 12px; }
.batch-bar > div > span, .trace-summary small, .trace-record header p { font-size: 12px; }
.batch-bar strong { font-size: 14px; }
.guide-hero p, .guide-steps p, .scope-grid p { font-size: 13px; line-height: 1.85; }
.guide-steps strong, .scope-grid strong { font-size: 14px; }
.source-links { font-size: 12px; }
.auth-card { max-width: 450px; padding: 36px 38px; border-radius: 16px; box-shadow: 0 18px 60px #243d5610; }
.auth-brand { margin-bottom: 28px; }
.auth-description { font-size: 14px; }
.auth-scope { font-size: 12px; line-height: 1.85; }
.auth-form { gap: 20px; }
.auth-form .button { min-height: 46px; }
.auth-message { margin: 0; }
.auth-retry { font-size: 12px; }
.auth-message.success-note { margin-bottom: 0; }
#toast { font-size: 13px; line-height: 1.7; }
#toast[data-kind="error"] { background: #733d38; border-color: #91534b; }
#toast[data-kind="error"] .icon { color: #f8d8d2; }
#toast[data-kind="info"] .icon { color: #bfd8ec; }

@media (max-width: 1200px) {
  .filter-tabs { gap: 17px; }
  th, td { padding-inline: 16px; }
  .overview p { display: none; }
}
@media (max-width: 960px) {
  .nav-item { font-size: 13px; }
  .search { min-width: 0; }
  .table-toolbar { gap: 12px; }
  .topbar-actions { gap: 12px; }
  .page-heading { align-items: flex-start; }
  .heading-actions .quiet { display: none; }
}
@media (max-width: 720px) {
  .sidebar { gap: 12px; padding: 13px 16px; }
  .nav-item { font-size: 13px; min-height: 42px; padding: 8px 10px; }
  .nav-item.active { box-shadow: none; }
  .sidebar-bottom .nav-item { font-size: 12px; }
  .topbar { padding-inline: 16px; }
  .topbar-actions { gap: 10px; min-width: 0; }
  .storage-status { font-size: 11px; }
  .account-button { font-size: 11px; min-width: 0; max-width: 180px; gap: 6px; }
  .account-button > span { font-size: 10px; }
  main { padding: 23px 16px; }
  h1 { font-size: 25px; }
  .page-heading { gap: 12px; margin-bottom: 20px; }
  .page-heading p { font-size: 13px; max-width: 250px; }
  .heading-actions .primary { font-size: 13px; min-height: 42px; padding: 8px 12px; }
  .overview { padding: 16px 0; margin-bottom: 20px; }
  .overview > div { padding-inline: 10px; }
  .overview > div > div > span { font-size: 12px; }
  .overview strong { font-size: 27px; }
  .overview strong small { font-size: 11px; }
  .list-top { padding-inline: 16px; }
  .list-top h2 { font-size: 16px; }
  .list-top .text-button { font-size: 12px; }
  .filter-tabs { padding-inline: 16px; gap: 20px; scrollbar-width: thin; }
  .filter { font-size: 13px; }
  .filter > span { font-size: 11px; }
  .table-toolbar { padding-inline: 16px; }
  .search { width: 100%; }
  .search input { font-size: 16px; }
  .search input::placeholder { font-size: 12px; }
  .sort-label select { font-size: 12px; max-width: 90px; }
  tbody tr { padding: 18px 16px; gap: 8px 16px; }
  td:nth-child(2) { font-size: 12px; }
  td:nth-child(2) small { font-size: 11px; }
  .record-title { font-size: 15px; }
  td small, .batch-link { font-size: 12px; }
  .mobile-qty-label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 1px; }
  .numeric .qty { font-size: 25px; }
  .numeric small { font-size: 11px; margin-top: 0; }
  .badge { font-size: 12px; }
  .row-action { min-height: 40px; font-size: 13px; }
  .panel-footer { padding: 10px 16px; flex-wrap: wrap; }
  .panel-footer, .panel-footer .text-button, .page-footnote { font-size: 11px; }
  .drawer { width: 100%; }
  .dialog-header h2 { font-size: 21px; }
  .dialog-header p, .dialog-kicker { font-size: 12px; }
  .record-summary span { font-size: 12px; }
  .record-summary strong { font-size: 25px; }
  .record-summary strong small { font-size: 11px; }
  .detail-tabs > button { font-size: 13px; }
  .task-description { font-size: 13px; }
  .task-heading h3 { font-size: 18px; }
  .task-heading .text-button { font-size: 12px; }
  .field input, .field textarea, .field select { font-size: 16px; }
  .dialog-footer { gap: 10px; padding: 14px 19px max(14px, env(safe-area-inset-bottom)); }
  .dialog-footer .button { min-height: 42px; font-size: 13px; }
  .footer-hint { font-size: 11px; max-width: 145px; }
  .round-result { font-size: 11px; }
  .round-item strong, .timeline p, .round-body dl, .details-grid dd { font-size: 13px; }
  .round-item summary small { font-size: 12px; }
  .auth-card { padding: 30px 25px; }
  .auth-brand small { font-size: 10px; }
  #toast { bottom: 18px; width: max-content; }
}
@media (max-width: 380px) {
  .sidebar { padding-inline: 12px; gap: 6px; }
  .sidebar .nav-item { font-size: 12px; padding-inline: 7px; }
  .brand { font-size: 18px; }
  .topbar-actions { gap: 7px; }
  .account-button > span { display: none; }
  .account-button { max-width: 135px; }
  .page-heading p { max-width: 180px; }
  .panel-footer { gap: 0 10px; }
}
