/* MFC workspace: tropical golden-hour identity and accessible operational density.
   Loaded after compact.css. No visibility or permission rules are overridden. */
#ops {
  --paper: #f5eedb;
  --ink: #173d33;
  --green: #123f35;
  --line: #e0d0a7;
  --muted: #596b61;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: Commissioner, sans-serif;
}
#ops button, #ops input, #ops select, #ops textarea { font-family: inherit; }
#ops button, #ops summary { min-height: 44px; }
#ops :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid #a57125;
  outline-offset: 3px;
}
#ops button { transition: background-color .15s ease, border-color .15s ease; }
#ops button:disabled { opacity: .5; cursor: default; }
#ops .ops-connection-error {
  width: min(100%, 560px);
  padding: 32px 24px;
  margin: 8vh auto;
  line-height: 1.6;
}
#ops .ops-connection-error h1 { margin-bottom: 16px; }
#ops .ops-connection-error button { margin-top: 20px; padding: 12px 20px; }
#ops .primary {
  background: #173f34;
  color: #fffdf6;
  border: 1px solid #173f34;
  box-shadow: none;
  border-radius: 9px;
  font-weight: 600;
}
#ops .primary:hover:not(:disabled) { background: #245b48; border-color: #245b48; }
#ops > aside {
  width: 216px;
  padding: 28px 14px 16px;
  background: #123b31;
  border-right: 1px solid #214e40;
  overflow-y: auto;
}
#ops .brand-row { padding: 0 14px 20px; }
#ops .brand-row .logo { font-size: 42px; }
#ops .workspace-role { color: #c0d1c6; margin: 16px 0 0; line-height: 1.5; }
#ops aside nav { border-top: 1px solid #ffffff18; padding-top: 18px; }
#ops aside nav button {
  padding: 12px 14px;
  margin: 4px 0;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #e0e9df;
}
#ops aside nav button:hover { background: #ffffff0c; }
#ops aside nav button.active {
  background: #e7c78a;
  border-color: #e7c78a;
  color: #163d30;
  box-shadow: none;
}
#ops .ops-nav { border-top: 1px solid #ffffff18; margin-top: 18px; }
#ops .ops-nav a { color: #d9cfb4; font-size: 12px; }
#ops .side-bottom { color: #b8ccc0; padding: 16px 14px 0; overflow-wrap: anywhere; }
#ops > main { margin-left: 216px; padding: 0 28px 24px; }
#ops main > header { min-height: 76px; border-color: #e0d0a7; }
#ops .crumb { line-height: 1.5; }
#ops .controls { flex-wrap: wrap; }
#ops .controls button, #ops .account-menu summary {
  background: #fcfcf8;
  border-color: #daca9f;
  border-radius: 8px;
  font-size: 12px;
}
#ops .controls button:hover, #ops .account-menu summary:hover { background: #eaf0e5; }
#ops .account-menu > div {
  width: 240px;
  max-width: calc(100vw - 32px);
  border-color: #daca9f;
  background: #fffffb;
  padding: 8px;
  box-shadow: 0 12px 32px #173d3320;
}
#ops .heading { margin: 28px 0 20px; gap: 16px; }
#ops .heading h1 { font-size: 32px; font-weight: 650; letter-spacing: -1px; line-height: 1.16; }
#ops .heading p { margin-top: 8px; font-size: 12px; }
#ops .metrics { gap: 12px; margin: 0 0 22px; }
#ops .metric {
  padding: 18px;
  border: 1px solid #e0d0a7;
  border-radius: 11px;
  background: #fffaf0;
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
}
#ops .metric label { font-size: 12px; }
#ops .metric strong { font-size: 29px; font-weight: 600; color: #173d33; }
#ops .panel {
  border-color: #daca9f;
  border-radius: 12px;
  background: #fffaf0;
  box-shadow: 0 3px 12px #123f3505;
}
#ops .workspace-search { padding: 16px; background: #fffaf0; gap: 12px; align-items: flex-end; }
#ops .workspace-search label > span { color: #596b61; font-size: 11px; margin-bottom: 6px; }
#ops :is(.workspace-search, .ops-form) :is(input, select, textarea),
#ops .login-panel input {
  background: #fff;
  color: #173d33;
  border: 1px solid #bac8bc;
  border-radius: 8px;
}
#ops :is(.workspace-search, .ops-form) :is(input, select, textarea):hover,
#ops .login-panel input:hover { border-color: #6d8c77; }
#ops .workspace-search button, #ops .table-pages button, #ops .chip {
  background: #fbf1db;
  border: 1px solid #ddc893;
  border-radius: 8px;
}
#ops .ops-table th {
  background: #f6edda;
  color: #536858;
  padding: 12px 16px;
  font-size: 11px;
  letter-spacing: .02em;
}
#ops .ops-table td { padding: 16px; line-height: 1.5; }
#ops .ops-table tbody tr:hover { background: #f7f9f1; }
#ops .ops-table small { color: #596b61; }
#ops .ops-table .vehicle-name { font-size: 14px; line-height: 1.5; }
#ops .ops-table button { background: #fbf1db; border-color: #ddc893; border-radius: 8px; }
#ops .ops-table button:hover { background: #f3dfaf; border-color: #aabcaa; }
/* Row actions share one 8 px gap token; cancelling is visually secondary and marked as destructive. */
#ops .ops-table .record-actions button { margin: 0 8px 8px 0; }
#ops .ops-table button[data-action="cancelled"] { background: #fff6f1; border-color: #d9b3a4; color: #873d2b; }
#ops .ops-table button[data-action="cancelled"]:hover { background: #f9e2d8; border-color: #c9937f; }
#ops .fleet-photo { width: 92px; height: 64px; box-shadow: none; }
#ops .pill { border-radius: 6px; background: #e7efdf; color: #355d3c; padding: 5px 8px; font-weight: 550; }
#ops .pill.warning { background: #f8e8d4; color: #854b17; }
#ops .table-pages { padding: 14px 16px; background: #fffaf0; }
#ops .empty { padding: 40px 24px; color: #596b61; line-height: 1.6; text-align: center; }
#ops .ops-event { padding: 16px; line-height: 1.5; }
#ops .environment-note { margin-top: 12px; }
#ops .ops-status:not(:empty) { padding: 12px 0; line-height: 1.5; }
#ops .ops-dialog {
  background: #fffaf0;
  border-color: #daca9f;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 24px 90px #092d3133;
}
#ops .ops-dialog::backdrop { background: #082c24a6; }
#ops .ops-dialog h2 { font-size: 25px; margin-bottom: 22px; }
#ops .ops-form { gap: 18px 16px; }
#ops .ops-form label { line-height: 1.5; font-size: 12px; }
#ops .ops-form input, #ops .ops-form select, #ops .ops-form textarea { margin-top: 7px; }
#ops .ops-form > .toolbar {
  background: #fffaf0;
  bottom: -28px;
  padding: 16px 0 10px;
  box-shadow: none;
  border-top: 1px solid #e0d0a7;
}
#ops .extras-fields { background: #f5f6ef; border-color: #ddc893; padding: 16px; }
#ops .extras-fields legend { font-size: 19px; }
#ops .extras-more { border-color: #ddc893; background: #fffaf0; }
#ops .extras-result { background: #eaf0e2; }
/* Login preserves the original wordmark and golden-hour island identity. */
#ops .login-layout { background: #f5eedb; grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.2fr); min-height: 100dvh; }
#ops .login-art {
  background: radial-gradient(ellipse at 0 100%, #386149 0, transparent 70%), #123b31;
  padding: clamp(36px, 6vw, 88px);
  border-right: 1px solid #264d3e;
}
#ops .login-art h1 { font-size: clamp(34px, 4vw, 56px); line-height: 1.14; letter-spacing: -1.6px; margin: 54px 0 22px; color: #f3e4bd; }
#ops .login-art p { font-size: 14px; line-height: 1.75; color: #c4d4c7; max-width: 290px; }
#ops .login-panel {
  max-width: 430px;
  width: calc(100% - 64px);
  padding: 32px;
  background: #fffaf0;
  border: 1px solid #daca9f;
  border-radius: 16px;
  box-shadow: 0 16px 48px #173d3309;
  margin: 40px auto;
}
#ops .login-panel .language { float: none; margin: 0 6px 24px 0; background: #f5f6ef; border-color: #daca9f; font-size: 12px; }
#ops .login-panel .eyebrow { color: #59705e; margin: 0 0 10px; letter-spacing: 2px; }
#ops .login-panel h2 { font-size: 29px; line-height: 1.2; margin: 0 0 28px; letter-spacing: -.8px; }
#ops .login-panel label { font-size: 12px; margin: 18px 0; }
#ops .login-panel input { min-height: 48px; padding: 12px; font-size: 16px; }
#ops .login-panel .primary { margin: 10px 0 0; min-height: 48px; }
#ops .login-panel .note { border-top: 1px solid #e0d0a7; padding-top: 18px; margin-top: 24px; line-height: 1.6; }
#ops .login-panel #login-error:not(:empty) { margin: 12px 0; line-height: 1.5; }
@media (max-width: 1100px) {
  #ops > aside { width: 196px; padding-inline: 10px; }
  #ops > main { margin-left: 196px; padding-inline: 20px; }
  #ops .ops-table td, #ops .ops-table th { padding: 12px; }
  #ops .metric { padding: 14px; }
}
@media (max-width: 760px) {
  #ops .login-layout { display: block; }
  #ops .login-art { padding: 22px 24px; min-height: 120px; }
  #ops .login-art h1 { font-size: 25px; line-height: 1.2; letter-spacing: -.6px; margin: 16px 0 0; }
  #ops .login-art p { display: none; }
  #ops .login-panel { margin: 24px auto; width: calc(100% - 32px); padding: 24px; }
}
@media (max-width: 740px) {
  #ops > aside { position: static; width: auto; padding: 14px 12px 0; overflow: visible; }
  #ops .brand-row { padding: 0 4px 12px; }
  #ops .brand-row .logo { font-size: 30px; }
  #ops .workspace-role { margin: 0; font-size: 10px; }
  #ops aside nav { padding-top: 8px; padding-bottom: 10px; margin-top: 0; gap: 6px; scrollbar-width: thin; scrollbar-color: #748e73 #123b31; }
  #ops aside nav button { margin: 0; padding: 10px 13px; font-size: 12px; }
  #ops > main { margin: 0; padding: 0 12px calc(18px + env(safe-area-inset-bottom)); }
  #ops main > header { min-height: 66px; }
  #ops .controls { gap: 6px; }
  #ops .controls > button { padding-inline: 10px; }
  #ops .account-menu summary { max-width: 120px; font-size: 12px; padding-inline: 10px; }
  #ops .heading { margin: 20px 0 16px; gap: 12px; }
  #ops .heading h1 { font-size: 26px; letter-spacing: -.7px; }
  #ops .heading p { font-size: 11px; line-height: 1.5; }
  #ops .heading .primary { max-width: 135px; font-size: 12px; }
  #ops .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 16px; }
  #ops .metrics.limited-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  #ops .metric { padding: 12px; gap: 8px; }
  #ops .metric label { font-size: 11px; }
  #ops .metric strong { font-size: 25px; margin-top: 4px; }
  #ops .workspace-search { padding: 12px; gap: 10px; }
  #ops .ops-table tr { padding: 16px 12px; gap: 12px; }
  #ops .ops-table td { padding: 0; font-size: 13px; }
  #ops .ops-table td::before { color: #596b61; font-size: 10px; }
  #ops .ops-table .record-actions { padding-top: 4px; }
  #ops .fleet-photo { width: 94px; height: 66px; }
  #ops .table-pages { padding: 12px; }
  #ops .ops-dialog { padding: 20px 16px; border-radius: 13px; }
  #ops .ops-dialog h2 { font-size: 23px; }
  #ops .ops-form > .toolbar { bottom: -20px; }
  #ops .extras-fields { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #ops button { transition: none; }
}
/* Incoming requests keep their existing markup and gain a proper control band. */
#ops .ledger-scroll:has(#lead-source) > p:first-child {
  padding: 14px 16px;
  background: #f6edda;
  border-bottom: 1px solid #e0d0a7;
  color: #536858;
  font-size: 12px;
  line-height: 1.65;
}
#ops .ledger-scroll > label:has(#lead-source) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 14px 8px 14px 16px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
#ops #lead-source {
  min-height: 44px;
  min-width: 150px;
  padding: 9px 32px 9px 12px;
  background: #fff;
  color: #173d33;
  border: 1px solid #bac8bc;
  border-radius: 8px;
  font-size: 14px;
}
#ops :is(#delivery-open, #inbox-load, #inbox-more, #queue-close),
#ops .ops-dialog button:not(.primary):not(.chip) {
  min-height: 44px;
  padding: 10px 14px;
  background: #fbf1db;
  color: #173d33;
  border: 1px solid #ddc893;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}
