:root {
  color-scheme: dark;
  --bg: #141109;
  --paper: #17150f;
  --panel: #201d16;
  --panel-soft: #262116;
  --raised: #30291d;
  --ink: #f4efe4;
  --ink-2: #d0c9ba;
  --muted: #9a9182;
  --line: #3a3327;
  --line-soft: #2c271d;
  --brand: #f4efe4;
  --brand-ink: #1a1710;
  --brand-2: #e7decd;
  --gold: #e6b25a;
  --gold-strong: #f0c978;
  --gold-tint: rgba(230, 178, 90, .13);
  --gold-line: rgba(230, 178, 90, .55);
  --clay: #b9794a;
  --blue: #75adc8;
  --red: #e57a6b;
  --scheduled: #6aa4ef;
  --active: #5fc78b;
  --delayed: #e0aa45;
  --late: #e96355;
  --chrome-bg: rgba(20, 17, 9, .86);
  --elev-1: 0 1px 2px rgba(0, 0, 0, .38), 0 2px 8px rgba(0, 0, 0, .24);
  --elev-2: 0 12px 34px rgba(0, 0, 0, .36), 0 2px 8px rgba(0, 0, 0, .26);
  --elev-3: 0 32px 80px rgba(0, 0, 0, .5), 0 10px 26px rgba(0, 0, 0, .36);
  --shadow: var(--elev-2);
  --ring: 0 0 0 3px var(--gold-tint), 0 0 0 1px var(--gold);
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --touch: 48px;
  --touch-lg: 64px;
  --fs-display: 32px;
  --fs-h2: 26px;
  --fs-h3: 20px;
  --fs-h4: 16px;
  --fs-body: 14px;
  --fs-meta: 13px;
  --fs-label: 11px;
  --lh-tight: 1.1;
  --lh-body: 1.55;
  --tracking-label: .08em;
  --tracking-display: 0;
  --weight-label: 750;
  --weight-strong: 800;
  --weight-display: 800;
  --font-display: Archivo, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--font-sans);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f1ea;
  --paper: #fffdf8;
  --panel: #ffffff;
  --panel-soft: #f1ede3;
  --raised: #e8e0d2;
  --ink: #1c1811;
  --ink-2: #3f372b;
  --muted: #6e6457;
  --line: #ddd3c4;
  --line-soft: #ece4d8;
  --brand: #17130d;
  --brand-ink: #fffaf1;
  --brand-2: #2e281e;
  --gold: #a9781d;
  --gold-strong: #825a13;
  --gold-tint: rgba(169, 120, 29, .12);
  --gold-line: rgba(169, 120, 29, .42);
  --clay: #7a4b22;
  --blue: #2f5f7f;
  --red: #b3261e;
  --scheduled: #2f68bd;
  --active: #247b4e;
  --delayed: #9a6f16;
  --late: #b3261e;
  --chrome-bg: rgba(244, 241, 234, .86);
  --elev-1: 0 1px 2px rgba(15, 18, 22, .06), 0 2px 6px rgba(15, 18, 22, .05);
  --elev-2: 0 10px 28px rgba(15, 18, 22, .08), 0 2px 6px rgba(15, 18, 22, .05);
  --elev-3: 0 24px 56px rgba(15, 18, 22, .14), 0 6px 16px rgba(15, 18, 22, .08);
  --shadow: var(--elev-2);
  --ring: 0 0 0 3px var(--gold-tint), 0 0 0 1px var(--gold);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(120% 90% at 14% 0%, rgba(52, 44, 29, .86) 0%, rgba(20, 17, 9, 0) 58%),
    linear-gradient(180deg, var(--bg) 0%, #100d07 100%);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-theme="light"] body {
  background:
    radial-gradient(120% 90% at 14% 0%, rgba(220, 204, 173, .5) 0%, rgba(244, 241, 234, 0) 58%),
    linear-gradient(180deg, var(--bg) 0%, #ebe3d4 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: .58;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(1320px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 calc(72px + env(safe-area-inset-bottom, 0px));
}

.app-header,
.header-actions,
.brand,
.workspace-tabs,
.section-row,
.board-tools,
.tool-row,
.form-actions,
.job-card-top,
.brief-card-top,
.job-folder-head,
.folder-actions,
.log-top,
.active-shift,
.employee-row,
.assignment-row,
.metric-grid,
.folder-tabbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  justify-content: space-between;
  min-height: 64px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  background: var(--chrome-bg);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  backdrop-filter: blur(20px) saturate(1.1);
}

.brand {
  min-width: 0;
  text-decoration: none;
}

.brand img,
.login-brand img {
  width: 124px;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 5px;
}

.brand strong,
.brand small,
.login-brand strong,
.login-brand small {
  display: block;
}

.brand strong {
  color: var(--brand);
  font-size: 18px;
  line-height: 1;
  font-family: var(--font-display);
  font-weight: 800;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.header-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.header-clock-button {
  min-width: 116px;
  margin-left: clamp(4px, 1vw, 14px);
}

.header-clock-button.active-clock {
  border-color: var(--gold);
  background: var(--gold-tint);
  color: var(--gold-strong);
  box-shadow: 0 0 0 1px var(--gold-line);
  animation: clockGlow 2.4s ease-in-out infinite;
}

@keyframes clockGlow {
  0%, 100% { box-shadow: 0 0 0 1px var(--gold-line); }
  50% { box-shadow: 0 0 0 1px var(--gold-line), 0 0 16px 1px var(--gold-line); }
}

.button:focus-visible,
.tab-button:focus-visible,
.segment:focus-visible,
.mobile-nav-button:focus-visible,
.theme-toggle-button:focus-visible,
.install-app-button:focus-visible,
.account-button:focus-visible,
.role-switch-button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

@media (prefers-reduced-motion: reduce) {
  .header-clock-button.active-clock {
    animation: none;
  }
}

.theme-toggle-button,
.install-app-button,
.account-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--brand);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: .04em;
  padding: 0 12px;
  text-transform: uppercase;
}

.install-app-button {
  border-color: var(--gold-line);
  background: var(--gold-tint);
  color: var(--gold-strong);
}

.account-button {
  color: var(--ink);
}

.role-switcher {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
}

.role-switch-button {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: .04em;
  padding: 0 10px;
  text-transform: uppercase;
}

.role-switch-button.active {
  background: linear-gradient(180deg, var(--gold-strong), var(--gold));
  color: #1a1710;
}

.session-chip,
.badge,
.job-meta span,
.log-meta span,
.folder-pill,
.hours-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: var(--panel-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1;
  padding: 0 10px;
  text-transform: uppercase;
}

