@import "./pagination.css";

:root {
  font-family:var(--ui-font-family, "Segoe UI", Arial, sans-serif);
  color:var(--ui-ink);
  background:var(--ui-canvas);
  font-synthesis:none;
}
* {
  box-sizing:border-box;
}
[hidden] {
  display:none!important;
}
.order-filter-form { display:grid; gap:12px; margin:16px 0; }
.order-filter-form .action-label { min-width:0; }
.order-history { margin:20px 0; }
.order-history-content { padding:12px 0; }
.history-entry { padding:12px 0; border-bottom:1px solid var(--ui-border); overflow-wrap:anywhere; }
.order-history .pager { flex-wrap:wrap; }
.order-history .pager span { flex-basis:100%; }
@media (max-width:600px) { .order-history .pager button { flex:1 1 100%; } }
body {
  margin:0;
  min-height:100vh;
}
.shell {
  max-width:1450px;
  margin:auto;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
.topbar {
  height:84px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 5%;
  background:var(--ui-primary);
  color:var(--ui-on-primary);
}
.brand {
  display:flex;
  align-items:center;
  gap:14px;
  letter-spacing:.12em;
}
.brand strong {
  display:block;
  font-size:18px;
}
.brand small {
  display:block;
  font-size:10px;
  color:var(--ui-muted);
  margin-top:5px;
}
.brand-logo {
  display:block;
  flex:none;
  width:44px;
  height:auto;
}
.session {
  display:flex;
  align-items:center;
  gap:18px;
  font-size:13px;
}
main {
  flex:1;
  padding:46px 5% 50px;
}
footer {
  padding:22px 5%;
  color:var(--ui-muted);
  font-size:12px;
  border-top:1px solid var(--ui-border);
}
.eyebrow {
  font-size:11px;
  font-weight:800;
  letter-spacing:.18em;
  color:var(--ui-warning-ink);
  margin-bottom:12px;
}
h1,h2,p {
  margin-top:0;
}
h1 {
  font-size:clamp(32px,4vw,50px);
  line-height:1.12;
  letter-spacing:-.045em;
  margin-bottom:12px;
}
h2 {
  font-size:20px;
  letter-spacing:-.025em;
  margin-bottom:0;
}
.muted {
  color:var(--ui-muted);
  font-size:13px;
}
.notice {
  background:var(--ui-success-surface);
  color:var(--ui-success-ink);
  padding:13px 18px;
  border-radius:9px;
  margin:0 0 20px;
  font-size:14px;
}
.notice.error {
  background:var(--ui-danger-surface);
  color:var(--ui-danger-ink);
}
body:has(#login-view:not([hidden])) .shell > :is(.topbar, footer) { display:none; }
/* The picture sits on the root and the sign-in screen reserves no scrollbar gutter, so it reaches both
   edges and the logo stays centred on the window; body stays clear while signing in. */
html:has(#login-view:not([hidden])) {
  scrollbar-gutter:auto;
  /* Focus on the pump boom and the mixer in the left foreground. */
  background:var(--ui-canvas) url("./login-riteccons.webp") var(--login-focus, 32% 78%) / cover no-repeat;
}
html[data-theme="dark"]:has(#login-view:not([hidden])) {
  background-image:linear-gradient(rgb(25 25 25 / .55), rgb(25 25 25 / .55)),
    url("./login-riteccons.webp");
}
body:has(#login-view:not([hidden])) { background:transparent; }
.login-panel { position:relative; width:min(100%,400px); margin:0 auto; }
.login-card {
  background:var(--ui-workspace);
  border:1px solid var(--ui-border);
  box-shadow:0 18px 60px var(--ui-shadow);
  border-radius:16px;
}
.login-fields { min-width:0; padding:24px; }
.login-panel h1 { text-align:center; margin:0 0 16px; }
.login-mobile-logo { display:block; width:64px; height:auto; margin:0 auto 16px; }
.login-brand, .login-reveal { display:none; }
.login-panel .primary { background:var(--ui-primary); color:var(--ui-on-primary); }
@media (min-width:900px) and (hover:hover) and (pointer:fine) {
  /* Closed and open states only. web/login-reveal.mjs plays the move between them on one 720 ms
     timeline (reversed at 2.5x to close); its first and last keyframes must equal these rules. */
  .login-panel {
    width:min(100%,1080px);
    --login-logo-size:104px;
  }
  .login-card {
    display:grid;
    grid-template-columns:1fr 1fr;
    min-height:clamp(440px,59dvh,540px);
    background:none;
    border:0;
    box-shadow:none;
    visibility:hidden;
  }
  .login-open .login-card, .login-animating .login-card { visibility:visible; }
  /* Pastel half: a logo-sized circle at the window centre that grows into the left half. */
  .login-brand {
    position:relative;
    z-index:1;
    display:grid;
    place-items:center;
    border:1px solid var(--ui-border);
    border-right:0;
    border-radius:16px 0 0 16px;
    padding:112px 16px 0;
    background:
      radial-gradient(ellipse at 8% 8%, rgb(140 239 18 / .095), transparent 65%),
      radial-gradient(ellipse at 92% 10%, rgb(255 203 31 / .12), transparent 65%),
      radial-gradient(ellipse at 8% 90%, rgb(0 155 244 / .105), transparent 65%),
      radial-gradient(ellipse at 94% 92%, rgb(249 23 60 / .08), transparent 64%),
      var(--ui-surface);
    box-shadow:0 18px 60px var(--ui-shadow);
    opacity:0;
    transform:translateX(50%);
    clip-path:inset(calc(50% - var(--login-logo-size)) calc(50% - var(--login-logo-size)) round var(--login-logo-size));
  }
  .login-open .login-brand {
    opacity:1;
    transform:none;
    /* The shadow shows on three sides; the seam with the form stays clean. */
    clip-path:inset(-80px 0 -80px -80px round 16px 0 0 16px);
  }
  .login-slogan {
    margin:0;
    color:var(--ui-ink);
    text-align:center;
    font:550 clamp(16px,1.35vw,20px)/1.65 system-ui,"Segoe UI",sans-serif;
    letter-spacing:-.02em;
    opacity:0;
  }
  .login-open .login-slogan { opacity:1; }
  /* Solid half: slides out from behind the pastel half; the clip keeps it off that half's area. */
  .login-fields {
    display:grid;
    grid-template-columns:min(100%,376px);
    align-content:center;
    justify-content:center;
    padding:32px;
    border:1px solid var(--ui-border);
    border-left:0;
    border-radius:0 16px 16px 0;
    background:var(--ui-workspace);
    box-shadow:0 18px 60px var(--ui-shadow);
    transform:translateX(-100%);
    clip-path:inset(-80px -80px -80px 100%);
  }
  .login-open .login-fields {
    transform:none;
    clip-path:inset(-80px -80px -80px 0);
  }
  .login-fields h1 { text-align:left; }
  .login-mobile-logo { display:none; }
  .login-reveal {
    display:grid;
    place-items:center;
    position:absolute;
    z-index:2;
    left:50%;
    top:50%;
    width:var(--login-logo-size);
    height:var(--login-logo-size);
    padding:10px;
    border:1px solid var(--ui-border);
    border-radius:50%;
    background:var(--ui-workspace);
    box-shadow:0 8px 28px var(--ui-shadow);
    transform:translate(-50%,-50%) scale(2);
  }
  .login-reveal .brand-logo { width:80px; height:auto; }
  .login-reveal:focus-visible { outline:2px solid var(--ui-focus); outline-offset:4px; }
  .login-open .login-reveal {
    left:25%;
    top:34%;
    transform:translate(-50%,-50%) scale(1);
  }
}
#login-feedback {
  color:var(--ui-muted);
  line-height:1.55;
  margin:0 0 12px;
}
#login-feedback:empty { margin:0; }
.login-panel form {
  display:grid;
  gap:14px;
}
.login-panel .primary { justify-content:center; }
.login-field {
  display:grid;
  gap:6px;
}
.login-panel label {
  font-size:13px;
  font-weight:650;
}
.login-panel input:not([type="button"]) {
  width:100%;
  height:44px;
  border:1px solid var(--ui-input-border);
  border-radius:8px;
  padding:0 12px;
  font:inherit;
}
.login-password-field { position:relative; }
.login-panel #login-password { padding-inline-end:48px; }
#login-password::-ms-reveal { display:none; }
#login-password-toggle {
  position:absolute;
  inset-block-start:0;
  inset-inline-end:0;
  width:44px;
  height:44px;
  padding:0;
  border:0;
  border-radius:8px;
  background:transparent;
  cursor:pointer;
}
.login-password-icon {
  position:absolute;
  inset-block-start:12px;
  inset-inline-end:12px;
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.75;
  stroke-linecap:round;
  stroke-linejoin:round;
  color:var(--ui-muted);
  pointer-events:none;
}
#login-password-toggle:is(:hover,:focus-visible) + .login-password-icon { color:var(--ui-ink); }
#login-password[type="password"] ~ .login-password-icon .login-password-slash { display:none; }
input:focus-visible,button:focus-visible {
  outline:3px solid var(--ui-input-border);
  outline-offset:2px;
}
button {
  font:inherit;
  cursor:pointer;
}
button:disabled {
  cursor:not-allowed;
  opacity:.45;
}
.primary {
  background:var(--ui-warning-solid);
  color:var(--ui-on-primary);
  border:0;
  border-radius:8px;
  padding:13px 18px;
  font-weight:700;
  display:flex;
  justify-content:space-between;
}
.primary:hover {
  background:var(--ui-warning-solid);
}
.secondary {
  border:1px solid var(--ui-input-border);
  color:var(--ui-accent);
  background:var(--ui-surface);
  border-radius:8px;
  padding:10px 15px;
  font-size:13px;
  font-weight:700;
}
.secondary:hover:not(:disabled) {
  background:var(--ui-surface-muted);
}
.subtle {
  color:var(--ui-warning-ink);
  background:transparent;
  border:1px solid var(--ui-input-border);
  border-radius:7px;
  padding:8px 12px;
}
.hero {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  margin:0 0 28px;
}
.hero p {
  color:var(--ui-muted);
  margin:0;
}
.stats {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-bottom:20px;
}
.stat,.panel {
  background:var(--ui-surface);
  border:1px solid var(--ui-border);
  border-radius:12px;
  box-shadow:0 5px 24px var(--ui-shadow);
}
.stat {
  padding:23px 25px;
}
.stat span,.stat small {
  display:block;
  color:var(--ui-muted);
  font-size:13px;
}
.stat strong {
  display:block;
  color:var(--ui-accent);
  font-size:34px;
  margin:12px 0 6px;
}
.workspace {
  display:grid;
  grid-template-columns:minmax(300px,42%) minmax(400px,58%);
  gap:20px;
  align-items:start;
}
.panel {
  min-height:390px;
  padding:25px;
}
.panel-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:23px;
}
.panel-head .eyebrow {
  margin-bottom:7px;
}
.orders-list {
  display:grid;
  gap:10px;
}
.order-card {
  text-align:left;
  width:100%;
  border:1px solid var(--ui-border);
  background:var(--ui-surface);
  border-radius:9px;
  padding:17px;
  display:grid;
  gap:10px;
}
.order-card:hover,.order-card.selected {
  border-color:var(--ui-warning-border);
  background:var(--ui-surface);
}
.order-title,.stage-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
}
.order-title strong {
  color:var(--ui-accent);
  font-size:14px;
}
.tag {
  display:inline-block;
  border-radius:50px;
  background:var(--ui-surface-muted);
  color:var(--ui-muted);
  font-size:11px;
  font-weight:700;
  padding:5px 9px;
  white-space:nowrap;
}
.tag.status-COMPLETED {
  background:var(--ui-success-surface);
  color:var(--ui-success-ink);
}
.tag.status-FAILED {
  background:var(--ui-danger-surface);
  color:var(--ui-danger-ink);
}
.tag.status-WAITING,.tag.status-IN_PROGRESS {
  background:var(--ui-warning-surface);
  color:var(--ui-warning-ink);
}
.progress-meta {
  color:var(--ui-muted);
  font-size:12px;
}
progress {
  height:6px;
  width:100%;
  appearance:none;
}
progress::-webkit-progress-bar {
  background:var(--ui-surface-muted);
  border-radius:10px;
}
progress::-webkit-progress-value {
  background:var(--ui-warning-solid);
  border-radius:10px;
}
progress::-moz-progress-bar {
  background:var(--ui-warning-solid);
  border-radius:10px;
}
.pager {
  display:flex;
  justify-content:space-between;
  margin-top:20px;
}
.timeline-list {
  display:grid;
  margin-top:28px;
}
.stage {
  display:flex;
  align-items:stretch;
  gap:18px;
  min-height:76px;
}
.stage-dot {
  flex:none;
  width:13px;
  height:13px;
  border:3px solid var(--ui-border);
  background:var(--ui-surface);
  border-radius:50%;
  margin:5px 0 0 3px;
  position:relative;
}
.stage-dot:after {
  content:"";
  position:absolute;
  left:3px;
  top:14px;
  width:1px;
  height:65px;
  background:var(--ui-surface-muted);
}
.stage:last-child .stage-dot:after {
  display:none;
}
.stage-dot.status-COMPLETED {
  background:var(--ui-success-solid);
  border-color:var(--ui-success-ink);
}
.stage-dot.status-FAILED {
  background:var(--ui-danger-solid);
  border-color:var(--ui-danger-border);
}
.stage-dot.status-IN_PROGRESS,.stage-dot.status-WAITING {
  border-color:var(--ui-warning-border);
}
.stage-body {
  flex:1;
  border-bottom:1px solid var(--ui-border);
  padding-bottom:16px;
}
.stage:last-child .stage-body {
  border-bottom:0;
}
.stage-heading strong {
  font-size:14px;
}
.stage-body small {
  display:block;
  margin-top:7px;
}
.stage-note {
  color:var(--ui-muted);
  margin:7px 0 0;
  font-size:12px;
}
.error-text {
  color:var(--ui-danger-ink);
}
.empty {
  color:var(--ui-muted);
  font-size:14px;
  padding:28px 8px;
  line-height:1.5;
}
@media(max-width:850px) {
  .workspace {
    grid-template-columns:1fr;
  }
  .stats {
    grid-template-columns:1fr 1fr;
  }
  .panel {
    min-height:0;
  }
}
@media(max-width:600px) {
  .topbar {
    padding:0 20px;
    height:72px;
  }
  .topbar .session {
    gap:8px;
  }
  .session span {
    display:none;
  }
  main {
    padding:27px 18px;
  }
  .hero {
    align-items:flex-start;
  }
  .hero .secondary {
    white-space:nowrap;
  }
  .stats {
    grid-template-columns:1fr;
    gap:8px;
  }
  .stat {
    padding:15px 18px;
  }
  .stat strong {
    font-size:24px;
    margin:4px 0;
  }
  .stat small {
    display:none;
  }
  .panel {
    padding:18px;
  }
}
.stage-summary {
  padding:12px 15px;
  border-radius:8px;
  background:var(--ui-surface-muted);
  color:var(--ui-accent);
  font-size:13px;
  font-weight:650;
  margin:0 0 15px;
}
.financial-details {
  padding:13px 15px;
  margin-top:12px;
  border:1px solid var(--ui-border);
  border-radius:8px;
}
.financial-details .section-heading {
  color:var(--ui-accent);
  font-size:13px;
  font-weight:700;
}
.financial-details .timeline-list {
  margin-top:18px;
}
.view-tabs {
  display:flex;
  gap:6px;
  padding:4px;
  background:var(--ui-surface-muted);
  border-radius:9px;
  margin:-8px 0 16px;
}
.view-tab {
  flex:1;
  border:0;
  background:transparent;
  color:var(--ui-muted);
  border-radius:7px;
  padding:9px 10px;
  font-size:12px;
  font-weight:750;
}
.view-tab.active {
  background:var(--ui-surface);
  color:var(--ui-accent);
  box-shadow:0 2px 8px var(--ui-shadow);
}
.queue-card {
  position:relative;
}
.queue-meta {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  align-items:center;
}
.queue-action {
  color:var(--ui-warning-ink);
  background:var(--ui-warning-surface);
  border-radius:6px;
  padding:7px 9px;
  font-size:12px;
  font-weight:750;
}
.queue-age {
  color:var(--ui-muted);
  font-size:12px;
}
.queue-step {
  font-size:13px;
  color:var(--ui-accent);
  font-weight:700;
}
.action-panel {
  border:1px solid var(--ui-border);
  background:var(--ui-surface);
  border-radius:10px;
  padding:17px;
  margin:12px 0 24px;
}
.action-title {
  font-size:16px;
  margin:0 0 9px;
}
.action-panel .muted {
  line-height:1.5;
  margin-bottom:12px;
}
.action-products {
  margin:0 0 12px;
  padding-left:20px;
  font-size:13px;
  line-height:1.7;
}
.action-total {
  font-size:13px;
  font-weight:750;
  color:var(--ui-accent);
}
.action-label {
  display:grid;
  gap:7px;
  font-size:13px;
  font-weight:700;
  color:var(--ui-accent);
  margin:13px 0;
}
.action-reason {
  width:100%;
  font:inherit;
  font-weight:400;
  border:1px solid var(--ui-input-border);
  border-radius:8px;
  padding:10px;
  resize:vertical;
}
.action-reason:focus-visible {
  outline:3px solid var(--ui-input-border);
  outline-offset:2px;
}
.action-buttons {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.action-buttons .primary {
  justify-content:center;
}
.action-buttons button {
  min-width:116px;
}
.planning-form {
  display:grid;
  gap:4px;
}
.action-input {
  min-height:39px;
  width:100%;
  border:1px solid var(--ui-input-border);
  border-radius:8px;
  padding:7px 10px;
  font:inherit;
  font-weight:400;
}
.action-input:focus-visible {
  outline:3px solid var(--ui-input-border);
  outline-offset:2px;
}
.production-form {
  display:grid;
  gap:4px;
  padding:13px 0;
  border-top:1px solid var(--ui-border);
}
.production-form h4,.batch-list h4 {
  margin:7px 0;
  font-size:14px;
}
.production-form .primary,.production-form .secondary {
  justify-self:start;
}
.batch-list {
  display:grid;
  gap:10px;
  margin-top:18px;
}
.batch-card {
  border:1px solid var(--ui-border);
  border-radius:9px;
  background:var(--ui-surface);
  padding:14px;
  min-width:0;
}
.batch-title {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  overflow-wrap:anywhere;
}
.batch-card p {
  margin:9px 0;
  font-size:13px;
  line-height:1.5;
}
.batch-edit {
  margin:12px 0;
}
.batch-edit .section-heading {
  color:var(--ui-accent);
  font-size:13px;
  font-weight:700;
}
.batch-card .action-buttons button {
  min-width:0;
}
.driver-trip {
  border:1px solid var(--ui-border);
  background:var(--ui-surface);
  border-radius:10px;
  padding:16px;
  margin-top:14px;
  min-width:0;
  overflow-wrap:anywhere;
}
.driver-trip-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.driver-trip p {
  font-size:13px;
  line-height:1.6;
}
.driver-product {
  font-weight:700;
  margin:14px 0 4px;
}
.driver-notice {
  margin:12px 0;
  font-size:13px;
}
.driver-receipt-form {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:10px;
  margin-bottom:14px;
}
.driver-receipt-form .action-label {
  margin:8px 0 0;
}
.driver-receipt-form button {
  min-height:44px;
}
.driver-delivery-form {
  border-top:1px solid var(--ui-border);
  margin-top:16px;
  padding-top:12px;
}
.driver-delivery-form h4 {
  font-size:14px;
  margin:0;
}
.driver-issue {
  margin-top:16px;
}
.driver-issue .section-heading {
  font-size:13px;
  font-weight:700;
  color:var(--ui-danger-ink);
}
.driver-trip .action-input {
  min-height:44px;
}
.driver-trip .action-buttons button {
  min-height:44px;
  white-space:normal;
}
.driver-trip .action-reason {
  min-height:72px;
}
@media(max-width:600px) {
  .driver-receipt-form {
    grid-template-columns:1fr;
  }
  .driver-receipt-form button {
    width:100%;
  }
  .driver-trip .action-buttons {
    display:grid;
    grid-template-columns:1fr;
  }
  .driver-trip .action-buttons button {
    width:100%;
    min-width:0;
  }
  .driver-trip {
    padding:14px;
  }
}
/* Shared accessibility foundations;
field roles opt into larger targets. */
:root {
  --control-size:44px;
  --field-control-size:60px;
  --focus-color:var(--ui-focus);
}
html {
  line-height:1.5;
}
main, .workspace, .panel, .stage-body, .order-title, .stage-heading {
  min-width:0;
}
.panel, .order-card, .stage-body, .action-panel {
  overflow-wrap:anywhere;
}
button, input:not([type=hidden]), select, textarea, a {
  min-height:var(--control-size);
  min-width:var(--control-size);
}
button, input, select, textarea {
  font-size:16px;
}
button {
  white-space:normal;
}
select {
  max-width:100%;
}
:focus-visible {
  outline:3px solid var(--focus-color);
  outline-offset:3px;
}
.topbar :focus-visible {
  outline-color:var(--ui-warning-border);
}
.topbar {
  height:auto;
  min-height:84px;
  flex-wrap:wrap;
  padding-top:18px;
  padding-bottom:18px;
  gap:16px;
}
button:disabled {
  opacity:1;
  background:var(--ui-surface-muted);
  color:var(--ui-muted);
}
.workflow-help {
  margin:0 0 20px;
  color:var(--ui-accent);
}
.workflow-help p {
  font-size:14px;
  margin:12px 8px;
}
.muted, .progress-meta, .queue-age {
  font-size:14px;
}
.tag {
  font-size:13px;
}
.action-input, .action-reason {
  min-height:var(--control-size);
  background:var(--ui-surface);
  color:var(--ui-ink);
}
.action-input::placeholder {
  color:var(--ui-muted);
  opacity:1;
}
.action-input[aria-invalid=true], .action-reason[aria-invalid=true],
.login-panel input[aria-invalid=true], .account-form input[aria-invalid=true] {
  border:2px solid var(--ui-danger-border);
}
.field-error {
  display:block;
  color:var(--ui-danger-ink);
  font-size:14px;
  font-weight:600;
  overflow-wrap:anywhere;
}
.numeric, progress, .stat strong, .action-input[inputmode=decimal] {
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum";
}
.metrics {
  margin:12px 0;
  font-size:14px;
}
.metric-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:10px;
  padding:6px 0;
  border-bottom:1px solid var(--ui-border);
  align-items:baseline;
}
.metric-row dt {
  color:var(--ui-muted);
}
.metric-row dd {
  margin:0;
  text-align:right;
  font-weight:650;
  overflow-wrap:anywhere;
}
.action-total {
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:12px;
}
.action-total .numeric {
  margin-left:auto;
  text-align:right;
}
.dispatch-trip {
  display:block;
  border:1px solid var(--ui-border);
  border-radius:10px;
  padding:16px;
  margin-top:14px;
  background:var(--ui-surface);
}
.trip-assignment {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:12px;
  width:100%;
}
.field-mode button, .field-mode input:not([type=hidden]), .field-mode select, .field-mode textarea, .field-mode a {
  min-height:var(--field-control-size);
  min-width:var(--field-control-size);
}
.field-mode .driver-receipt-form button, .field-mode .driver-trip .action-input, .field-mode .driver-trip .action-buttons button {
  min-height:var(--field-control-size);
}
.skip-link {
  position:absolute;
  top:8px;
  left:8px;
  transform:translateY(-180%);
  z-index:10;
  padding:12px 16px;
  border-radius:6px;
  background:var(--ui-surface);
  color:var(--ui-accent);
  min-height:44px;
}
.skip-link:focus {
  transform:none;
}
.field-mode .skip-link {
  min-height:60px;
}
.ui-dialog {
  width:min(560px,calc(100% - 24px));
  max-height:calc(100dvh - 32px);
  padding:24px;
  border:1px solid var(--ui-input-border);
  border-radius:12px;
  background:var(--ui-surface);
  color:var(--ui-ink);
  overflow:auto;
}
.ui-dialog::backdrop {
  background:var(--ui-overlay);
}
.ui-dialog h2 {
  font-size:22px;
  margin:0 0 12px;
}
.dialog-description {
  white-space:pre-line;
  overflow-wrap:anywhere;
}
.ui-dialog .action-buttons {
  justify-content:flex-end;
  margin-top:20px;
}
[aria-busy=true] {
  cursor:progress;
}
@media(max-width:600px) {
  .topbar {
    height:auto;
    min-height:72px;
    padding-top:14px;
    padding-bottom:14px;
  }
  .hero, .panel-head, .order-title, .stage-heading {
    flex-wrap:wrap;
  }
  .action-buttons {
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }
  .action-buttons button, .production-form button {
    width:100%;
    min-width:0;
  }
  .trip-assignment {
    grid-template-columns:1fr;
  }
  .driver-receipt-form {
    grid-template-columns:1fr;
  }
  .ui-dialog {
    padding:18px;
  }
}
@media(forced-colors:active) {
  button, input, select, textarea, .tag {
    border:1px solid ButtonText;
  }
  :focus-visible {
    outline-color:Highlight;
  }
}