#ops :is(#delivery-open, #inbox-load) { margin: 8px 8px 8px 0; vertical-align: middle; }
#ops #inbox-more { margin: 14px 16px; }
#ops :is(#delivery-open, #inbox-load, #inbox-more, #queue-close):hover,
#ops .ops-dialog button:not(.primary):not(.chip):hover { background: #f3dfaf; border-color: #aabcaa; }
#ops .ops-dialog > p { font-size: 13px; line-height: 1.65; }
#ops .ops-dialog h3 { font-size: 16px; margin: 24px 0 12px; }
#ops .ops-dialog .queue-record {
  padding: 14px;
  border: 1px solid #e0d0a7;
  border-radius: 9px;
  margin: 10px 0;
  background: #f5f6ef;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.6;
}
#ops .queue-record small { display: block; color: #596b61; margin-top: 6px; }
#ops .queue-record button { margin-top: 12px; }
#ops #queue-error:not(:empty) { color: #a54531; margin-top: 14px; }
#ops .ops-form > .full { overflow-wrap: anywhere; }
#ops .ops-form > div.full > p { padding: 12px; border: 1px solid #e0d0a7; border-radius: 8px; margin-bottom: 10px; }
#ops .ops-form > div.full > p small { display: block; margin: 8px 0; }
#ops .ops-form > div.full > p button { margin: 6px 6px 0 0; }
@media (max-width: 740px) {
  #ops .ledger-scroll:has(#lead-source) > p:first-child { padding: 12px; }
  #ops .ledger-scroll > label:has(#lead-source) { display: flex; margin: 12px; }
  #ops #lead-source { flex: 1; min-width: 0; font-size: 16px; }
  #ops #delivery-open { margin-left: 12px; }
  #ops :is(#delivery-open, #inbox-load) { max-width: calc(100% - 24px); margin-bottom: 12px; }
}
/* Golden-hour restoration: artwork belongs above the work, never behind records. */
#ops {
  background: radial-gradient(ellipse at 92% 0, #f4c56a52, transparent 48%), #f5eedb;
  --paper: #f5eedb;
  --line: #e0d0a7;
}
#ops > aside {
  background: linear-gradient(175deg, #164c3c 0%, #123b31 50%, #092d25 100%);
  border-right: 1px solid #d7ae61;
  box-shadow: 4px 0 20px #1e372211;
}
#ops .brand-row .logo { color: #f4d88f; text-shadow: 0 2px 0 #071f2080; }
/* Matte controls: keep gold as a navigation accent, with solid green actions. */
#ops aside nav button.active {
  background: #e7c78a;
  border-color: #e7c78a;
  box-shadow: none;
}
#ops .primary:active:not(:disabled) { background: #10382e; border-color: #10382e; }
#ops .primary.danger { background: #873d2b; border-color: #873d2b; color: #fff4ee; }
#ops .primary.danger:hover:not(:disabled) { background: #6f2f20; border-color: #6f2f20; }
#ops .heading {
  min-height: 176px;
  padding: 30px;
  margin: 24px 0 20px;
  border: 1px solid #c49f55;
  border-radius: 14px;
  color: #fff1ce;
  background: linear-gradient(90deg, #0c372af5 0%, #103e32df 37%, #153e3066 66%, #14362725 100%),
    url('/art/1b3f5391f6b76d4671d903733b94a1b38bf06a41cb77e620aca08e6f986a5761.webp') center 47% / cover;
  box-shadow: 0 9px 24px #51492215;
}
#ops .heading h1 { font-size: 36px; color: #fff1ce; text-shadow: 0 2px 8px #082f2890; }
#ops .heading p { color: #f0ddb4; }
#ops .heading .primary { flex-shrink: 0; }
/* Only "Today" carries the island banner and the fleet counters; other screens get a slim title row. */
#ops .heading.heading-compact { min-height: 0; padding: 18px 24px; background: linear-gradient(90deg, #0c372a, #174c39); box-shadow: none; margin: 20px 0 16px; }
#ops .heading.heading-compact h1 { font-size: 28px; text-shadow: none; }
#ops .heading.heading-compact p { display: none; }
/* Tablet rail: icons only, labels as tooltips, data gets the width back. */
@media (min-width: 741px) and (max-width: 1100px) {
  #ops > aside { width: 72px; padding-inline: 8px; }
  #ops > aside::after { display: none; }
  #ops > main { margin-left: 72px; }
  #ops .brand-row { padding: 0 0 14px; align-items: center; }
  #ops .brand-row .logo { font-size: 24px; }
  #ops .brand-row .logo small, #ops .workspace-role, #ops .side-bottom, #ops aside nav .nav-label { display: none; }
  #ops aside nav button:not(.fleet-photo):has(.mfc-icon) { justify-content: center; padding: 12px 0; gap: 0; }
  #ops aside nav .mfc-icon { width: 22px; height: 22px; }
}
/* Secondary row actions live in a disclosure menu. */
#ops .row-more { display: inline-block; vertical-align: top; width: auto; max-width: 100%; }
#ops .row-more > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 14px; border: 1px solid #ddc893; border-radius: 8px; background: #fbf1db; color: #173d33; cursor: pointer; margin: 0 8px 8px 0; }
#ops .row-more > summary::-webkit-details-marker { display: none; }
#ops .row-more[open] > summary { background: #f3dfaf; }
#ops .row-more-menu { position: static; width: auto; min-width: 240px; margin-top: 2px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: #fffaf0; border: 1px solid #ddc893; border-radius: 10px; }
#ops .row-more-menu button, #ops .row-more-menu button.mfc-action.mfc-icon-button { width: auto; height: auto; min-height: 48px; padding: 10px 14px; align-self: stretch; margin: 0; justify-content: flex-start; text-align: left; overflow: visible; }
#ops .row-more-menu button.mfc-action .mfc-action-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: nowrap; }
#ops .row-more-menu button[data-action="cancelled"] { margin-top: 4px; }
#ops .metric {
  background: linear-gradient(125deg, #fffdf5, #f7ecd2);
  border-top: 3px solid #cda051;
  box-shadow: 0 4px 12px #7f662509;
}
#ops .metric:nth-child(2) { border-top-color: #bf785b; }
#ops .metric:nth-child(3) { border-top-color: #5c8b65; }
#ops .metric:nth-child(4) { border-top-color: #cc9e3e; }
#ops .panel { box-shadow: 0 6px 22px #4d4a2710; }
#ops .controls button, #ops .account-menu summary { background: #fff8e9; }
#ops .controls button:hover, #ops .account-menu summary:hover { background: #f7e6be; }
#ops .login-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(400px, .85fr);
  background: radial-gradient(ellipse at 100% 0, #efd39580, transparent 70%), #f6efdc;
}
#ops .login-art {
  min-height: 100dvh;
  padding: 48px;
  justify-content: flex-start;
  background: linear-gradient(90deg, #0b362ba6 0%, #0e392b18 68%),
    url('/art/e3cfd44a0baa3a417e37261bce45525f107713bacb20b1520ac1239103ea6fff.webp') center / cover;
  border-right: 1px solid #c9a15d;
}
#ops .login-art .logo { font-size: 49px; color: #f5dc9e; }
#ops .login-art h1 {
  color: #ffe6a4;
  font-size: clamp(35px, 3.3vw, 52px);
  max-width: 370px;
  margin: 52px 0 22px;
  text-shadow: 0 3px 15px #06281cdc;
}
#ops .login-art p { color: #fff3d4; max-width: 260px; text-shadow: 0 2px 8px #082b20; }
#ops .login-panel {
  background: linear-gradient(145deg, #fffcf4, #fbf0d9);
  border-top: 3px solid #d2a352;
  box-shadow: 0 18px 48px #7c592e18;
}
#ops .login-panel .eyebrow { color: #79551e; }
@media (max-width: 1100px) and (min-width: 761px) {
  #ops .login-art { padding: 32px; background-position: 55% center; }
  #ops .login-art h1 { font-size: 36px; max-width: 280px; }
  #ops .login-panel { padding: 26px; width: calc(100% - 40px); }
}
@media (max-width: 760px) {
  #ops .login-art {
    min-height: 310px;
    padding: 24px;
    background-position: center 34%;
    background-image: linear-gradient(90deg, #0b362bc9, #103a2b11 85%),
      url('/art/e3cfd44a0baa3a417e37261bce45525f107713bacb20b1520ac1239103ea6fff.webp');
  }
  #ops .login-art .logo { font-size: 35px; }
  #ops .login-art h1 { font-size: 29px; max-width: 210px; margin-top: 28px; line-height: 1.2; }
  #ops .login-panel { margin: 20px auto 28px; }
}
@media (max-width: 740px) {
  #ops .heading { min-height: 174px; padding: 20px; gap: 18px; margin: 16px 0; align-items: flex-start; flex-direction: column; background-position: 58% center; }
  #ops .heading.heading-compact { min-height: 0; padding: 14px 16px; flex-direction: row; align-items: center; justify-content: space-between; }
  #ops .heading.heading-compact h1 { font-size: 22px; }
  #ops .row-more { width: 100%; }
  #ops .row-more > summary { width: 100%; justify-content: center; margin: 0; }
  #ops .row-more-menu { width: 100%; margin-top: 6px; }
  #ops .row-more-menu button.mfc-action .mfc-action-label { white-space: normal; }
  #ops .heading h1 { font-size: 29px; }
  #ops .heading .primary { max-width: none; min-height: 44px; padding: 10px 14px; }
  #ops .heading p { font-size: 11px; margin-top: 6px; }
}
/* Readable type at every viewport. Only secondary metadata uses 14px. */
#ops { font-size: 16px; line-height: 1.55; }
#ops :is(p, li, td, input, select, textarea, button, summary, .vehicle-name, .ops-event, .queue-record, .empty),
.photo-dialog :is(p, button, summary, input, select, textarea) {
  font-size: 16px !important;
  line-height: 1.55;
}
#ops :is(label, small, th, .note, .eyebrow, .crumb, .workspace-role, .side-bottom, .pill, .table-pages, .photo-source),
#ops .workspace-search label > span,
#ops .ops-table td::before,
#ops .fleet-photo span,
.photo-dialog :is(small, .photo-source) {
  font-size: 14px !important;
  line-height: 1.5;
}
#ops .logo small { font-size: 11px !important; }
#ops :is(button, summary), .photo-dialog button { min-height: 48px; }
#ops :is(input, select, textarea) { min-width: 0; max-width: 100%; }
#ops :is(input:not([type=checkbox]):not([type=radio]), select) { min-height: 48px; }
#ops :is(p, label, small, td, th, summary, h1, h2, h3, .workspace-role) { overflow-wrap: anywhere; }
#ops :is(.ops-form, .extras-grid, .heading > div, .metric, .controls) { min-width: 0; }
#ops button { white-space: normal; }
#ops aside nav button { line-height: 1.4; }
#ops .ops-table td { line-height: 1.6; }
#ops .ops-table details { max-width: 100%; }
#ops .ops-table details p { line-height: 1.65; }
#ops .metric label { color: #4d6251; }
#ops .metric strong { line-height: 1.25; }
#ops .account-menu > div { width: 280px; max-width: calc(100vw - 32px); }
#ops .account-menu summary { max-width: 210px; }
#ops .account-menu .note { padding: 12px 8px 6px; }
#ops .table-pages { flex-wrap: wrap; }
#ops .table-pages > * { max-width: 100%; }
#ops .extras-fields legend { max-width: 100%; line-height: 1.4; }
#ops .extras-fields .extras-check input { min-height: 20px; flex-shrink: 0; }
#ops .ops-form > .toolbar { flex-wrap: wrap; }
#ops .ops-form > .toolbar button { flex: 1 1 120px; }
/* Errors and the required-field note live in the sticky toolbar so they stay visible in long forms. */
#ops .ops-form > .toolbar .form-error { flex: 1 1 100%; margin: 0 0 4px; }
#ops .ops-form .required-note { flex: 1 1 100%; margin: 0 0 4px; font-size: 14px; color: #596b61; }
#ops .ops-form .required-mark { color: #9a381f; margin-left: 3px; }
/* The dialog's primary action always shows its verb, not only a check glyph. */
#ops #form-dialog .toolbar button[type="submit"].mfc-action { width: auto; min-width: 160px; padding: 10px 20px; }
#ops #form-dialog .toolbar button[type="submit"].mfc-action .mfc-action-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: nowrap; }
#ops .ops-form > div.full.toolbar > p { border: 0; background: transparent; padding: 0; border-radius: 0; margin-bottom: 4px; }
#ops .ledger-scroll > .toolbar { flex-wrap: wrap; overflow: visible; }
#ops .ledger-scroll > .toolbar button { max-width: 100%; flex-shrink: 1; }
#ops .login-panel .language { margin-right: 4px; padding-inline: 10px; }
#ops .login-panel { max-width: 470px; }
.photo-dialog { font-size: 16px; line-height: 1.55; }
.photo-dialog .photo-source { color: #4d6251; }
.photo-dialog header > div { min-width: 0; overflow-wrap: anywhere; }
.photo-dialog h2 { overflow-wrap: anywhere; }
.photo-dialog .photo-navigation { gap: 14px; }
/* Decorative plants occupy their own space, away from controls and data. */
#ops > aside::after {
  content: '';
  display: block;
  flex: 0 0 100px;
  margin-top: 12px;
  background: url('/assets/botanical-fern.svg') right bottom / auto 100px no-repeat;
  opacity: .45;
  pointer-events: none;
}
#ops > main::after {
  content: '';
  display: block;
  height: 68px;
  background: url('/assets/botanical-monstera.svg') right bottom / auto 68px no-repeat;
  opacity: .38;
  pointer-events: none;
}
#ops .login-panel::after {
  content: '';
  display: block;
  height: 58px;
  margin: 18px -12px -12px 0;
  background: url('/assets/botanical-fern.svg') right bottom / auto 58px no-repeat;
  opacity: .55;
  pointer-events: none;
}
@media (max-width: 900px) {
  #ops .heading { flex-wrap: wrap; }
  #ops .heading .primary { max-width: 100%; }
  #ops main > header { flex-wrap: wrap; padding-block: 12px; }
  #ops .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #ops .metrics.limited-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #ops .login-layout { display: block; }
  #ops .login-art { min-height: 310px; padding: 28px; background-position: center 34%; }
  #ops .login-art h1 { font-size: 32px; margin: 28px 0 0; max-width: 260px; }
  #ops .login-panel { width: calc(100% - 32px); margin: 24px auto; }
}
@media (max-width: 740px) {
  #ops > aside::after { display: none; }
  #ops aside nav button { white-space: nowrap; scroll-snap-align: center; }
  #ops aside nav { padding-inline: 12px 28px; scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 28px), transparent); }
  #ops .extras-fields legend { font-size: 16px; line-height: 1.3; padding: 0 6px; }
  #ops .brand-row { align-items: flex-start; }
  #ops .workspace-role { max-width: 155px; }
  #ops .controls { justify-content: flex-start; width: 100%; gap: 8px; }
  #ops .account-menu { margin-left: auto; max-width: 100%; }
  #ops .account-menu summary { max-width: 165px; }
  #ops .heading { padding: 20px 16px; }
  #ops .ops-table tr { gap: 14px; }
  #ops .ops-table .record-actions { gap: 8px; }
  #ops .ops-table .record-actions button { flex: 0 0 calc(50% - 4px); max-width: 100%; margin: 0; }
  #ops .ops-table .record-actions button.mfc-action .mfc-action-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  #ops .workspace-search { grid-template-columns: minmax(0, 1fr) 48px; align-items: end; }
  #ops .workspace-search label:first-child { grid-column: 1 / -1; }
  #ops .workspace-search button { justify-self: end; }
  #ops .table-pages { gap: 10px; }
  #ops .ops-form, #ops .extras-grid { grid-template-columns: minmax(0, 1fr); }
  #ops .ops-dialog { max-width: calc(100vw - 16px); }
  #ops .login-panel { padding: 24px 20px; }
  #ops .login-panel .language { margin-bottom: 16px; }
  #ops .ledger-scroll > label:has(#lead-source) { align-items: flex-start; flex-direction: column; }
  #ops #lead-source { width: 100%; }
  #ops :is(#delivery-open, #inbox-load) { display: block; margin: 10px 12px; max-width: calc(100% - 24px); }
}
@media (max-width: 360px) {
  #ops .ops-table tr { grid-template-columns: minmax(0, 1fr); }
  #ops .controls .account-menu { margin-left: auto; }
  #ops .account-menu > div { right: 0; left: auto; }
  #ops .login-panel { padding-inline: 16px; }
}