.login-screen {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 28px 0;
}

.login-panel,
.office-panel,
.clock-panel,
.clock-list,
.job-folder,
.schedule-panel,
.status-band {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--elev-2);
}

.login-panel {
  width: min(100%, 920px);
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(320px, 1fr);
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-radius: 20px;
  box-shadow: var(--elev-3);
}

.login-brand {
  display: flex;
  grid-row: 1 / span 4;
  min-height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
  margin: 0;
  padding: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(230, 178, 90, .08), transparent 42%),
    var(--panel);
}

.login-brand::after {
  content: "";
  display: block;
  width: min(100%, 220px);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: .74;
}

.login-brand img {
  width: 158px;
}

.login-brand h1 {
  max-width: 11ch;
}

.login-panel > .segmented {
  margin: 32px 32px 16px;
}

.login-panel > .message {
  margin: 0 32px 14px;
}

#employee-login-panel,
#admin-login-panel,
#password-update-form {
  padding: 0 32px 32px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-display);
  font-weight: var(--weight-display);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--weight-display);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: var(--weight-strong);
}

h4 {
  font-size: var(--fs-h4);
  font-weight: var(--weight-strong);
}

p {
  line-height: var(--lh-body);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 16px;
  padding: 5px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--panel-soft);
}

.segmented.compact {
  margin-top: 4px;
}

.segmented.thirds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segment,
.tab-button,
.folder-tab {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.segment.active,
.tab-button.active,
.folder-tab.active {
  background: linear-gradient(180deg, var(--gold-strong), var(--gold));
  color: #1a1710;
  box-shadow: var(--elev-1);
}

.tab-button.mode-on:not(.active) {
  box-shadow: inset 0 0 0 1.5px var(--gold-line);
  background: var(--gold-tint);
  color: var(--gold-strong);
}

.stacked-form,
.clock-form,
.job-create-form,
.employee-create-form,
.daily-assignment-form,
.folder-form,
.office-controls-form,
.packet-detail-form {
  display: grid;
  gap: 12px;
}

.form-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.employee-auth-panel,
.admin-auth-panel {
  display: none;
}

.employee-auth-panel.active,
.admin-auth-panel.active {
  display: grid;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 13px;
  letter-spacing: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea {
  min-height: 96px;
  padding: 11px 13px;
  resize: vertical;
  line-height: 1.5;
}

.check-row {
  min-height: 42px;
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: var(--ring);
  border-color: var(--gold);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  padding: 0 18px;
  font-size: 13px;
  font-weight: var(--weight-strong);
  letter-spacing: .01em;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, filter .15s ease;
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button.primary {
  background: linear-gradient(180deg, var(--gold-strong), var(--gold));
  color: #1a1710;
  box-shadow: var(--elev-1);
}

.button.primary:hover:not(:disabled) {
  box-shadow: var(--elev-2);
  transform: translateY(-1px);
}

.button.secondary,
.button.ghost {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--brand);
}

.button.secondary:hover:not(:disabled),
.button.ghost:hover:not(:disabled) {
  border-color: var(--gold-line);
  background: var(--raised);
}

.button.ghost {
  background: transparent;
}

.button.danger {
  background: var(--red);
  color: #fff;
}

.button.gold {
  background: linear-gradient(180deg, var(--gold-strong), var(--gold));
  color: #16130b;
  box-shadow: var(--elev-1);
}

.button.gold:hover:not(:disabled) {
  background: var(--gold-strong);
  box-shadow: var(--elev-2);
  transform: translateY(-1px);
}

.button:disabled,
.button[disabled] {
  filter: grayscale(.3);
  box-shadow: none;
  transform: none;
}

.message {
  display: none;
  margin: 12px 0 0;
  padding: 11px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xs);
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.message.visible {
  display: block;
}

.message.error {
  border-color: color-mix(in srgb, var(--red) 30%, transparent);
  background: color-mix(in srgb, var(--red) 8%, transparent);
  color: var(--red);
}

.message.success {
  border-color: var(--gold-line);
  background: var(--gold-tint);
  color: var(--ink);
}

.workspace {
  padding-top: 20px;
}

.workspace-tabs {
  position: sticky;
  top: 71px;
  z-index: 10;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--chrome-bg);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  backdrop-filter: blur(20px) saturate(1.1);
  box-shadow: var(--elev-1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.tab-sep {
  flex: 0 0 auto;
  align-self: center;
  width: 1px;
  height: 20px;
  margin: 0 3px;
  background: var(--line);
}

.mobile-field-nav {
  display: none;
}

.tab-button {
  flex: 0 0 auto;
  padding: 0 16px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

#view-board.active {
  display: grid;
  gap: 14px;
  min-height: calc(100vh - 156px);
}

#view-office,
#view-office-command,
#view-office-pipeline,
#view-office-dispatch,
#view-office-workitems,
#view-office-forecast,
#view-office-intake,
#view-office-payroll,
#view-office-reports,
#view-office-admin,
#view-office-employee,
#view-account,
#view-packet {
  overflow: visible;
  padding-bottom: clamp(80px, 12vh, 144px);
}

#view-office.active,
#view-office-command.active,
#view-office-pipeline.active,
#view-office-dispatch.active,
#view-office-workitems.active,
#view-office-forecast.active,
#view-office-intake.active,
#view-office-payroll.active,
#view-office-reports.active,
#view-office-admin.active,
#view-office-employee.active,
#view-account.active,
#view-packet.active {
  display: grid;
  gap: 14px;
}

.status-band {
  justify-content: space-between;
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(230, 178, 90, .09), transparent 38%),
    var(--panel);
}

.status-band p:not(.eyebrow) {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.preview-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(184, 138, 42, .42);
  border-radius: 8px;
  background: rgba(184, 138, 42, .08);
  color: var(--ink);
  font-size: 13px;
}

.status-metrics,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric,
.company-strip article,
.job-card,
.brief-card,
.folder-panel,
.log-item,
.schedule-job,
.assignment-row,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--elev-1);
}

.job-card,
.brief-card {
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.job-card:hover,
.job-card:focus-within,
.brief-card:hover,
.brief-card:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--elev-2);
  border-color: var(--gold-line);
}

.metric {
  min-height: 92px;
  padding: 14px;
  background: var(--panel-soft);
}

.metric-button {
  width: 100%;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.metric-button:hover,
.metric-button:focus-visible {
  border-color: var(--gold-line);
  box-shadow: var(--ring);
  outline: none;
}

.metric span,
.company-strip span,
.folder-stat span,
.hours-card span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 12px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.status-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#view-board[data-board-role="field"] .status-metrics {
  display: none;
}

