/* EVAC DNP — Option A: Stylish Neutral 2026
   Graphite, warm grey and restrained olive accents.
   Shared visual layer only: no PHP, database or business logic is changed. */
:root {
  color-scheme: dark;
  --ev-bg: #222426;
  --ev-bg-soft: #27292a;
  --ev-surface: #2d3031;
  --ev-surface-2: #353839;
  --ev-surface-3: #404343;
  --ev-line: #4b4246;
  --ev-text: #f3f1e9;
  --ev-muted: #c2c0b7;
  --ev-olive: #982b43;
  --ev-olive-light: #c45b72;
  --ev-olive-dark: #681b30;
  --ev-olive-soft: rgba(152, 43, 67, .16);
  --ev-success: #78a88b;
  --ev-warning: #c9ac72;
  --ev-danger: #c87b72;
  --ev-radius: 11px;
  --ev-shadow: 0 10px 26px rgba(0, 0, 0, .16);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  color: var(--ev-text) !important;
  background: radial-gradient(ellipse at 12% 0%, rgba(152,43,67,.10), transparent 34rem),
              linear-gradient(145deg, #292b2c 0%, #222426 55%, #242627 100%) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { color: #fff; background: rgba(196,76,103,.42); }

header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 15px clamp(16px, 3vw, 36px) !important;
  color: var(--ev-text) !important;
  background: rgba(29,31,31,.97) !important;
  border: 0 !important;
  border-bottom: 1px solid #494b45 !important;
  box-shadow: 0 5px 16px rgba(0,0,0,.11);
  backdrop-filter: blur(10px);
}
header strong, header .logo, header .brand {
  color: var(--ev-text) !important;
  letter-spacing: -.02em;
  font-weight: 800 !important;
}
.logo span, .brand span { color: var(--ev-olive-light) !important; }

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px 12px;
  flex-wrap: wrap;
  text-align: left !important;
}
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 7px;
  color: #e1dfd6 !important;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