/* Field labels are primary form content, not secondary metadata. */
#ops .ops-form label,
#ops .login-panel label,
#ops .workspace-search label,
#ops .workspace-search label > span,
#ops .ledger-scroll > label:has(#lead-source) {
  font-size: 16px !important;
  line-height: 1.5;
}
/* A sidebar leaves too little room for a ledger on tablets: use labelled cards. */
@media (min-width: 741px) and (max-width: 1100px) {
  #ops .ops-table { min-width: 0; display: block; width: 100%; }
  #ops .ops-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  #ops .ops-table tbody { display: block; }
  #ops .ops-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
  }
  #ops .ops-table tr:last-child { border-bottom: 0; }
  #ops .ops-table td { display: block; border: 0; padding: 0; min-width: 0; }
  #ops .ops-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: #596b61;
    font-weight: 650;
  }
  #ops .ops-table td.record-heading, #ops .ops-table td.record-vehicle { grid-column: 1 / -1; }
  #ops .ops-table td.record-heading::before, #ops .ops-table td.record-actions::before { display: none; }
  #ops .ops-table td.record-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
  #ops .ops-table .record-actions button { margin: 0; flex: 0 1 auto; }
  #ops .ops-table td:empty { display: none; }
  #ops .ops-table details { width: 100%; max-width: none; }
}