.daily-brief-shell {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.daily-brief-head {
  justify-content: space-between;
  align-items: end;
  margin-bottom: 12px;
}

.compact-date {
  width: min(100%, 180px);
}

.date-widget {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.date-widget-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.date-widget-row input {
  flex: 1 1 150px;
  min-width: 150px;
}

.manual-timecard-form .date-widget {
  width: min(100%, 380px);
}

.date-step-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  padding: 0 9px;
  text-transform: uppercase;
}

.date-step-button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.daily-brief-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.brief-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.brief-card-top,
.assignment-row {
  justify-content: space-between;
  align-items: flex-start;
}

.brief-card p,
.assignment-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.brief-notes {
  padding: 10px;
  border-left: 3px solid var(--gold);
  background: var(--panel-soft);
}

.field-capture-strip {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--elev-2);
}

.field-capture-strip h2,
.field-capture-strip p {
  margin: 0;
}

.field-capture-strip h2 {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.16;
}

.field-capture-strip p:not(.eyebrow) {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.capture-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.capture-action {
  min-height: 58px;
  width: 100%;
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  transition: border-color .14s ease, background .14s ease, transform .12s ease;
}

.capture-action:hover,
.capture-action:focus-visible {
  border-color: var(--gold-line);
  background: var(--raised);
}

.capture-action:active {
  transform: translateY(1px);
}

.capture-action strong,
.capture-action span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.capture-action strong {
  font-size: 14px;
  line-height: 1.15;
}

.capture-action span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.company-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.company-strip article {
  padding: 14px;
}

.company-strip strong {
  display: block;
  margin-top: 7px;
  line-height: 1.35;
}

.board-tools {
  justify-content: space-between;
  margin: 24px 0 12px;
}

.tool-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-field {
  width: min(100%, 320px);
}

.pipeline-board {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.pipeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pipeline-head h3 {
  font-size: 18px;
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-gutter: stable;
}

.pipeline-stage,
.pipeline-filter {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.pipeline-filter {
  min-height: 36px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.pipeline-stage {
  min-height: 158px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px;
}

.pipeline-stage.active,
.pipeline-filter.active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.pipeline-stage.has-stuck {
  border-color: rgba(184, 138, 42, .55);
}

.pipeline-stage span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.pipeline-stage strong {
  font-size: 30px;
  line-height: 1;
}

.pipeline-stage small,
.pipeline-stage b {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.pipeline-stage em {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  padding: 0 8px;
  text-transform: uppercase;
}

.pipeline-stage.has-stuck em,
.stuck-pill {
  border-color: rgba(184, 138, 42, .55);
  color: var(--gold);
}

.pipeline-stage b {
  display: block;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.pipeline-detail {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.pipeline-detail-list {
  display: grid;
  gap: 12px;
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  min-height: min(680px, calc(100vh - 300px));
}

#view-board[data-board-role="office"] {
  gap: 12px;
}

#view-board[data-board-role="office"] .status-band {
  grid-template-columns: 1fr;
  padding: 4px 2px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#view-board[data-board-role="office"] .status-metrics {
  display: none;
}

#view-board[data-board-role="office"] .job-grid {
  grid-template-columns: 1fr;
  gap: 10px;
  min-height: max(520px, calc(100vh - 286px));
}

#view-office-pipeline .pipeline-board,
#view-office-intake .office-packet-panel,
#view-packet .job-folder,
#view-packet .packet-empty {
  min-height: min(720px, calc(100vh - 300px));
}

.job-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(230, 178, 90, .045), transparent 48%),
    var(--paper);
}

.office-job-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .85fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(230, 178, 90, .04), transparent 34%),
    var(--paper);
  box-shadow: var(--elev-1);
  transition: box-shadow .15s ease, border-color .15s ease;
}

.office-job-row:hover {
  box-shadow: var(--elev-2);
  border-color: var(--gold-line);
}

.office-job-row.needs-review {
  border-color: var(--gold-line);
  background: color-mix(in srgb, var(--gold-tint) 60%, var(--paper));
  box-shadow: inset 3px 0 0 var(--gold), var(--elev-1);
}

.office-job-main {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.office-job-thumb {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-soft);
}

.office-job-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.office-job-thumb.empty span {
  color: var(--muted);
  font-size: 28px;
  font-weight: 950;
}

.office-job-main h3,
.office-job-main p {
  overflow-wrap: anywhere;
}

.office-job-main h3 {
  margin: 0;
  font-size: 19px;
}

