@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0f766e;
  --accent-strong: #134e4a;
  --accent-soft: #ccfbf1;
  --accent-wash: rgba(15, 118, 110, 0.1);
  --warning: #f97316;
  --warning-soft: rgba(249, 115, 22, 0.12);
  --danger: #b91c1c;
  --border: #e2e8f0;
  --card: #ffffff;
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 18px 44px rgba(15, 23, 42, 0.08);
}

body {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 42%, #f1f5f9 100%);
  color: var(--text);
}

h1,
h2,
h3,
.brand,
.nav-label,
.dashboard-kpi strong {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: 0;
}

.site-header {
  min-height: 72px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 36px -30px rgba(15, 23, 42, 0.45);
}

.brand {
  text-transform: none;
  letter-spacing: 0;
  font-size: 18px;
  color: var(--text);
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: none;
}

.main-nav {
  gap: 8px;
}

.nav-group {
  padding: 4px;
  gap: 6px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.nav-label {
  padding: 0 8px;
  color: #94a3b8;
  font-size: 10px;
}

.main-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  box-shadow: none;
}

.main-nav a:hover {
  color: var(--accent);
  background: var(--accent-wash);
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.main-nav a.is-active {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
  box-shadow: 0 10px 22px -16px rgba(15, 23, 42, 0.85);
}

.nav-meta .chip,
.chip {
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.content {
  padding: 24px;
}

.card,
.wizard-card,
.map-panel,
.rider-panel,
.rider-card,
.telephony-row,
.order-card,
.context-bar__item,
.insight-card,
.dashboard-card {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.dashboard-shell {
  gap: 18px;
}

.dashboard-hero {
  padding: 22px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 118, 110, 0.88));
  color: #e2e8f0;
  border: 1px solid rgba(15, 118, 110, 0.25);
  box-shadow: var(--shadow-card);
}

.dashboard-hero h1,
.dashboard-hero .eyebrow {
  color: #ffffff;
}

.dashboard-hero .muted,
.dashboard-hero .kpi-meta {
  color: #cbd5e1;
}

.dashboard-hero__title h1 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
  margin: 6px 0 8px;
}

.eyebrow {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.14);
  color: var(--accent);
  border: 1px solid rgba(20, 184, 166, 0.22);
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.dashboard-hero .eyebrow {
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.14);
}