#ops a.logo{display:block;color:inherit;text-decoration:none}

/* Filled action symbols keep native button and keyboard semantics. */
#ops button:not(.fleet-photo):has(.mfc-icon),
#ops .account-menu summary,
.photo-dialog button:has(.mfc-icon) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
#ops aside nav button:not(.fleet-photo):has(.mfc-icon),
#ops .account-menu div button:not(.fleet-photo):has(.mfc-icon) { justify-content: flex-start; text-align: left; }
#ops aside nav .mfc-icon { flex-shrink: 0; width: 20px; height: 20px; }
#ops .ops-icon-button,
.ops-dialog .ops-icon-button,
.photo-dialog [data-prev],
.photo-dialog [data-next] {
  min-width: 48px;
  min-height: 48px;
  padding: 10px;
  flex-shrink: 0;
}
#ops .account-menu summary { min-height: 48px; min-width: 0; }
#ops .account-menu summary > span:not(.mfc-sr-only) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ops .fleet-photo > span { display: inline-flex; align-items: center; gap: 6px; }

.reply-record{padding:18px;background:#f3eddc;border:1px solid #d6c8a6;border-radius:8px;margin-bottom:15px}.reply-body{font:inherit;font-size:16px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 14px}.reply-record .offer-share{margin-top:14px}.reply-record h3{font-size:20px;margin-bottom:12px}

/* Explicit selected colors prevent a pale surface from inheriting pale text. */
#ops .chip.selected { background: #173e30; color: #f6d18b; border-color: #173e30; }

/* Icon actions keep consistent hit areas without stretching across action bars. */
#ops .ops-form > .toolbar { justify-content: flex-end; gap: 8px; }
#ops .ops-form > .toolbar button { flex: 0 0 auto; }
#ops button.mfc-action:not(.mfc-action-retain) { padding: 10px; min-width: 48px; }
@media (min-width:601px) and (hover:hover) {
  #ops button.mfc-action { width: 48px; min-width: 48px; padding: 10px; }
}