.office-job-main p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.office-job-truth {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.office-job-truth span {
  min-height: 34px;
  display: grid;
  align-content: center;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.office-job-truth b {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.office-job-truth .span-2 {
  grid-column: 1 / -1;
}

.office-job-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.job-card-cover {
  margin: -14px -14px 0;
  aspect-ratio: 16 / 9;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.job-card-cover img,
.folder-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.job-card-top {
  align-items: flex-start;
  justify-content: space-between;
}

.job-card h3,
.job-card p {
  overflow-wrap: anywhere;
}

.job-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.job-meta,
.log-meta,
.folder-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge.urgent,
.job-card.priority-urgent,
.log-item.priority-urgent {
  border-color: var(--gold-line);
}

.badge.emergency,
.job-card.priority-emergency,
.log-item.priority-emergency {
  border-color: color-mix(in srgb, var(--late) 45%, transparent);
  background: color-mix(in srgb, var(--late) 6%, transparent);
}

.job-card.priority-urgent {
  border-left: 4px solid var(--delayed);
}

.job-card.priority-emergency {
  border-left: 4px solid var(--late);
}

.job-card-actions,
.folder-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.packet-clock-card {
  display: grid;
  gap: 10px;
  min-width: min(100%, 360px);
  padding: 10px;
  border: 1px solid var(--gold-line);
  border-radius: 8px;
  background: var(--gold-tint);
}

.packet-clock-card span,
.packet-clock-card small {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.packet-clock-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}

.packet-clock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-folder {
  margin-top: 18px;
  padding: 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.job-folder-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.folder-cover {
  flex: 0 0 min(32%, 260px);
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-soft);
}

.job-folder-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.folder-tabbar {
  flex-wrap: wrap;
  max-width: 100%;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.folder-tab {
  padding: 0 14px;
}

.folder-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.packet-grid,
.schedule-job-list {
  display: grid;
  gap: 14px;
}

.packet-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.folder-panel {
  padding: 14px;
}

.folder-panel p {
  color: var(--muted);
}

.folder-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.folder-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.folder-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.forecast-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.forecast-signal {
  border-left: 4px solid var(--active);
}

.forecast-signal.forecast-watch {
  border-left-color: var(--delayed);
}

.forecast-signal.forecast-danger {
  border-left-color: var(--late);
}

.forecast-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.forecast-detail-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.forecast-detail-row {
  display: grid;
  grid-template-columns: minmax(110px, .6fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.forecast-detail-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.forecast-table-wrap {
  max-height: none;
}

.forecast-table {
  min-width: 680px;
}

.forecast-revision-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.forecast-revision-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.forecast-revision-row span {
  color: var(--muted);
  font-size: 12px;
}

.folder-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.folder-form .span-2,
.office-controls-form .span-2,
.job-create-form .span-2 {
  grid-column: 1 / -1;
}

.folder-form [type="file"] {
  padding: 9px 10px;
}

.camera-picker {
  display: grid;
  gap: 7px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.camera-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.receipt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.log-list,
.employee-list,
#clock-history {
  display: grid;
  gap: 10px;
}

.employee-record-button {
  width: 100%;
  justify-content: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
}

.employee-record-button:hover,
.employee-record-button:focus-visible {
  border-color: var(--brand);
  outline: none;
}

.employee-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.employee-avatar.large {
  width: 82px;
  height: 82px;
  flex-basis: 82px;
  font-size: 24px;
}

.employee-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.employee-row-main {
  min-width: 0;
  display: grid;
  gap: 3px;
  flex: 1 1 auto;
}

.employee-row-main span,
.employee-row-meta small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.employee-row-main strong {
  overflow-wrap: anywhere;
}

.employee-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.employee-profile-shell {
  display: grid;
  gap: 14px;
}

.employee-profile-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.employee-profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.employee-profile-identity h2,
.employee-profile-identity p {
  overflow-wrap: anywhere;
}

.employee-profile-identity p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
}

.employee-profile-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.employee-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.employee-fact-list,
.employee-history-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.employee-fact-list div,
.employee-history-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.employee-fact-list span,
.employee-history-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.employee-fact-list strong,
.employee-history-row strong {
  overflow-wrap: anywhere;
}

.employee-history-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.employee-history-row b {
  font-size: 13px;
}

.job-history-row .button {
  justify-self: end;
}

.log-item {
  padding: 12px;
}

.log-top {
  justify-content: space-between;
  align-items: flex-start;
}

.log-item p {
  margin: 8px 0 0;
  color: var(--ink);
}

.file-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.receipt-split-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.receipt-split-grid {
  display: grid;
  gap: 8px;
}

.receipt-split-row {
  display: grid;
  grid-template-columns: minmax(88px, .8fr) minmax(120px, 1.2fr) minmax(92px, .8fr);
  gap: 8px;
  align-items: center;
}

.receipt-split-row.no-job-pick {
  grid-template-columns: minmax(88px, 1fr) minmax(92px, .8fr);
}

.receipt-split-row span {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
}

.receipt-allocation-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.receipt-allocation-summary span {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
}

.file-chip {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.file-thumb {
  display: block;
  width: 60px;
  height: 48px;
  border-radius: 6px;
  background: var(--panel-soft);
  overflow: hidden;
}

.file-chip img {
  width: 60px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--panel-soft);
}

.file-note {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.document-chip {
  grid-template-columns: 48px minmax(0, 1fr);
}

.document-chip a {
  display: inline-flex;
  margin-top: 5px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.file-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 900;
}

.file-chip strong,
.file-chip span {
  overflow-wrap: anywhere;
}

.file-chip span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.clock-layout,
.office-grid {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  gap: 14px;
}

.office-command-grid,
.office-secondary-grid,
.ops-grid {
  display: grid;
  gap: 14px;
  align-items: start;
}

.office-command-grid {
  grid-template-columns: minmax(380px, 1fr) minmax(0, 1.15fr);
}

.office-command-grid > *,
.office-secondary-grid > *,
.office-panel {
  min-width: 0;
}

.office-secondary-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
}

.ops-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clock-panel,
.clock-list,
.office-panel,
.schedule-panel,
.ops-panel {
  padding: 18px;
}

.timecard-panel {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.timecard-summary,
.office-timecard-list {
  display: grid;
  gap: 10px;
}

.timecard-summary {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 12px 0;
}

.account-panel {
  max-width: 960px;
}

.account-summary-grid,
.account-form-grid {
  display: grid;
  gap: 12px;
}

.account-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 14px 0;
}

.account-summary-grid article,
.account-form {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xs);
  background: var(--panel-soft);
  padding: 14px;
}

.account-summary-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.account-summary-grid strong {
  overflow-wrap: anywhere;
}

.account-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.toggle-row {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--paper);
  padding: 8px 10px;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.toggle-row span {
  color: var(--ink);
  font-weight: 800;
}

.timecard-summary article,
.office-timecard-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 12px;
}

.timecard-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.timecard-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.office-timecards-panel {
  margin: 14px 0;
}

.manual-timecard-form {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.manual-timecard-form.is-collapsed {
  background: var(--paper);
}

.manual-timecard-form.is-open {
  background: var(--panel-soft);
}

.manual-timecard-editor[hidden] {
  display: none;
}

.manual-timecard-editor {
  display: grid;
  gap: 12px;
}

.manual-timecard-form h3 {
  margin: 0;
  font-size: 18px;
}

.manual-timecard-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.manual-timecard-summary article {
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--paper);
}

.manual-timecard-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.manual-timecard-summary strong {
  display: block;
  margin-top: 8px;
  color: var(--brand);
  font-size: 18px;
}

.payroll-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin: 14px 0 10px;
}

.payroll-summary-row article {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.payroll-summary-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.payroll-summary-row strong {
  display: block;
  margin-top: 10px;
  color: var(--brand);
  font-size: 20px;
}

.payroll-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.payroll-flow span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.office-timecard-card {
  display: grid;
  gap: 12px;
}

.office-timecard-card.is-collapsed {
  padding: 0;
  overflow: hidden;
}

.timecard-list-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 14px;
  border-radius: 8px;
  text-align: left;
}

.timecard-list-row:hover,
.timecard-list-row:focus-visible {
  outline: none;
  background: var(--panel-soft);
}

.timecard-list-row h3 {
  margin: 0;
}

.timecard-list-row p {
  margin: 4px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.timecard-list-row > strong {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold-line);
  border-radius: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
  padding: 0 12px;
  text-transform: uppercase;
}

.timecard-expanded-profile {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.payroll-card-meta,
.payroll-exception-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.payroll-card-meta span,
.payroll-exception,
.payroll-clear {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.payroll-state.ready,
.payroll-clear {
  border-color: rgba(42, 125, 84, .28);
  background: rgba(42, 125, 84, .10);
  color: #2a7d54;
}

.payroll-state.watch {
  border-color: rgba(184, 138, 42, .32);
  background: rgba(184, 138, 42, .12);
  color: #8a641d;
}

.payroll-state.danger,
.payroll-exception {
  border-color: rgba(161, 56, 56, .28);
  background: rgba(161, 56, 56, .10);
  color: #a13838;
}

.payroll-state.muted {
  color: var(--muted);
}

.payroll-note {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.payroll-note textarea {
  min-height: 58px;
  resize: vertical;
  text-transform: none;
  font-weight: 650;
}

.timecard-table {
  min-width: 1120px;
}

.timecard-edit-input,
.timecard-job-select,
.timecard-time-input,
.timecard-time-select {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
}

.timecard-job-control {
  display: grid;
  gap: 6px;
  min-width: 190px;
}

.timecard-job-select {
  width: 100%;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 750;
}

.timecard-job-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.timecard-time-control {
  display: grid;
  gap: 6px;
  min-width: 132px;
}

.timecard-time-select {
  width: 100%;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 750;
}

.timecard-time-input {
  width: 100%;
  min-width: 112px;
  color-scheme: dark;
}

html[data-theme="light"] .timecard-job-select,
html[data-theme="light"] .timecard-time-input,
html[data-theme="light"] .timecard-time-select {
  color-scheme: light;
}

.timecard-table td .timecard-edit-input {
  min-width: 170px;
}

.ops-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.ops-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ops-form .span-2 {
  grid-column: 1 / -1;
}

.ops-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.ops-summary-row article {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.ops-summary-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.ops-summary-row strong {
  display: block;
  margin-top: 10px;
  color: var(--brand);
  font-size: 20px;
}

.ops-action-row,
.ops-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ops-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ops-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.ops-record h3,
.ops-record p {
  margin: 0;
  overflow-wrap: anywhere;
}

.ops-record p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
}

.daily-report-jobs {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.daily-report-jobs div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.daily-report-jobs span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ops-record.status-approved,
.ops-record.status-queued {
  border-color: rgba(184, 138, 42, .42);
}

.ops-record.status-rejected,
.ops-record.status-damaged {
  border-color: rgba(161, 56, 56, .34);
}

.schedule-panel {
  display: grid;
  gap: 16px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-legend span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  padding: 0 10px;
  text-transform: uppercase;
}

.schedule-legend span::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--scheduled);
}

.schedule-legend .legend-active::before {
  background: var(--active);
}

.schedule-legend .legend-delayed::before {
  background: var(--delayed);
}

.schedule-legend .legend-late::before {
  background: var(--late);
}

.schedule-month {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  overflow-x: auto;
}

.schedule-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-month-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.schedule-weekdays,
.schedule-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  min-width: 760px;
}

.schedule-weekdays span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.schedule-day {
  display: grid;
  gap: 4px;
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.schedule-day.empty {
  min-height: 124px;
  border-style: dashed;
  opacity: .32;
}

.schedule-day span,
.schedule-day small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.schedule-day strong {
  font-size: 26px;
  line-height: 1;
}

.schedule-day-jobs-mini {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}

.schedule-day-jobs-mini em {
  display: block;
  min-width: 0;
  border-left: 3px solid var(--scheduled);
  color: var(--ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
  overflow: hidden;
  padding-left: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-day-jobs-mini .mini-active {
  border-left-color: var(--active);
}

.schedule-day-jobs-mini .mini-delayed {
  border-left-color: var(--delayed);
}

.schedule-day-jobs-mini .mini-late {
  border-left-color: var(--late);
}

.schedule-day.active {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
}

.schedule-day.active span,
.schedule-day.active small {
  color: rgba(5, 5, 5, .72);
}

.schedule-day.active.schedule-scheduled {
  box-shadow: inset 0 -5px 0 var(--scheduled);
}

.schedule-day.active.schedule-active {
  box-shadow: inset 0 -5px 0 var(--active);
}

.schedule-day.active.schedule-delayed {
  box-shadow: inset 0 -5px 0 var(--delayed);
}

.schedule-day.active.schedule-late {
  box-shadow: inset 0 -5px 0 var(--late);
}

.schedule-day.schedule-scheduled:not(.active),
.schedule-job.schedule-scheduled {
  border-color: color-mix(in srgb, var(--scheduled) 68%, var(--line));
  box-shadow: inset 0 4px 0 var(--scheduled);
}

.schedule-day.schedule-active:not(.active),
.schedule-job.schedule-active {
  border-color: color-mix(in srgb, var(--active) 68%, var(--line));
  box-shadow: inset 0 4px 0 var(--active);
}

.schedule-day.schedule-delayed:not(.active),
.schedule-job.schedule-delayed {
  border-color: color-mix(in srgb, var(--delayed) 72%, var(--line));
  box-shadow: inset 0 4px 0 var(--delayed);
}

.schedule-day.schedule-late:not(.active),
.schedule-job.schedule-late {
  border-color: color-mix(in srgb, var(--late) 76%, var(--line));
  box-shadow: inset 0 4px 0 var(--late);
}

.schedule-day.schedule-scheduled:not(.active) small {
  color: var(--scheduled);
}

.schedule-day.schedule-active:not(.active) small {
  color: var(--active);
}

.schedule-day.schedule-delayed:not(.active) small {
  color: var(--delayed);
}

.schedule-day.schedule-late:not(.active) small {
  color: var(--late);
}

.schedule-day.has-alert:not(.active) {
  border-color: rgba(184, 138, 42, .56);
  box-shadow: inset 0 0 0 2px rgba(184, 138, 42, .14), inset 0 4px 0 var(--delayed);
}

.schedule-day-jobs {
  display: grid;
  gap: 12px;
}

.schedule-job {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
}

.schedule-job-cover {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  overflow: hidden;
  text-transform: uppercase;
}

.schedule-job-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.schedule-job .job-meta,
.schedule-job .job-card-actions {
  grid-column: 2;
}

.schedule-job p {
  margin: 6px 0 0;
  color: var(--muted);
}

.employee-preview-controls {
  display: grid;
  grid-template-columns: minmax(220px, 360px) repeat(2, auto);
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.dispatch-header {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(300px, 1fr) minmax(260px, .8fr);
  gap: 14px;
  align-items: end;
}

.office-command-strip {
  display: grid;
  grid-template-columns: minmax(190px, .72fr) minmax(0, 1.65fr) minmax(240px, .8fr);
  gap: 14px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(230, 178, 90, .1), transparent 44%),
    var(--panel);
  box-shadow: var(--elev-2);
}

.command-hero {
  align-items: center;
}

.office-command-header {
  display: grid;
  gap: 10px;
  align-items: start;
}

.office-command-header p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.office-command-header .compact-date {
  width: 100%;
  max-width: 220px;
}

.office-command-strip .office-summary-row,
.office-command-strip .employee-preview-controls {
  margin-top: 0;
}

.office-command-strip .employee-preview-controls {
  grid-template-columns: 1fr;
}

.office-jumpbar {
  position: sticky;
  top: 129px;
  z-index: 9;
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--chrome-bg);
  backdrop-filter: blur(18px);
  overflow-x: auto;
}

.office-jumpbar a {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.office-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.office-summary-row article {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.office-summary-row span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.office-summary-row strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.command-attention-grid,
.admin-settings-grid,
.office-job-controls,
.work-items-list {
  display: grid;
  gap: 12px;
}

.command-attention-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.command-card {
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(230, 178, 90, .06), transparent 55%),
    var(--paper);
  box-shadow: var(--elev-1);
}

.command-card.tone-urgent {
  border-color: rgba(184, 138, 42, .5);
}

.command-card.tone-danger {
  border-color: rgba(161, 56, 56, .38);
  background: rgba(161, 56, 56, .05);
}

.command-card span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.command-card strong {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.command-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.command-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.office-packet-panel {
  margin-top: 18px;
}

.office-job-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.office-job-controls > .span-2 {
  grid-column: 1 / -1;
}

.admin-settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.role-policy-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.role-policy-list div {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.role-policy-list strong {
  color: var(--ink);
}

.role-policy-list span {
  color: var(--muted);
  font-size: 12px;
}

.active-workload-admin-board {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.workload-panel,
.job-overview-panel {
  min-width: 0;
}

.workload-panel .active-workload-admin-board {
  max-height: min(68vh, 760px);
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.workload-site-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.workload-site-head {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: flex-start;
}

.workload-cover {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
  text-transform: uppercase;
}

.workload-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.workload-site-head p {
  margin: 7px 0 0;
  color: var(--muted);
}

.crew-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.crew-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  padding: 0 10px;
}

.crew-pill.empty {
  color: var(--muted);
}

.workload-add-form,
.workload-schedule-form,
.packet-file-form {
  display: grid;
  gap: 10px;
  align-items: end;
}

.workload-add-form {
  grid-template-columns: minmax(180px, 1fr) minmax(120px, .55fr) minmax(130px, .65fr) minmax(180px, 1fr) auto;
}

.workload-schedule-form {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.packet-file-form {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(240px, 1.3fr) auto;
}

.packet-detail-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workload-add-form .span-2,
.workload-schedule-form .span-2,
.packet-file-form .span-2,
.packet-detail-form .span-2 {
  grid-column: span 2;
}

.workload-card-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.workload-card-section.assign-section {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  background: var(--panel-soft);
}

.workload-card-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.assignment-list.compact {
  gap: 7px;
}

.workload-assignment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.workload-assignment-row strong,
.workload-assignment-row span {
  display: block;
}

.workload-assignment-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.assignment-helper {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.workload-assignment-row small {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.workload-assignment-row .assignment-live {
  border-color: var(--gold-line);
  background: var(--gold-tint);
  color: var(--gold-strong);
}

.active-shift {
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.active-shift strong,
.active-shift span {
  display: block;
}

.active-shift span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.office-grid {
  align-items: start;
  margin-bottom: 14px;
}

.job-create-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.daily-admin-panel {
  margin-bottom: 0;
}

.daily-assignment-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.daily-assignment-form .span-2 {
  grid-column: 1 / -1;
}

.daily-assignment-admin-list {
  margin-top: 14px;
}

.assignment-list {
  display: grid;
  gap: 10px;
}

.assignment-row {
  gap: 14px;
  padding: 12px;
}

.assignment-row strong,
.assignment-row span {
  display: block;
  overflow-wrap: anywhere;
}

.assignment-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.assignment-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.employee-create-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
}

.employee-list {
  margin-top: 12px;
}

.employee-row {
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.employee-row span {
  color: var(--muted);
  font-size: 12px;
}

.employee-row .employee-avatar {
  color: var(--muted);
  font-size: 13px;
}

.employee-row .employee-avatar.large {
  font-size: 24px;
}

.hours-table-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  contain: layout paint;
  margin-top: 14px;
  max-height: min(62vh, 680px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  scrollbar-gutter: stable;
}

.hours-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--panel);
}

.hours-table th,
.hours-table td {
  padding: 11px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.hours-table td {
  font-variant-numeric: tabular-nums;
}

.hours-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 11px;
  font-weight: var(--weight-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.hours-table tbody tr:hover td {
  background: var(--raised);
}

.hours-table tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  padding: 16px;
  color: var(--muted);
}

.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-items: stretch;
  justify-items: stretch;
  background: #020302;
}

.camera-sheet {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 0;
  border-radius: 0;
  background: #050706;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.camera-modal.has-photo .camera-sheet {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.camera-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .64);
  color: #fff;
}

.camera-head h3 {
  color: #fff;
  font-size: clamp(18px, 3vw, 28px);
}

.camera-head .eyebrow {
  color: rgba(255, 255, 255, .7);
}

.camera-head .button {
  color: #fff;
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
}

.camera-view {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  background: #050706;
}

.camera-sheet video,
.camera-sheet [data-camera-still] {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  background: #050706;
}

.camera-view span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(0, 0, 0, .54);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 6px 9px;
  text-transform: uppercase;
}

.camera-note-field {
  display: grid;
  gap: 8px;
  padding: 12px 14px 0;
  background: var(--raised);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.camera-modal.is-live .camera-note-field {
  display: none;
}

.camera-note-field textarea {
  min-height: 86px;
  resize: vertical;
  text-transform: none;
}

.camera-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .72);
}

@media (max-width: 720px) {
  .camera-actions {
    flex-direction: column;
  }

  .camera-head {
    flex-direction: column;
  }

  .camera-actions .button {
    width: 100%;
    min-height: var(--touch-lg);
  }
}

@media (max-width: 980px) {
  .status-band,
  .clock-layout,
  .office-grid,
  .office-command-grid,
  .office-secondary-grid,
  .dispatch-header,
  .employee-profile-grid,
  .employee-profile-head,
  .folder-grid,
  .packet-grid,
  .forecast-grid,
  .schedule-job,
  .workload-add-form,
  .workload-schedule-form,
  .packet-file-form,
  .office-job-controls {
    grid-template-columns: 1fr;
  }

  .job-grid,
  .company-strip,
  .daily-brief-board,
  .command-attention-grid,
  .admin-settings-grid,
  .office-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-job .job-meta,
  .schedule-job .job-card-actions {
    grid-column: 1;
  }

  .workload-site-head {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .workload-site-head .button {
    grid-column: 1 / -1;
  }

  .workload-panel .active-workload-admin-board,
  .hours-table-wrap {
    max-height: none;
  }

  .office-command-strip {
    grid-template-columns: 1fr;
  }

  .field-capture-strip {
    grid-template-columns: 1fr;
  }

  .capture-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .office-command-strip .employee-preview-controls {
    grid-template-columns: minmax(220px, 360px) auto;
  }

  .payroll-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .office-job-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .office-job-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 18px, 1240px);
    padding: 8px 0 calc(30px + env(safe-area-inset-bottom, 0px));
  }

  .login-screen {
    min-height: auto;
    padding: 14px 0 28px;
  }

  .login-panel {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }

  .login-brand {
    grid-row: auto;
    min-height: 0;
    padding: 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .login-brand::after {
    width: 164px;
  }

  .login-brand img {
    width: 132px;
  }

  .login-brand h1 {
    max-width: 100%;
  }

  .login-panel > .segmented {
    margin: 18px 18px 14px;
    border-radius: 14px;
  }

  .login-panel > .message {
    margin: 0 18px 14px;
  }

  #employee-login-panel,
  #admin-login-panel,
  #password-update-form {
    padding: 0 18px 22px;
  }

  .app-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .workspace-tabs {
    position: static;
    overflow-x: auto;
  }

  .workspace.field-mode {
    padding-top: 8px;
  }

  .workspace.field-mode .workspace-tabs {
    display: flex;
  }

  .workspace.field-mode .mobile-field-nav:not(.hidden) {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    position: sticky;
    bottom: 0;
    z-index: 30;
    gap: 4px;
    margin: 10px -9px 0;
    padding: 8px 9px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--chrome-bg);
    -webkit-backdrop-filter: blur(20px) saturate(1.1);
    backdrop-filter: blur(20px) saturate(1.1);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .3);
  }

  .mobile-nav-button {
    min-height: 56px;
    display: grid;
    gap: 2px;
    align-content: center;
    justify-items: center;
    padding: 8px 6px;
    border-radius: 8px;
  }

  .mobile-nav-button span,
  .mobile-nav-button small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav-button span {
    font-size: 13px;
    font-weight: 900;
  }

  .mobile-nav-button small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .office-jumpbar {
    position: static;
  }

  #view-board.active {
    min-height: auto;
  }

  .job-grid,
  #view-office-pipeline .pipeline-board,
  #view-office-intake .office-packet-panel,
  #view-packet .job-folder,
  #view-packet .packet-empty {
    min-height: 0;
  }

  .brand img {
    width: 116px;
  }

  h2 {
    font-size: 26px;
  }

  .status-metrics,
  .job-grid,
  .company-strip,
  .daily-brief-board,
  .capture-action-grid,
  .command-attention-grid,
  .admin-settings-grid,
  .office-summary-row,
  .payroll-summary-row,
  .payroll-flow,
  .ops-grid,
  .ops-summary-row,
  .folder-stat-grid,
  .folder-form,
  .ops-form,
  .job-create-form,
  .daily-assignment-form,
  .receipt-grid,
  .account-form-grid,
  .employee-create-form {
    grid-template-columns: 1fr;
  }

  .employee-preview-controls,
  .employee-profile-head,
  .employee-history-row,
  .office-command-header,
  .workload-site-head,
  .workload-assignment-row,
  .forecast-detail-row,
  .timecard-list-row,
  .ops-record {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .timecard-list-row > strong {
    width: 100%;
  }

  .workload-add-form .span-2,
  .workload-schedule-form .span-2,
  .packet-file-form .span-2,
  .packet-detail-form .span-2 {
    grid-column: 1;
  }

  .packet-detail-form {
    grid-template-columns: 1fr;
  }

  .job-folder-head,
  .board-tools,
  .daily-brief-head,
  .forecast-panel-head,
  .forecast-revision-row,
  .employee-profile-identity,
  .employee-profile-actions,
  .assignment-row {
    align-items: stretch;
    flex-direction: column;
  }

  .office-job-main,
  .office-job-truth,
  .office-job-actions {
    grid-template-columns: 1fr;
  }

  .office-job-thumb {
    max-width: 260px;
  }

  .folder-cover {
    flex-basis: auto;
    width: 100%;
  }

  .tool-row,
  .folder-actions,
  .form-actions,
  .assignment-actions {
    justify-content: flex-start;
  }

  .search-field {
    width: 100%;
  }
}

@media print {
  .app-header,
  .workspace-tabs,
  .login-screen,
  .button,
  .folder-form,
  .office-controls-form,
  .job-create-form,
  .employee-create-form {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .job-folder,
  .office-panel,
  .clock-panel,
  .clock-list {
    box-shadow: none;
  }
}

/* Field-first phone ergonomics */
@media (max-width: 720px) {
  .workspace.field-mode p,
  .workspace.field-mode .job-card p,
  .workspace.field-mode .brief-card p {
    font-size: 16px;
  }

  .workspace.field-mode .job-card h3,
  .workspace.field-mode .brief-card h3 {
    font-size: 18px;
    font-weight: 900;
  }

  .workspace.field-mode label,
  .workspace.field-mode .eyebrow,
  .workspace.field-mode .metric span,
  .workspace.field-mode .job-meta span {
    font-size: 13px;
  }

  .workspace.field-mode .metric strong {
    font-size: 34px;
  }

  .workspace.field-mode .button,
  .workspace.field-mode .segment,
  .workspace.field-mode .tab-button {
    min-height: var(--touch);
  }

  .workspace.field-mode input,
  .workspace.field-mode select,
  .workspace.field-mode textarea {
    min-height: 52px;
    font-size: 16px;
  }

  .workspace.field-mode .check-row input {
    width: 28px;
    min-height: 28px;
  }

  .workspace.field-mode .job-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace.field-mode .job-card-actions .button {
    min-height: var(--touch);
    width: 100%;
  }

  .workspace.field-mode .capture-action {
    min-height: var(--touch);
  }

  .workspace.field-mode #clock-in-button,
  .workspace.field-mode #clock-out-button {
    min-height: var(--touch-lg);
    width: 100%;
    font-size: 16px;
  }

  .workspace.field-mode .clock-form .form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .workspace.field-mode #clock-out-button {
    margin-top: 6px;
  }

  .workspace.field-mode .segment.active,
  .workspace.field-mode .tab-button.active {
    box-shadow: var(--elev-1), inset 0 -3px 0 var(--gold);
  }

  .workspace.field-mode .mobile-nav-button {
    min-height: var(--touch-lg);
    position: relative;
    color: var(--muted);
  }

  .workspace.field-mode .mobile-nav-button.active {
    background: var(--gold-tint);
    color: var(--gold-strong);
    box-shadow: none;
  }

  .workspace.field-mode .mobile-nav-button.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18%;
    right: 18%;
    height: 3px;
    border-radius: 0 0 var(--radius-pill) var(--radius-pill);
    background: var(--gold);
  }
}

/* 20260702 fieldpack-v2: accounting handoff note, GPS map links */
.panel-note {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-soft, #8a8577);
  max-width: 62ch;
}

.gps-links a {
  color: var(--gold, #b08d2f);
  text-decoration: underline;
  font-size: 0.8rem;
}
/* Public demo shell */
body.field-os-demo {
  color-scheme: light;
  --clear-blue: #17519a;
  --clear-blue-soft: #edf5ff;
  --clear-purple: #6546b8;
  --clear-purple-soft: #f3efff;
  --clear-green: #087b5c;
  --clear-green-soft: #edf8f3;
  --bg: #f7f5f1;
  --paper: #ffffff;
  --panel: #ffffff;
  --panel-soft: #edf5ff;
  --raised: #f3efff;
  --ink: #0c121a;
  --ink-2: #27394a;
  --muted: #425466;
  --line: #d7e1ec;
  --line-soft: #e7edf4;
  --brand: #0c121a;
  --brand-ink: #ffffff;
  --brand-2: #27394a;
  --gold: var(--clear-blue);
  --gold-strong: #123f78;
  --gold-tint: rgba(23, 81, 154, .1);
  --gold-line: rgba(23, 81, 154, .34);
  --clay: var(--clear-purple);
  --blue: var(--clear-blue);
  --scheduled: var(--clear-purple);
  --active: var(--clear-green);
  --chrome-bg: rgba(255, 255, 255, .92);
  --accent: var(--clear-blue);
  --text: var(--ink);
  --text-soft: var(--muted);
  --elev-1: 0 1px 2px rgba(20, 35, 55, .05), 0 6px 18px rgba(20, 35, 55, .05);
  --elev-2: 0 14px 36px rgba(20, 35, 55, .09), 0 2px 8px rgba(20, 35, 55, .05);
  --elev-3: 0 26px 64px rgba(20, 35, 55, .15), 0 8px 20px rgba(20, 35, 55, .08);
  --shadow: var(--elev-2);
  --ring: 0 0 0 3px rgba(23, 81, 154, .14), 0 0 0 1px var(--clear-blue);
  background:
    radial-gradient(circle at 4% 0%, rgba(23, 81, 154, .11), transparent 28rem),
    radial-gradient(circle at 94% 8%, rgba(101, 70, 184, .09), transparent 30rem),
    radial-gradient(circle at 72% 100%, rgba(8, 123, 92, .08), transparent 34rem),
    var(--bg);
}

html[data-theme="light"] body.field-os-demo {
  background:
    radial-gradient(circle at 4% 0%, rgba(23, 81, 154, .11), transparent 28rem),
    radial-gradient(circle at 94% 8%, rgba(101, 70, 184, .09), transparent 30rem),
    radial-gradient(circle at 72% 100%, rgba(8, 123, 92, .08), transparent 34rem),
    var(--bg);
}

.field-os-demo .login-screen {
  display: none;
}

.field-os-demo .app-header {
  border-bottom-color: var(--line);
}

.field-os-demo .app-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clear-blue), var(--clear-purple), var(--clear-green));
}

.field-os-demo .theme-toggle-button {
  display: none;
}

.field-os-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(23, 81, 154, .3);
  border-radius: 10px;
  color: var(--clear-blue, #17519a);
  background: linear-gradient(145deg, var(--clear-blue-soft, #edf5ff), var(--clear-purple-soft, #f3efff));
  box-shadow: inset 0 -3px 0 var(--clear-green, #087b5c);
  font: 800 0.8rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
}

.demo-ribbon {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--clear-green);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.84rem;
}

.demo-ribbon strong {
  color: var(--text);
  white-space: nowrap;
}

.field-os-demo .segment.active,
.field-os-demo .tab-button.active,
.field-os-demo .folder-tab.active,
.field-os-demo .role-switch-button.active,
.field-os-demo .button.primary {
  background: linear-gradient(135deg, var(--clear-blue), var(--clear-purple));
  color: #ffffff;
}

.field-os-demo .button.gold {
  background: linear-gradient(135deg, var(--clear-purple), var(--clear-green));
  color: #ffffff;
}

.field-os-demo .workspace-tabs {
  border-color: rgba(23, 81, 154, .2);
}

.field-os-demo .job-grid > .office-job-row:nth-child(3n + 1) {
  border-left: 4px solid var(--clear-blue);
}

.field-os-demo .job-grid > .office-job-row:nth-child(3n + 2) {
  border-left: 4px solid var(--clear-purple);
}

.field-os-demo .job-grid > .office-job-row:nth-child(3n + 3) {
  border-left: 4px solid var(--clear-green);
}

.field-os-demo .metric:nth-child(3n + 1) strong,
.field-os-demo .company-strip article:nth-child(3n + 1) strong {
  color: var(--clear-blue);
}

.field-os-demo .metric:nth-child(3n + 2) strong,
.field-os-demo .company-strip article:nth-child(3n + 2) strong {
  color: var(--clear-purple);
}

.field-os-demo .metric:nth-child(3n + 3) strong,
.field-os-demo .company-strip article:nth-child(3n + 3) strong {
  color: var(--clear-green);
}

.demo-reset-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.demo-reset-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.demo-load-error {
  width: min(680px, calc(100% - 32px));
  margin: 18vh auto 0;
  padding: 28px;
  border: 1px solid #d7e1ec;
  border-radius: 12px;
  background: #ffffff;
  color: #0c121a;
}

.demo-load-error h1 {
  margin: 0 0 10px;
}

.demo-load-error p {
  margin: 0;
  color: #425466;
}

@media (max-width: 760px) {
  .demo-ribbon {
    grid-template-columns: 1fr auto;
  }

  .demo-ribbon span {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
