@font-face {
  font-family: Montserrat;
  src: url("montserrat.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --bg: #edf2f6;
  --ink: #132c43;
  --muted: #526778;
  --line: #e1e8ee;
  --chrome: #09273e;
  --chrome-ink: #d5e3ee;
  font-family: Montserrat, "Segoe UI", sans-serif;
}

.shell { grid-template-columns: 238px minmax(0, 1fr); }
.sidebar {
  background: var(--chrome);
  border-right-color: #274558;
}
.brand { padding-inline: 10px; }
.brand img {
  width: 172px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f3f7fa;
}
.workspace, .made { color: #a7bed0; }
.nav a { color: var(--chrome-ink); font-size: .8125rem; }
.nav a span { white-space: normal; line-height: 1.25; }
.nav a svg { color: #9fbcd1; }
.nav a:hover { background: #183b55; }
.nav a.active, .nav a.active:hover { background: #174a6b; color: white; }
.nav a.active:before { width: 4px; top: 8px; bottom: 8px; }
.nav b { background: #204762; color: #edf7ff; }
.side-bottom { border-color: #29485e; }
.side-bottom button { color: #d8e8f4; }
.side-bottom button:hover { background: #183b55; }
.topbar {
  height: 68px;
  background: #102f49;
  border-bottom: 1px solid #264760;
}
.breadcrumb { color: #b6cbdc; }
.language-switcher { position: relative; z-index: 40; }
.language-switcher summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 68px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #5c7589;
  border-radius: 10px;
  background: #183d59;
  color: #f1f7fc;
  font-size: .75rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.language-switcher summary::-webkit-details-marker { display: none; }
.language-switcher summary:hover, .language-switcher[open] summary { background: #24516f; }
.language-switcher :focus-visible { outline: 2px solid #eb650f; outline-offset: 3px; }
.language-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.language-switcher[open] .language-chevron { transform: translateY(2px) rotate(225deg); }
.language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 184px;
  display: grid;
  gap: 4px;
  padding: 6px;
  background: #fff;
  border: 1px solid #d9e4ed;
  border-radius: 12px;
  box-shadow: 0 12px 30px #09273e38;
}
.language-options button {
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  margin: 0;
  min-height: 42px;
  padding: 7px 9px;
  border: 0;
  font-size: .76rem;
}
.language-options button[aria-pressed="true"] { background: #eaf3f9; color: #005080; }
.language-code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #e1ebf2;
  color: #29485e;
  font-size: .64rem;
  font-weight: 700;
}
.language-tick {
  width: 6px;
  height: 10px;
  margin-left: auto;
  border: solid #005080;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.login-form > .language-switcher { float: right; }
.login-form > img { clear: both; }
.side-bottom .fm-poweredby { display: flex; margin: 5px 6px 0; }
.foot .fm-poweredby { padding: 4px 10px; border-radius: 8px; background: var(--chrome); }
@media (max-width: 767px) {
  .foot .fm-poweredby { margin-top: 8px; }
}
.avatar { background: #d35409; }
.main { padding-top: 22px; }
.demo-banner { margin-bottom: 22px; }
.primary { background: #b74400; border-color: #b74400; }
.primary:hover { background: #983a00; border-color: #983a00; }
.operations .page-title { margin-bottom: 20px; }
.operations h1 { font-weight: 720; }
.operations .stats { gap: 12px; margin-bottom: 14px; }
.operations .stat {
  min-height: 132px;
  padding: 17px 18px;
  border-radius: 14px;
  background: #fdfefe;
  border-color: #dce6ed;
}
.operations .stat .label { color: #31495e; font-weight: 650; }
.operations .stat .value {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  color: #142d42;
  margin: 8px 0 5px;
}
.operations .stat small { color: #526778; }
.operations .metric-lead {
  background: linear-gradient(125deg, #0b3552, #005080);
  border-color: #174b6f;
}
.operations .metric-lead .label,
.operations .metric-lead .value { color: white; }
.operations .metric-lead small { color: #d1e9fa; }
.operations .metric-alert { background: #fff1e7; border-color: #efd5c2; }
.operations .metric-alert .value { color: #963900; }
.operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .9fr);
  gap: 14px;
  align-items: stretch;
}
.operations-grid .panel { margin: 0; border-radius: 14px; }
.operations-grid .panel-head {
  min-height: 58px;
  padding: 15px 17px;
  background: #f9fbfd;
}
.operations-grid .panel-head h2 { font-size: .92rem; }
.operations-grid .panel-head a { font-size: .72rem; }
.operations-grid .route-row { padding: 12px 15px; align-items: center; }
.operations-grid .route-row strong { font-size: .8rem; }
.operations-grid .route-row small { font-size: .7rem; }
.operations-term { grid-column: 1 / -1; }
.operations-fleet .panel-body { padding: 14px 17px; }
.fleet-meter {
  display: grid;
  place-items: center;
  width: 112px;
  aspect-ratio: 1;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: conic-gradient(#005080 var(--processed), #eb650f var(--processed) var(--rented), #e5edf4 var(--rented));
}
.fleet-value {
  width: 86px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: white;
}
.fleet-value strong { font-size: 1.38rem; line-height: 1.2; }
.fleet-value span { font-size: .61rem; color: #526778; }
.operations-fleet .legend { font-size: .72rem; margin: 8px 0; }
.operations-grid .operations-admin {
  background: #102f49;
  color: white;
  border-color: #102f49;
}
.operations-admin .panel-body { padding: 19px; }
.admin-count { display: block; color: #ffa064; font-size: 2.4rem; line-height: 1.2; margin: 12px 0; }
.operations-admin p { color: #d5e3ee; font-size: .77rem; }
.operations-admin .text-button {
  background: #f7fafc;
  color: #143c58;
  border-color: #e1eaf1;
  font-size: .73rem;
  min-height: 38px;
}

@media (max-width: 1200px) {
  .operations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-admin { grid-column: 1 / -1; }
}
@media (max-width: 1024px) {
  .shell { grid-template-columns: 215px minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .shell { display: block; }
  .topbar { height: 64px; }
  .mobile-menu:hover { background: #234b69; }
  .operations-grid { grid-template-columns: minmax(0, 1fr); }
  .operations-admin { grid-column: auto; }
  .operations .stat { min-height: 137px; padding: 14px; }
  .operations .stat .label { font-size: .72rem; }
  .operations .stat small { font-size: .69rem; }
  .operations .stats { gap: 9px; }
}

:root {
  --muted: #536b7c;
  --surface: #fff;
  --action: #b74400;
  --action-hover: #983a00;
  --focus: #dc5a15;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --text-caption: .75rem;
  --text-body: .875rem;
}
.primary { background: var(--action); border-color: var(--action); }
.primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
.panel, .task-card, dialog { border-radius: var(--radius-lg); }
.task-card .status-line > .badge {
  background: var(--chrome);
  color: #fff;
}
.task-card .status-line > .badge.green { background: #175742; }
.offline-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: .875rem;
}
.offline-status [role="status"] { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.offline-status [role="status"] span, .task-photo-pending { color: var(--muted); font-weight: 600; }
.offline-blocked { width: 100%; border-top: 1px solid var(--line); padding-top: 8px; }
.offline-blocked ul { margin: 4px 0 0; padding-left: 20px; }
.offline-blocked li > span { overflow-wrap: anywhere; }
.task-photo-pending { margin: 12px 0 0; font-size: .875rem; }
.driver-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.driver-toolbar > .muted { margin-left: auto; }
.date-input { align-items: center; }
.date-picker {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
}
.date-display { display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: .875rem; }
.date-display svg { width: 16px; height: 16px; }
.date-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.date-picker input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.date-picker:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.legal-links .install-app { width: auto; min-height: 44px; margin: 0; padding-inline: 4px; }
.install-help { margin: 0; padding-inline-start: 20px; }
.install-help li + li { margin-top: 16px; }
@media (display-mode: standalone) {
  .legal-links .install-app { display: none; }
}
button, .action-link, input, select, textarea, .filter-link { border-radius: var(--radius-md); }
.badge, .route-num { border-radius: var(--radius-sm); }
.badge.gray, .detail dt, .foot { color: var(--muted); }
.demo-banner { color: #734a28; }
:where(button, a, summary, input, select, textarea):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
dialog header button, .side-bottom button, .operations-admin .text-button,
.language-switcher summary, .language-switcher .language-options button { min-height: 44px; min-width: 44px; }
dialog .check { min-height: 44px; }
dialog .check input { width: 24px; height: 24px; min-height: 24px; }
.page-title .page-actions, .table-actions, .legal-links, .panel-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.panel-head a, .legal-links a { display: inline-flex; align-items: center; min-height: 44px; }
.page-title > .page-actions { width: auto; }
.panel-head a:hover, .legal-links a:hover { text-decoration: underline; }
.foot .legal-links, .login-form .legal-links { font-size: var(--text-caption); }
.legal-page, .startup-error {
  max-width: 620px;
  margin: clamp(18px, 7vh, 64px) auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 5vw, 40px);
}
.legal-page img { display: block; max-width: 100%; margin-bottom: 24px; }
.legal-page a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }
.tabs { flex-wrap: wrap; }
.filter-link {
  display: inline-flex;
  min-height: 44px;
  gap: 7px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 6px 10px;
  font-size: var(--text-caption);
  font-weight: 600;
}
.filter-link:hover { border-color: var(--blue); }
.filter-link.selected { background: var(--blue); color: white; border-color: var(--blue); }
.planning-stop { border-bottom: 1px solid var(--line); }
.planning-stop .route-row { border-bottom: none; }
.planning-stop .table-actions { padding: 0 14px 8px; }
.route-group { padding: 10px 15px; background: var(--bg); color: var(--muted); font-size: var(--text-caption); font-weight: 700; }
.driver-management { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.column-sort {
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  padding: 3px;
  min-width: 44px;
  border-color: transparent;
  background: transparent;
  text-align: left;
  justify-content: flex-start;
}
th[aria-sort="ascending"] button::after { content: " ↑"; }
th[aria-sort="descending"] button::after { content: " ↓"; }
.table-pagination { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px; font-size: var(--text-body); }
.mobile-cell-label, .mobile-table-sort, .menu-overlay, .driver-nav { display: none; }

@media (max-width: 767px) {
  .driver-toolbar .date-input { flex-wrap: nowrap; }
  .mobile-menu { min-height: 44px; min-width: 44px; }
  .shell.menu-open .menu-overlay {
    display: block;
    position: fixed;
    inset: 64px 0 0;
    z-index: 29;
    width: 100%;
    border: 0;
    border-radius: 0;
    background: #102f4980;
  }
  .driver-shell .mobile-menu, .driver-shell .sidebar { display: none; }
  .driver-shell .main { padding-bottom: 90px; }
  .driver-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    position: fixed;
    inset: auto 0 0;
    z-index: 21;
    min-height: 58px;
    padding: 4px 14px max(4px, env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
  }
  .driver-nav a { display: inline-flex; align-items: center; min-height: 44px; gap: 6px; font-size: var(--text-body); font-weight: 700; }
  #app:has(.driver-shell) ~ #notice { bottom: 74px; }
  .operations .stat .label, .operations .stat small, .demo-banner, .demo-banner strong,
  .badge, .eyebrow, .avatar, .route-row small, .operations-grid .route-row small,
  .panel-head small, .operations-fleet .legend, .fleet-value span,
  .task-card .task-meta, .task-card .task-note, .driver-toolbar > .muted, .foot {
    font-size: var(--text-caption);
  }
  .info, .page-title p, .operations-admin p, .login-note { font-size: var(--text-body); }
  .task-card .actions > *, .panel-head button { min-height: 44px; }
  .legal-page, .startup-error { margin-inline: 16px; }
  .panel-links { gap: 4px 10px; justify-content: flex-end; }
  .table-wrap { overflow: visible; min-width: 0; }
  .table-wrap table { display: block; min-width: 0; width: 100%; }
  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .table-wrap thead button { visibility: hidden; }
  .table-wrap tbody { display: grid; gap: 12px; padding: 12px; background: var(--bg); }
  .table-wrap tr {
    display: block;
    min-width: 0;
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }
  .table-wrap td .cell-content small { font-size: var(--text-caption); }
  .mobile-cell-label { display: block; color: var(--muted); font-size: var(--text-caption); font-weight: 600; }
  .mobile-table-sort { display: block; padding: 8px 12px; }
  .mobile-table-sort select { width: 100%; min-height: 44px; }
}

@media (min-width: 1200px) {
  :root {
    --text-caption: .875rem;
    --text-body: clamp(1rem, calc(.9rem + .13vw), 1.0625rem);
    --text-heading: clamp(1.125rem, calc(1rem + .18vw), 1.25rem);
    --text-page: clamp(2rem, calc(1.65rem + .5vw), 2.375rem);
    --muted: #435c70;
  }

  body { font-size: var(--text-body); }
  h1 { font-size: var(--text-page); }
  h2, .operations-grid .panel-head h2 { font-size: var(--text-heading); }
  .page-title p, .operations-admin p, .table-wrap td, .detail dl {
    font-size: var(--text-body);
    line-height: 1.55;
  }
  .page-title p, .task-card .task-address, .task-card h2 > span,
  .task-card .task-meta, .task-card .task-note, .operations-fleet .legend {
    color: var(--muted);
  }
  .demo-banner, .info, .operations-grid .panel-head a,
  .panel-head > a, .panel-head small, .operations-fleet .legend,
  .operations-grid .route-row small, .route-row small, .route-group,
  .table-wrap th, .table-wrap td small, .badge, .foot,
  dialog label, .error, .task-card .task-meta, .task-card .task-note {
    font-size: var(--text-caption);
  }
  .demo-banner strong, .workspace, .eyebrow, .language-code { font-size: .8125rem; }
  .breadcrumb, .person > span, .nav a,
  .operations-grid .route-row strong, .route-row strong,
  .task-customer, .task-card .task-address, .task-card .actions > * {
    font-size: 1rem;
  }
  .person small, .nav b, .side-bottom button, .language-switcher summary,
  .language-options button, .operations-admin .text-button {
    font-size: var(--text-caption);
  }
  .nav a { min-height: 44px; font-weight: 600; }
  .nav { scrollbar-width: thin; scrollbar-color: #54748c transparent; }
  .nav::-webkit-scrollbar { display: block; width: 6px; }
  .nav::-webkit-scrollbar-thumb { background: #54748c; }
  .operations .stat { min-height: 150px; }
  .stat .label, .operations .stat .label { font-size: 1rem; font-weight: 650; }
  .stat small, .operations .stat small { font-size: var(--text-caption); }
  .stat small { max-width: none; }
  .operations .stat small { color: var(--muted); }
  .operations .metric-lead small { color: #e2f1fc; }
  .fleet-meter { width: 132px; }
  .fleet-value { width: 103px; }
  .fleet-value span { font-size: var(--text-caption); color: var(--muted); }
  .operations-grid .route-row small { overflow-wrap: anywhere; }
  .badge { line-height: 1.35; }
  .table-wrap th, .table-wrap td { white-space: normal; }
  .table-wrap td { overflow-wrap: anywhere; }
  .table-wrap .column-sort, .table-wrap .badge { letter-spacing: normal; }
  .table-wrap .text-button { padding-inline: 8px; }
  .table-wrap .table-actions { gap: 4px; }
  .page-actions > button, .operations .page-title > button { font-size: 1rem; }
}
.wide-dialog { width: min(1080px, calc(100% - 32px)); }
dialog.rental-dialog { width: min(856px, calc(100% - 24px)); }
.rental-dialog #dialog-content > header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}
.rental-dialog #entry-form > footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: var(--surface);
  padding: 12px 0 4px;
  margin-top: 12px;
}
.rental-form-content .form-grid label { min-width: 0; }
@media (min-width: 660px) {
  .rental-form-content .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rental-form-content label { margin-bottom: 14px; }
  .rental-date-fields { align-items: end; }
}
.history-detail { padding: clamp(14px, 3vw, 24px); }
.table-wrap { container: table-layout / inline-size; overflow: visible; }
.table-wrap table { min-width: 0; table-layout: auto; }
.table-wrap th, .table-wrap td {
  padding: 12px clamp(8px, 1.04vw, 16px);
  vertical-align: middle;
}
.table-wrap th { white-space: nowrap; }
.table-wrap th button { max-width: 100%; }
.table-wrap td { overflow-wrap: normal; }
.table-wrap .action-cell { white-space: nowrap; }
.table-wrap .table-actions { flex-wrap: nowrap; gap: 6px; }
.table-wrap .action-cell button, .planning-stop .table-actions button, .detail-actions .text-button,
.panel-head .panel-links > a {
  min-height: 44px;
  white-space: nowrap;
  overflow-wrap: normal;
  border: 1px solid #b7cbd9;
  border-radius: var(--radius-sm);
  background: #f2f7fb;
  color: var(--blue);
  padding: 7px 10px;
  font-weight: 650;
  text-decoration: none;
}
.table-wrap .action-cell button:hover, .planning-stop .table-actions button:hover, .detail-actions .text-button:hover,
.panel-head .panel-links > a:hover { background: #e4eff7; border-color: #7d9fb5; }
.table-wrap .action-cell [data-action="rental-detail"] { background: var(--blue); border-color: var(--blue); color: white; }
.table-wrap .action-cell [data-action="rental-detail"]:hover { background: var(--chrome); }
.table-wrap .status-stack { display: grid; justify-items: start; gap: 3px; }
.table-wrap .status-stack small { margin: 0; padding-inline-start: 8px; }
@media (max-width: 767px) {
  .table-wrap .status-stack small { padding-inline-start: 7px; }
}
.rental-table th:last-child, .rental-table td:last-child { text-align: right; }
.table-wrap .table-actions [data-action="archive"] { color: #7c461a; }
.table-wrap th .column-sort { white-space: nowrap; }
.table-wrap td:not(.action-cell) > .cell-content { min-width: 0; overflow-wrap: break-word; }
@container table-layout (min-width: 57rem) {
  .table-wrap td:not(.text-wrap, .action-cell) > .cell-content:not(:has(.status-stack)) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .table-wrap table { table-layout: fixed; }
  .table-wrap th.action-column { width: 19rem; }
  .customer-table th.action-column, .stock-table th.action-column { width: 22rem; }
  .customer-table th:nth-child(4) { width: 9.75rem; }
  .rental-table th:first-child { width: 24%; }
  .rental-table th:last-child { width: 7.5rem; }
}
@container table-layout (max-width: 56.999rem) {
  .table-wrap table, .table-wrap tr { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-wrap thead button { visibility: hidden; }
  .table-wrap tbody { display: grid; gap: 10px; padding: 10px; }
  .table-wrap tr {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,8rem),1fr));
    align-items: start;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }
  .table-wrap td, .table-wrap td:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 3px;
    min-width: 0;
    width: auto;
    padding: 0;
    border: 0;
    white-space: normal;
    text-align: left;
  }
  .table-wrap .mobile-cell-label, .table-wrap td:first-child .mobile-cell-label {
    display: block;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 650;
  }
  .table-wrap td:not(.action-cell) > .cell-content { overflow-wrap: anywhere; }
  .table-wrap .status-stack .badge { max-width: 100%; white-space: normal; }
  .table-wrap td.action-cell {
    grid-column: 1 / -1;
    display: block;
    width: auto;
    text-align: left;
  }
  .table-wrap .action-cell .mobile-cell-label { display: none; }
  .table-wrap .table-actions { flex-wrap: wrap; }
  .table-wrap .mobile-table-sort { display: block; }
}
@media (max-width: 767px) {
  .wide-dialog { width: calc(100% - 20px); }
  .table-wrap td.text-wrap { min-width: 0; }
  .table-wrap td { font-size: var(--text-body); }
}
@container table-layout (max-width: 34rem) {
  .rental-table tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.required-mark, .field-validation { color: #a63427; }
.field-validation { font-size: .75rem; }
.form-required-note { display: block; margin-top: 6px; }
dialog [aria-invalid="true"] { border-color: #a63427; }
dialog input[readonly] { background: var(--bg); color: var(--muted); }
.conditional-fields { min-width: 0; padding: 0; margin: 0; border: 0; }
.camera-form { display: grid; gap: 12px; }
.camera-form video, .camera-form .camera-preview {
  width: 100%;
  max-height: min(48dvh, 420px);
  object-fit: contain;
  background: var(--chrome);
  border-radius: var(--radius-md);
}
.camera-form [hidden] { display: none; }
.camera-status:not(:empty) { font-weight: 650; }
.photo-card { flex: 1 1 140px; min-width: 0; margin: 0; }
.photo-card figcaption { display: grid; gap: 2px; margin-top: 4px; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.photo-card strong { color: var(--ink); }
.photo-card img { width: 100%; height: 112px; object-fit: cover; }

@media (max-width: 767px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-width: 0; overflow-wrap: anywhere; }
}

/* Photo workflow */
.photos {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:14px;width:100%;}
.photos .photo-card {margin:0;min-width:0;max-width:100%;border:1px solid #d8e2e9;border-radius:10px;padding:10px;background:#fff;}
.photos .photo-card img {display:block;width:100%;height:auto;max-height:380px;aspect-ratio:4/3;object-fit:contain;background:#eef3f6;border-radius:7px;}
.photos .photo-card figcaption {font-size:.875rem;gap:5px;margin-top:9px;}
.photo-card .photo-delete {justify-self:start;color:#a32323;margin-top:6px;}
.camera-form .detail-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.camera-form .camera-preview,.camera-form video {width:100%;max-height:65dvh;object-fit:contain;}
.camera-form .camera-status {font-size:.875rem;}
@media(max-width:480px){.photos{grid-template-columns:1fr;}.camera-form .detail-actions{grid-template-columns:1fr;}}