nav a:hover { color: var(--ev-olive-light) !important; background: rgba(146,151,101,.12); }
a { color: #c5c99c !important; text-decoration: none; transition: color .18s ease; }
a:hover { color: #e0e4b7 !important; text-decoration: none; }

main {
  width: min(1440px, calc(100% - 40px)) !important;
  max-width: 1440px !important;
  margin: 27px auto 42px !important;
  padding: 0 !important;
}
.container { max-width: 1050px !important; margin: 27px auto 42px !important; }
h1, h2, h3, h4 { color: var(--ev-text) !important; letter-spacing: -.02em; line-height: 1.3; }
h1 { font-size: clamp(1.5rem, 2.2vw, 2.05rem) !important; font-weight: 780 !important; margin: 0 0 12px; }
h2 { font-size: clamp(1.1rem, 1.5vw, 1.32rem) !important; font-weight: 720 !important; margin-top: 0; }
h3 { font-size: 1.02rem !important; font-weight: 720 !important; }
p { color: inherit; }
.muted, .small, .subtitle, .label, small { color: var(--ev-muted) !important; }

.card, .panel, .section, .form-section, .summary-card, .notice, .box, .metric {
  color: var(--ev-text) !important;
  background: linear-gradient(145deg, rgba(52,55,55,.98), rgba(43,46,46,.98)) !important;
  border: 1px solid var(--ev-line) !important;
  border-radius: var(--ev-radius) !important;
  box-shadow: var(--ev-shadow);
}
.card, .panel { padding: clamp(16px, 2vw, 22px) !important; }
.card h2, .panel h2, .section h2 { color: #c4c8a0 !important; }
.grid, .cards, .stats, .metrics { gap: 14px !important; }

input, select, textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  margin-top: 5px;
  padding: 10px 12px !important;
  color: var(--ev-text) !important;
  background: #242627 !important;
  border: 1px solid #5a5d58 !important;
  border-radius: 7px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  font: inherit !important;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input::placeholder, textarea::placeholder { color: #aaa99f !important; }
input:focus, select:focus, textarea:focus {
  border-color: var(--ev-olive-light) !important;
  box-shadow: 0 0 0 3px rgba(152,43,67,.17) !important;
}
input[type="checkbox"], input[type="radio"] { display: inline-block; width: auto; min-height: 0; accent-color: var(--ev-olive-light); }
input[type="date"] { color-scheme: dark; }
label { display: block; color: #dfddd4 !important; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }

/* Main actions: muted olive with dark, readable text. */
button, input[type="submit"], input[type="button"], .button, a.button,
.btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px !important;
  color: #171910 !important;
  background: linear-gradient(135deg, #929765, #a2a779) !important;
  border: 1px solid rgba(211,124,144,.46) !important;
  border-radius: 7px !important;
  box-shadow: 0 3px 8px rgba(0,0,0,.12);
  font: inherit !important;
  font-weight: 720 !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .17s ease, filter .17s ease, box-shadow .17s ease, background .17s ease;
}
button:hover, input[type="submit"]:hover, input[type="button"]:hover,
.button:hover, a.button:hover, .btn:hover, a.btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(0,0,0,.18);
  color: #11130b !important;
}
button:active, input[type="submit"]:active, .button:active, a.button:active { transform: translateY(0); }
button:disabled, input:disabled, select:disabled { opacity: .58; cursor: not-allowed; }

/* Explicit action styles prevent inline green Edit links from becoming unreadable. */
a[href*="order-edit.php"], a[href*="edit"], a.edit, a.edit-link, .edit-link, .btn-edit,
button.edit, .edit-button {
  color: #f0eee5 !important;
  background: linear-gradient(135deg, #55584f, #66695c) !important;
  border: 1px solid #7d806d !important;
  border-radius: 7px !important;
  text-decoration: none !important;
}
a[href*="order-details.php"], a.details, a.detail-link, .details-link, .btn-details {
  color: #171910 !important;
  background: linear-gradient(135deg, #929765, #a2a779) !important;
  border: 1px solid rgba(211,124,144,.46) !important;
  border-radius: 7px !important;
  text-decoration: none !important;
}
button.secondary, .secondary, .btn-secondary, a.secondary {
  color: #eeeDE5 !important; background: #4a4d49 !important; border-color: #62655f !important; box-shadow: none;
}
button.cancel, .cancel, button.danger, .danger, .btn-danger {
  color: #fff !important; background: #8c4b45 !important; border-color: #a6655e !important;
}

form { gap: 14px; }
form.filters, .filters { display: flex; gap: 12px 16px; flex-wrap: wrap; align-items: end; }
form.filters > div, .filters > div { min-width: min(220px, 100%); }
form label { margin-top: 8px; }
.table-wrap { width: 100%; overflow-x: auto; border-radius: 9px; }
table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0;
  color: var(--ev-text) !important;
  background: rgba(32,34,34,.36) !important;
  border-radius: 9px;
  overflow: hidden;
}
thead { background: #3a3d3b !important; }
th {
  color: #dedfc9 !important;
  background: #3a3d3b !important;
  font-size: .78rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
th, td { padding: 10px 11px !important; border-bottom: 1px solid rgba(100,103,96,.48) !important; text-align: left; vertical-align: top; }
tbody tr:nth-child(even) { background: rgba(255,255,255,.018) !important; }
tbody tr:hover { background: rgba(152,43,67,.10) !important; }
tbody tr:last-child td { border-bottom: 0 !important; }

.value, .number, .stat { color: #d2d5ad !important; font-variant-numeric: tabular-nums; }
.success, .notice.success, .message-success {
  color: #d5e8d8 !important; background: rgba(59,105,72,.28) !important;
  border: 1px solid rgba(122,166,137,.42) !important; border-radius: 8px !important; padding: 12px 15px !important;
}
.error, .alert-danger, .message-error {
  color: #f1d5d1 !important; background: rgba(137,62,57,.23) !important;
  border: 1px solid rgba(188,102,94,.4) !important; border-radius: 8px !important; padding: 12px 15px !important;
}
.warning, .notice.warning { color: #efe1c4 !important; background: rgba(150,112,57,.2) !important; border: 1px solid rgba(175,137,79,.32) !important; }
.badge, .pill, .status-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  color: #e1e4c9 !important; background: rgba(152,43,67,.18) !important;
  border: 1px solid rgba(196,76,103,.32); font-size: .78rem; font-weight: 700;
}
hr { border: 0; border-top: 1px solid var(--ev-line); margin: 20px 0; }
code, pre { color: #e3e1d5; background: #242627; border: 1px solid var(--ev-line); border-radius: 7px; }
:focus-visible { outline: 2px solid #b5ba89; outline-offset: 3px; }

/* Subtle, low-motion animation for a calm dispatch workspace. */
@keyframes evacFadeUp { from { opacity: 0; transform: translate3d(0,5px,0); } to { opacity: 1; transform: translate3d(0,0,0); } }
@keyframes evacHeaderIn { from { opacity: .8; transform: translate3d(0,-3px,0); } to { opacity: 1; transform: translate3d(0,0,0); } }
body { position: relative; isolation: isolate; }
body > header { animation: evacHeaderIn .28s ease-out both; }
main, .container { animation: evacFadeUp .34s .02s ease-out both; }
.card, .panel, .section, .form-section, .summary-card, .notice, .box, .metric {
  animation: evacFadeUp .3s ease-out both;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.grid > .card:nth-child(1), .cards > .card:nth-child(1), .stats > .card:nth-child(1) { animation-delay: .025s; }
.grid > .card:nth-child(2), .cards > .card:nth-child(2), .stats > .card:nth-child(2) { animation-delay: .05s; }
.grid > .card:nth-child(3), .cards > .card:nth-child(3), .stats > .card:nth-child(3) { animation-delay: .075s; }
.grid > .card:nth-child(4), .cards > .card:nth-child(4), .stats > .card:nth-child(4) { animation-delay: .1s; }
.grid > .card:nth-child(5), .cards > .card:nth-child(5), .stats > .card:nth-child(5) { animation-delay: .125s; }
.grid > .card:nth-child(6), .cards > .card:nth-child(6), .stats > .card:nth-child(6) { animation-delay: .15s; }
@media (hover: hover) and (pointer: fine) {
  .card:hover, .panel:hover, .section:hover, .form-section:hover, .summary-card:hover, .notice:hover, .box:hover, .metric:hover {
    transform: translateY(-1px);
    border-color: rgba(196,76,103,.42) !important;
    box-shadow: 0 12px 27px rgba(0,0,0,.2);
  }
}
@media (max-width: 780px) {
  header { align-items: flex-start; }
  nav { justify-content: flex-start; }
  main { width: calc(100% - 28px) !important; margin: 20px auto 32px !important; }
  .container { width: calc(100% - 28px) !important; margin: 20px auto 32px !important; }
  .card, .panel { padding: 15px !important; border-radius: 10px !important; }
  .grid, .cards, .stats, .metrics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) !important; }
  th, td { padding: 9px 10px !important; }
  nav a { padding: 4px 6px; }
}
@media (max-width: 480px) {
  h1 { font-size: 1.45rem !important; }
  form.filters > div, .filters > div { width: 100%; }
  button, input[type="submit"], input[type="button"] { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    will-change: auto !important;
  }
}


/* EVAC DNP release: restrained burgundy accents, readable type, no business-logic changes. */
:root {
  --ev-olive: #982b43;
  --ev-olive-light: #c45b72;
  --ev-olive-dark: #681b30;
  --ev-olive-soft: rgba(152,43,67,.16);
  --ev-line: #4b4246;
}
body {
  font-size: 15px !important;
  line-height: 1.6 !important;
}
h1 { font-size: clamp(1.65rem, 2.3vw, 2.15rem) !important; line-height: 1.25 !important; }
h2 { font-size: clamp(1.2rem, 1.6vw, 1.5rem) !important; line-height: 1.3 !important; }
h3 { font-size: 1.08rem !important; }
label, .help, .muted, .small, .notice, .error { line-height: 1.55 !important; }
label { font-size: 14px !important; font-weight: 650 !important; }
input, select, textarea { font: inherit !important; min-height: 42px; }
textarea { min-height: 90px; }
button, input[type="submit"], input[type="button"], a.button {
  background: #982b43 !important;
  color: #fff !important;
  border-color: #b64b63 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  transition: background .15s ease, border-color .15s ease, transform .15s ease !important;
}
button:hover, input[type="submit"]:hover, a.button:hover {
  background: #7e2037 !important;
}
button:disabled, input:disabled, select:disabled {
  opacity: .55;
  cursor: not-allowed;
}
a { color: #d77b91 !important; }
a:hover { color: #f0b4c2 !important; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(196,76,103,.65) !important;
  outline-offset: 1px;
  border-color: #b64b63 !important;
}
.card, .panel, .section, .form-section, .summary-card, .box, .metric {
  border-color: #4b4246 !important;
}
table { font-size: 13.5px !important; }
th { font-size: 12.5px !important; line-height: 1.4 !important; }
td { font-size: 13.5px !important; line-height: 1.5 !important; }
th, td { padding: 11px 12px !important; }
header { border-bottom-color: #7d263d !important; }
.logo span, .brand span { color: #d36a82 !important; }

/* Keep the driver cabin light and calm, but align its controls with the brand. */
body.driver-cabin {
  background: #f4f2f3 !important;
  color: #292529 !important;
}
body.driver-cabin header {
  background: #211d20 !important;
  color: #f7f3f4 !important;
  border-bottom: 3px solid #982b43 !important;
}
body.driver-cabin .panel {
  background: #fffdfd !important;
  border-color: #e1d7da !important;
  color: #292529 !important;
}
body.driver-cabin .metric {
  background: #f1eaed !important;
  border-color: #dfd1d6 !important;
}
body.driver-cabin .metric span, body.driver-cabin .small {
  color: #62575b !important;
}
body.driver-cabin .metric strong { color: #42212d !important; }
body.driver-cabin .notice {
  background: #f5e7eb !important;
  color: #63263a !important;
  border: 1px solid #e5c5cf !important;
}
body.driver-cabin .error {
  background: #f8e5e7 !important;
  color: #7e2037 !important;
}
body.driver-cabin a { color: #8e263e !important; }
body.driver-cabin header a { color: #f0c6d0 !important; }
body.driver-cabin th {
  background: #eee5e8 !important;
  color: #562738 !important;
}
body.driver-cabin td { border-bottom-color: #e7dce0 !important; }
body.driver-cabin .shift-form .secondary {
  background: #eee8ea !important;
  color: #342d30 !important;
  border: 1px solid #d6c7cd !important;
}
body.driver-cabin .actions .danger, body.driver-cabin button.danger {
  background: #5c343e !important;
  border-color: #74404d !important;
}
.review-actions { display: grid; gap: 7px; min-width: 180px; }
.review-actions label { margin: 4px 0 0; }
.review-actions button { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid > div { min-width: 0; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.filters label { display: block; }
.filters input, .filters select { min-width: 150px; }
@media (max-width: 760px) {
  body { font-size: 15px !important; }
  main { width: calc(100% - 24px) !important; margin: 18px auto 28px !important; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .card, .panel, .section, .form-section { padding: 15px !important; }
  th, td { padding: 10px !important; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  nav { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