.dashboard-hero__kpis {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.dashboard-kpi {
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.dashboard-kpi span {
  color: #cbd5e1;
  letter-spacing: 0.08em;
}

.dashboard-kpi strong {
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
}

.ops-command-center {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: stretch;
}

.ops-command-main,
.ops-live-riders {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  padding: 18px;
}

.ops-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.ops-flow-card {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
}

.ops-flow-card span,
.ops-flow-card small {
  color: var(--muted);
}

.ops-flow-card span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-flow-card strong {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 34px;
  line-height: 1;
  color: var(--text);
}

.ops-flow-card small {
  line-height: 1.35;
}

.ops-live-riders__head,
.ops-rider-row,
.ops-rider-row__meta {
  display: flex;
  align-items: center;
}

.ops-live-riders__head {
  justify-content: space-between;
  margin-bottom: 10px;
}

.ops-live-riders__head h3 {
  margin: 0;
}

.ops-rider-row {
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.ops-rider-row > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ops-rider-row strong,
.ops-rider-row span,
.ops-rider-row small {
  overflow-wrap: anywhere;
}

.ops-rider-row span,
.ops-rider-row small {
  color: var(--muted);
  font-size: 12px;
}

.ops-rider-row__meta {
  flex: 0 0 112px;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.ops-rider-row--route {
  border-left: 4px solid #14b8a6;
  padding-left: 10px;
}

.ops-rider-row--assigned {
  border-left: 4px solid #8b5cf6;
  padding-left: 10px;
}

.ops-rider-row--online {
  border-left: 4px solid #22c55e;
  padding-left: 10px;
}

.ops-rider-row--warn {
  border-left: 4px solid var(--warning);
  padding-left: 10px;
}

.ops-rider-row--off {
  opacity: 0.68;
}

.danger-text {
  color: var(--danger) !important;
  font-weight: 800;
}

.ops-print-choice {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: rgba(240, 253, 250, 0.74);
}

button,
.button,
a.button {
  min-height: 40px;
  border-radius: 10px;
  background: var(--text);
  color: #ffffff;
  border: 1px solid var(--text);
  box-shadow: 0 14px 28px -20px rgba(15, 23, 42, 0.65);
  font-weight: 800;
}

button:hover,
.button:hover,
a.button:hover {
  transform: translateY(-1px);
  filter: none;
  background: #020617;
  box-shadow: 0 18px 30px -22px rgba(15, 23, 42, 0.75);
}

.dashboard-hero .button {
  background: #ffffff;
  color: var(--text);
  border-color: #ffffff;
}

.ghost-button,
.context-bar__btn.ghost,
a.ghost-button {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: var(--text);
  background: #ffffff;
  box-shadow: none;
  font-weight: 800;
}

.dashboard-hero .ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

button.danger,
.danger {
  background: #b91c1c;
  border-color: #b91c1c;
  box-shadow: 0 14px 28px -20px rgba(185, 28, 28, 0.65);
}

select,
input,
textarea {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.ops-column {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
  box-shadow: none;
}

.ops-column::before {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.ops-column__head .badge {
  background: var(--text);
  color: #ffffff;
}

.order-card {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  border-left: 6px solid #94a3b8;
}

.dashboard-shell .ops-board,
.ops-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
  gap: 10px;
  overflow: visible;
  padding-bottom: 8px;
  align-items: start;
}

.dashboard-shell .ops-column,
.ops-column {
  min-width: 0;
  padding: 8px;
  border-radius: 10px;
}

.ops-column:not(.has-visible-cards) {
  display: none;
}

.ops-column__list {
  max-height: min(70vh, 760px);
  overflow: auto;
  padding-right: 2px;
}

.ops-cleanup-note {
  flex: 1 1 100%;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
}

.rush-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
}

.rush-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.rush-panel__head h3 {
  margin: 0;
}

.rush-table {
  display: grid;
  gap: 4px;
  max-height: 460px;
  overflow: auto;
}

.rush-row {
  display: grid;
  grid-template-columns: 0.8fr 0.7fr 0.7fr 1fr 1fr 1.4fr;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
  font-size: 12px;
}

.rush-row--head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
}

.rush-row strong,
.rush-row small {
  display: block;
}

.rush-row small {
  color: #64748b;
  font-size: 10px;
}

.rush-row--head small {
  color: #cbd5e1;
}

.rush-row--pending {
  border-left: 4px solid #94a3b8;
}

.rush-row--started {
  border-left: 4px solid #f59e0b;
}

.rush-row--ready {
  border-left: 4px solid #16a34a;
}

.order-card.compact {
  padding: 9px;
  gap: 7px;
}

.order-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.order-card__head > div:first-child {
  min-width: 0;
}

.order-card__head h3 {
  line-height: 1.15;
}

.order-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-card[data-status-group="NEW"] {
  border-left-color: #ef4444;
  background: linear-gradient(90deg, rgba(254, 226, 226, 0.68), #ffffff 30%);
}

.order-card[data-status-group="KITCHEN"] {
  border-left-color: #f97316;
  background: linear-gradient(90deg, rgba(255, 237, 213, 0.78), #ffffff 30%);
}

.order-card[data-status-group="READY"] {
  border-left-color: #2563eb;
  background: linear-gradient(90deg, rgba(219, 234, 254, 0.78), #ffffff 30%);
}

.order-card[data-status-group="ASSIGNED"] {
  border-left-color: #7c3aed;
  background: linear-gradient(90deg, rgba(237, 233, 254, 0.72), #ffffff 30%);
}

.order-card[data-status-group="ROUTE"] {
  border-left-color: #0f766e;
  background: linear-gradient(90deg, rgba(204, 251, 241, 0.72), #ffffff 30%);
}

.order-card[data-status-group="DONE"] {
  border-left-color: #16a34a;
  background: linear-gradient(90deg, rgba(220, 252, 231, 0.62), #ffffff 30%);
}

.order-card[data-fulfillment="PICKUP"] {
  border-left-color: #a16207;
  border-top: 3px solid #facc15;
  background: linear-gradient(90deg, rgba(254, 249, 195, 0.7), #ffffff 32%);
}

.order-card[data-fulfillment="PICKUP"][data-status-group="READY"] {
  border-left-color: #ca8a04;
  background: linear-gradient(90deg, rgba(254, 240, 138, 0.82), #ffffff 32%);
}

.order-card[data-fulfillment="PICKUP"][data-status-group="DONE"] {
  border-left-color: #65a30d;
  border-top-color: #bef264;
  background: linear-gradient(90deg, rgba(236, 252, 203, 0.7), #ffffff 32%);
}

.order-card[data-fulfillment="DELIVERY"] {
  border-bottom: 3px solid rgba(15, 118, 110, 0.16);
}

.order-card.is-scheduled-due {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.22), 0 10px 22px rgba(15, 23, 42, 0.05);
}

.order-card.is-scheduled-late {
  border-left-color: #dc2626;
  background: linear-gradient(90deg, rgba(254, 202, 202, 0.72), #ffffff 34%);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2), 0 12px 24px rgba(127, 29, 29, 0.08);
}

.order-card.is-scheduled-expired {
  border-left-color: #7f1d1d;
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.18), #ffffff 36%);
  opacity: 0.88;
}

.dashboard-shell .order-card:hover,
.order-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.08);
}

.status-pill,
.pill {
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.pill-delivery {
  background: var(--accent-wash);
  color: var(--accent-strong);
}

.pill-pickup {
  background: rgba(254, 240, 138, 0.8);
  color: #854d0e;
  border-color: rgba(202, 138, 4, 0.22);
}

.pill-ok {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.pill-warn {
  background: var(--warning-soft);
  color: #9a3412;
}

.order-timer {
  background: var(--accent-wash);
  color: var(--accent-strong);
  border: 1px solid rgba(15, 118, 110, 0.12);
  display: grid;
  gap: 1px;
  min-width: 88px;
  max-width: 110px;
  text-align: right;
  line-height: 1.1;
  white-space: normal;
}

.order-card[data-fulfillment="PICKUP"] .order-timer {
  background: rgba(254, 240, 138, 0.62);
  color: #854d0e;
  border-color: rgba(202, 138, 4, 0.22);
}

.order-card[data-fulfillment="PICKUP"] .order-timer.is-pickup-late {
  background: rgba(251, 146, 60, 0.2);
  color: #9a3412;
  border-color: rgba(234, 88, 12, 0.25);
}

.order-card[data-fulfillment="DELIVERY"] .order-timer.is-late {
  background: rgba(239, 68, 68, 0.18);
  color: #991b1b;
  border-color: rgba(220, 38, 38, 0.22);
}

.order-time-stack {
  display: grid;
  gap: 3px;
  justify-items: end;
  flex: 0 0 auto;
}

.order-timer span,
.order-total-age {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.order-timer strong,
.order-total-age strong {
  font-size: 11px;
  color: inherit;
}

.order-total-age {
  text-align: right;
  text-transform: none;
}

.order-card__ops {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 10px;
  color: #475569;
  max-height: 48px;
  overflow: hidden;
}

.order-card__ops span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  padding: 3px 6px;
}

.pill-scheduled {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.pill-packages {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

.pill-packages.is-heavy {
  background: rgba(124, 58, 237, 0.14);
  color: #6d28d9;
}

.pill-distance--near {
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
}

.pill-distance--mid {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
}

.pill-distance--far {
  background: rgba(239, 68, 68, 0.14);
  color: #991b1b;
}

.pill-route-group {
  background: rgba(14, 165, 233, 0.14);
  color: #075985;
}

.pill-route-time {
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}

.pill-route-neighbor {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
}

.pill-route-corridor {
  background: rgba(249, 115, 22, 0.16);
  color: #9a3412;
}

.pill-kitchen--pending {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.pill-kitchen--started {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
}

.pill-kitchen--ready {
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
}

.pill-kitchen-target {
  background: rgba(14, 165, 233, 0.12);
  color: #075985;
}

.time-state {
  font-weight: 800;
}

.time-state--late {
  color: #dc2626;
}

.time-state--urgent {
  color: #ea580c;
}

.time-state--soon {
  color: #b45309;
}

.time-state--ok {
  color: #047857;
}

.ops-group-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.ops-group-card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: #ffffff;
  padding: 12px;
}

.ops-group-card__head,
.ops-group-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ops-group-card__head {
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.1);
}

.ops-group-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.ops-group-row {
  padding: 8px;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.8);
}

.ops-group-row span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.ops-group-orders {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.ops-group-orders a {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 4px 7px;
  color: #111827;
  text-decoration: none;
  font-weight: 800;
  background: #ffffff;
}

.ops-shell--primary {
  border-color: rgba(17, 24, 39, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 246, 0.94));
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.ops-shell--primary .ops-header {
  align-items: center;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding-bottom: 12px;
}

.ops-shell--primary .ops-header h2 {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.02;
}

.ops-shell--primary .ops-actions .button,
.ops-shell--primary .ops-actions .ghost-button {
  min-height: 46px;
  border-radius: 8px;
  padding: 11px 18px;
}

.ops-toolbar {
  border-radius: 8px;
  border-color: rgba(17, 24, 39, 0.1);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
}

.ops-filters .chip {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #ffffff;
}

.ops-filters .chip.is-active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.ops-search {
  min-height: 42px;
  border-radius: 8px;
  background: #ffffff;
}

.rush-panel,
.ops-group-card {
  border-radius: 8px;
  border-color: rgba(17, 24, 39, 0.1);
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.rush-panel__head h3,
.ops-group-card__head strong {
  font-size: 18px;
}

.rush-row {
  min-height: 48px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fbfcfb;
}

.rush-row:not(.rush-row--head):hover {
  background: #eef8f6;
}

.rush-row--head {
  min-height: 34px;
  background: #111827;
  border-color: #111827;
}

.ops-group-row {
  min-height: 50px;
  background: #fbfcfb;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ops-group-orders a:hover {
  border-color: rgba(15, 118, 110, 0.35);
  color: #0f766e;
  background: rgba(15, 118, 110, 0.08);
}

.dashboard-shell .ops-column,
.ops-column {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
}

.ops-column__head {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffffff;
}

.order-card {
  border-radius: 8px;
  border-left-width: 4px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.order-card__head h3 {
  font-size: 18px;
}

.order-time-stack {
  min-width: 118px;
}

.order-timer,
.order-total-age {
  min-width: 106px;
  border-radius: 8px;
  padding: 6px 8px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.07);
}

.order-timer span,
.order-total-age {
  font-size: 9px;
}

.order-timer strong,
.order-total-age strong {
  font-size: 12px;
}

.order-card__actions button,
.order-card__actions .button,
.order-card__actions .ghost-button,
.primary-actions button,
.primary-actions .button {
  min-height: 38px;
  border-radius: 8px;
}

.pill,
.status-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.order-card__details {
  line-height: 1.35;
  display: grid;
  gap: 3px;
}

.order-card__details div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-card__actions,
.primary-actions,
.order-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-card__actions {
  flex-direction: column;
}

.primary-actions button,
.primary-actions .button,
.order-card__links .ghost-button.small {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.1;
}

.order-card details.order-details {
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
  padding-top: 6px;
}

.order-card details.order-details summary {
  cursor: pointer;
  font-weight: 800;
}

.insight-card {
  background: #ffffff;
}

.insight-label {
  color: #94a3b8;
  letter-spacing: 0.12em;
}

.context-bar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.ops-secondary-panel {
  display: none;
}

.quick-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.quick-category-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.quick-category-card__form {
  grid-template-columns: minmax(150px, 1.3fr) repeat(3, minmax(76px, 0.7fr));
  gap: 8px;
}

.shift-config-row {
  align-items: end;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(248, 250, 252, 0.75);
}

.wizard-config-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: #ffffff;
}

.wizard-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.wizard-module-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 6px 10px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.8);
}

.wizard-module-card strong,
.wizard-module-card span {
  grid-column: 2;
}

.wizard-module-card span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.wizard-module-card.is-active {
  border-color: rgba(20, 184, 166, 0.45);
  background: rgba(20, 184, 166, 0.08);
}

.wizard-module-card--future {
  border-style: dashed;
}

.is-module-disabled {
  opacity: 0.48;
}

.wizard-split {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(280px, 1.15fr);
  gap: 12px;
}

.wizard-station-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.admin-home {
  display: grid;
  gap: 16px;
}

.admin-header--focused {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 18px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.admin-header--focused h1 {
  margin: 8px 0 6px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.02;
}

.admin-search input {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fbfcfb;
}

.admin-focus-panel,
.admin-maintenance-plan,
.admin-operating-model,
.admin-playbooks,
.admin-module-section {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.05);
}

.admin-focus-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.admin-maintenance-plan {
  padding: 16px;
}

.admin-operating-model {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1.6fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.admin-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  padding: 8px 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.admin-status-pill small {
  color: #64748b;
  font-weight: 800;
}

.admin-status-pill.is-on {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
}

.admin-status-pill.is-off {
  opacity: 0.72;
}

.admin-playbooks {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.admin-playbooks__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.admin-playbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.admin-playbook-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0) 44%),
    #fbfcfb;
}

.admin-playbook-card__head {
  display: grid;
  gap: 8px;
}

.admin-playbook-card h3 {
  margin: 0;
  font-size: 18px;
}

.admin-playbook-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.42;
}

.admin-playbook-tags,
.admin-playbook-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-playbook-tags span {
  border-radius: 999px;
  padding: 4px 7px;
  background: #eef2f7;
  color: #334155;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-playbook-steps {
  align-self: end;
}

.admin-playbook-steps a {
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(15, 118, 110, 0.07);
  color: #0f766e;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.admin-playbook-steps a:hover {
  background: rgba(15, 118, 110, 0.12);
}

.admin-maintenance-plan__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.admin-review-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.admin-review-steps span {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 800;
  color: #334155;
}

.admin-module-groups {
  display: grid;
  gap: 14px;
}

.admin-module-section {
  padding: 14px;
}

.admin-module-section__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.1);
}

.admin-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.admin-module-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 13px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 8px;
  background: #fbfcfb;
  color: #111827;
  text-decoration: none;
}

.admin-module-card:hover {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.06);
}

.admin-module-card--priority {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.07);
}

.admin-module-card__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.admin-module-card__top strong {
  font-size: 16px;
}

.admin-module-card__top span {
  align-self: flex-start;
  border-radius: 999px;
  padding: 3px 7px;
  background: #111827;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
}

.admin-module-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.38;
}

.product-config-hub {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.product-config-hub__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 16px;
  align-items: end;
}

.product-config-hub__head h2 {
  margin: 8px 0 6px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.02;
}

.product-config-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.product-config-stats div {
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #f8fafc;
}

.product-config-stats strong {
  font-size: 24px;
  line-height: 1;
}

.product-config-stats span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.product-config-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.product-config-tabs a {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  font-weight: 800;
}

.product-config-tabs a:hover {
  border-color: rgba(15, 118, 110, 0.34);
  background: rgba(15, 118, 110, 0.07);
  color: #0f766e;
}

.product-config-note {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.08);
  color: #134e4a;
}

.product-config-drawer {
  overflow: hidden;
}

.product-config-drawer > summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.product-config-drawer > summary::-webkit-details-marker {
  display: none;
}

.product-config-drawer > summary strong {
  display: block;
  font-size: 18px;
}

.product-config-drawer > summary small {
  display: block;
  margin-top: 3px;
  color: #64748b;
}

.product-config-drawer[open] > summary {
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.1);
}