.hero-controls {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.work-shortcut {
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}
@media(max-width:600px) {
  .field-mode .stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.acceptance-form { display:grid; gap:12px; margin-top:12px; min-width:0; }
.acceptance-form textarea { min-height:88px; resize:vertical; }
.acceptance-form .action-label { min-width:0; }
.acceptance-form .action-label > input, .acceptance-form .action-label > textarea { width:100%; max-width:100%; box-sizing:border-box; }
#acceptance-workspace .trip-card { margin:12px 0; }
#acceptance-workspace h4 { overflow-wrap:anywhere; }
.finance-form { display:grid; gap:12px; margin-top:12px; min-width:0; }
.finance-form textarea { min-height:88px; resize:vertical; }
.finance-form .action-label { min-width:0; }
.finance-form .action-label > input, .finance-form .action-label > textarea, .finance-form .action-label > select { width:100%; max-width:100%; box-sizing:border-box; }
#finance-workspace .trip-card { margin:12px 0; }
#finance-workspace h4 { overflow-wrap:anywhere; }
.sales-form { display:grid; gap:12px; margin-top:12px; min-width:0; }
.sales-form textarea { min-height:88px; resize:vertical; }
.sales-form .action-label { min-width:0; }
.sales-form .action-label > input, .sales-form .action-label > textarea, .sales-form .action-label > select { width:100%; max-width:100%; box-sizing:border-box; }
.sales-line { min-width:0; margin:12px 0; padding:12px; }
.sales-line legend { padding:0 6px; font-weight:700; }
.sales-line .action-label { display:grid; gap:6px; margin-bottom:12px; }
.sales-preview { min-width:0; }
.catalog-pages { display:grid; gap:8px; }

#master-data-workspace, #dispatch-catalog-workspace { margin-bottom:20px; }
.master-data-details { margin:0; }
.master-data-content { min-width:0; padding-top:12px; }
.master-data-grid { display:grid; grid-template-columns:minmax(230px,1fr) minmax(0,2fr); gap:20px; margin-top:16px; }
.master-data-grid > section { min-width:0; }
.master-data-grid h3 { margin:0 0 12px; }
.master-data-list .trip-card { margin:12px 0; overflow-wrap:anywhere; }
.master-data-form { display:grid; gap:10px; min-width:0; }
.master-data-form .action-label { min-width:0; }
.master-data-form .action-label > input, .master-data-form .action-label > textarea, .master-data-form .action-label > select { width:100%; max-width:100%; box-sizing:border-box; }
.master-data-form textarea { min-height:88px; resize:vertical; }
@media (max-width:720px) { .master-data-grid { grid-template-columns:minmax(0,1fr); } }
@media (max-width:720px) {
  .master-data-form .pager, #dispatch-workspace .pager { flex-wrap:wrap; gap:8px; }
  .master-data-form .pager > span, #dispatch-workspace .pager > span { flex-basis:100%; }
  .master-data-form .pager > button, #dispatch-workspace .pager > button { flex:1 1 100px; overflow-wrap:normal; }
}


/* Action feedback floats above content without changing its geometry. */
.action-notice {
  position:fixed; inset:auto; z-index:10000; margin:0;
  box-sizing:border-box; width:max-content; max-width:min(360px,calc(100vw - 24px));
  padding:10px 14px; border:1px solid var(--ui-success-ink); border-radius:8px;
  background:var(--ui-success-surface); color:var(--ui-success-ink); box-shadow:0 6px 24px var(--ui-shadow);
  font:500 var(--ui-text,14px)/1.5 var(--ui-font-family,"Segoe UI",Arial,sans-serif);
  overflow-wrap:anywhere; overflow:auto; pointer-events:none;
}
.action-notice.is-error { background:var(--ui-danger-surface); border-color:var(--ui-danger-border); color:var(--ui-danger-ink); }
.notification-source[hidden], .field-error[hidden] { display:none!important; }