.product-create-panel {
  border-color: rgba(15, 118, 110, 0.18);
}

.product-create-panel > h2 {
  font-size: 24px;
}

@media (max-width: 760px) {
  .site-header {
    padding: 12px;
  }

  .nav-group {
    width: 100%;
    justify-content: flex-start;
    border-radius: 12px;
  }

  .content {
    padding: 14px;
  }

  .dashboard-hero {
    padding: 16px;
  }

  .insight-panel,
  .dashboard-insights {
    display: none;
  }

  .quick-category-card__form {
    grid-template-columns: 1fr 1fr;
  }

  .wizard-split {
    grid-template-columns: 1fr;
  }

  .admin-header--focused,
  .admin-focus-panel,
  .admin-operating-model,
  .admin-maintenance-plan__head,
  .admin-playbooks__head,
  .product-config-hub__head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .product-config-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-config-note,
  .product-config-drawer > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .ops-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    padding: 8px;
    backdrop-filter: blur(10px);
  }

  .ops-filters {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 2px;
  }

  .ops-tools {
    width: 100%;
  }

  .ops-search {
    flex: 1 1 100%;
    min-width: 0;
  }

  .rush-table {
    max-height: 62vh;
  }

  .rush-row {
    grid-template-columns: 0.8fr 0.7fr 0.7fr 1fr;
  }

  .rush-row span:nth-child(5),
  .rush-row span:nth-child(6) {
    display: none;
  }

  .ops-command-center,
  .ops-flow-grid,
  .ops-group-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-shell .ops-board,
  .ops-board {
    display: block;
    overflow: visible;
  }

  .ops-column__list {
    max-height: 62vh;
  }

  .ops-column {
    display: none;
    min-width: 0;
    margin-bottom: 10px;
  }

  .ops-column.has-visible-cards:not(.is-filtered-out),
  .ops-column.has-visible-cards[data-column] {
    display: block;
  }

  .ops-column.is-filtered-out {
    display: none;
  }

  .ops-rider-row {
    align-items: flex-start;
  }
}
