:root {
  --bg: #e6eef5;
  --surface: #ffffff;
  --surface-2: #eef5f8;
  --surface-3: #f7faf8;
  --line: #cbd8e4;
  --text: #172033;
  --muted: #5f6f85;
  --green: #166534;
  --green-bg: #86efac;
  --amber: #c2410c;
  --amber-bg: #fdba74;
  --blue: #1d4ed8;
  --blue-bg: #bfdbfe;
  --red: #b91c1c;
  --red-bg: #f87171;
  --teal: #0f766e;
  --shadow: 0 18px 50px rgba(18, 32, 51, 0.12);
  --soft-shadow: 0 8px 24px rgba(18, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(30, 64, 175, 0.07), transparent 40%), var(--bg);
  color: var(--text);
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

#app {
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
}

.boot-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  align-content: center;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), transparent 36%),
    linear-gradient(315deg, rgba(30, 64, 175, 0.08), transparent 42%), var(--bg);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 8px clamp(12px, 2vw, 22px);
  border-bottom: 1px solid rgba(203, 216, 228, 0.9);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 5px 22px rgba(18, 32, 51, 0.05);
}

.topbar-worker {
  padding: 5px 8px;
}

.topbar-worker .brand p {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #172033;
  color: #fff;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(170, 190, 208, 0.8);
  border-radius: 8px;
  background: rgba(238, 245, 248, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.nav button,
.ghost-btn,
.primary-btn,
.danger-btn,
.icon-btn {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}

.nav button {
  padding: 8px 11px;
  color: var(--muted);
  background: transparent;
}

.nav button.active {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--soft-shadow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-chip {
  max-width: 220px;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page {
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 10px clamp(10px, 1.6vw, 20px) 16px;
}

.page-worker {
  width: 100%;
  height: 100vh;
  padding: 6px;
  overflow: hidden;
}

.page-operator {
  width: min(1840px, 100%);
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding-top: 8px;
  padding-bottom: 8px;
}

.page-operator .location-grid {
  grid-template-columns: repeat(9, minmax(105px, 1fr));
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.compact-head {
  align-items: center;
}

.page-head h2 {
  margin: 0;
  font-size: clamp(21px, 2.2vw, 28px);
  line-height: 1.05;
}

.page-head p {
  margin: 3px 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.compact-toolbar {
  justify-content: flex-start;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ghost-btn,
.icon-btn {
  padding: 8px 12px;
  color: var(--text);
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 2px 8px rgba(18, 32, 51, 0.04);
}

.primary-btn {
  padding: 9px 14px;
  color: #fff;
  background: var(--teal);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
}

.export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 7px;
  text-decoration: none;
}

.danger-btn {
  padding: 9px 14px;
  color: #fff;
  background: var(--red);
}

.release-all-btn {
  color: #0f3f3a;
  background: #e0f2f1;
  border-color: #99d8d2;
}

.ghost-btn.active {
  border-color: #dc2626;
  background: #f87171;
  color: #111827;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.14);
}

.status-line {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.login-wrap {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(29, 78, 216, 0.08), transparent 34%), var(--bg);
}

.login-card {
  width: min(470px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.05;
}

.login-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.login-card .nav button {
  flex: 1 1 0;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c8d3e0;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
}

.error-text {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(78px, 1fr));
  gap: 8px;
}

.map-grid {
  padding: 10px;
  border: 1px solid #b8c8d8;
  border-radius: 8px;
  background: #c3d0dd;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.worker-screen {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
}

.worker-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 6px;
  border: 1px solid rgba(203, 216, 228, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--soft-shadow);
}

.worker-map {
  grid-template-columns: repeat(9, minmax(88px, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  height: 100%;
  min-height: 0;
  align-content: stretch;
}

.worker-map .location-card {
  width: 100%;
  height: 100%;
  grid-template-rows: minmax(0, 58%) minmax(44px, 42%);
  aspect-ratio: auto;
}

.worker-map .location-number {
  font-size: clamp(46px, 5vw, 76px);
}

.worker-map .pill {
  min-height: 29px;
  padding: 5px 12px;
  font-size: 15px;
}

.worker-map .elapsed-pill {
  font-size: 14px;
}

.worker-map .location-meta {
  min-height: 44px;
}

.block-location-tile {
  display: grid;
  grid-column: 8 / span 2;
  grid-row: 4;
  place-items: center;
  min-height: 0;
  padding: 10px;
  border: 2px dashed #b91c1c;
  border-radius: 8px;
  background: #f87171;
  color: #111827;
  cursor: pointer;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 4px 14px rgba(18, 32, 51, 0.08);
}

.block-location-tile.active {
  border-style: solid;
  background: #ef4444;
  color: #111827;
}

.location-card {
  display: grid;
  grid-template-rows: minmax(0, 44%) minmax(82px, 56%);
  justify-items: center;
  align-items: stretch;
  aspect-ratio: 4 / 5;
  min-height: 0;
  gap: 3px;
  padding: 8px 8px 8px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 14px rgba(18, 32, 51, 0.08);
  overflow: hidden;
}

.location-card:hover {
  transform: translateY(-1px);
}

.location-card.status-FREE {
  border-color: #d4dde8;
  background: #fbfdff;
}

.location-card.status-READY {
  border-color: #15803d;
  background: #86efac;
}

.location-card.status-IN_PROGRESS {
  border-color: #c2410c;
  background: #fdba74;
}

.location-card.status-BLOCKED {
  border-color: #b91c1c;
  background: #f87171;
}

.location-card.picking-location {
  box-shadow:
    inset 0 0 0 3px rgba(37, 99, 235, 0.12),
    0 3px 12px rgba(18, 32, 51, 0.06);
}

.location-card.picking-location.status-FREE {
  border-color: #2563eb;
  background: #fbfdff;
}

.location-card.picking-location.status-READY {
  background: #86efac;
}

.location-card.picking-location.status-IN_PROGRESS {
  background: #fdba74;
}

.location-main {
  display: grid;
  position: relative;
  min-height: 0;
  width: 100%;
  align-content: end;
  justify-items: center;
  gap: 6px;
}

.location-number {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-size: clamp(36px, 2.8vw, 56px);
  font-weight: 850;
  line-height: 1;
}

.location-kind {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  margin-top: 0;
  color: #155e75;
  font-size: 14px;
  font-weight: 700;
}

.location-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: start;
  gap: 4px;
  margin-top: 0;
  min-height: 82px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 25px;
  padding: 4px 10px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.elapsed-pill {
  font-size: 13px;
}

.pill.urgent {
  border-color: #65a30d;
  color: #365314;
  background: #bef264;
}

.urgent-location.status-READY,
.urgent-queue.status-READY {
  border-color: #15803d;
  background: #86efac;
}

.urgent-location.status-IN_PROGRESS,
.urgent-queue.status-IN_PROGRESS {
  border-color: #c2410c;
  background: #fdba74;
}

.urgent-location,
.urgent-queue {
  animation: urgentPulse 0.85s ease-in-out infinite;
  outline: 4px solid rgba(132, 204, 22, 0.76);
  outline-offset: 2px;
}

.worker-map.blocking-mode .location-card:not(.status-BLOCKED) {
  outline: 3px solid rgba(220, 38, 38, 0.42);
  outline-offset: 2px;
  filter: brightness(1.04) saturate(1.08);
}

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: start;
}

.operator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: 12px;
  align-items: start;
  min-height: 0;
  height: 100%;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.map-panel,
.queue-panel {
  min-height: 0;
}

.map-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.page-operator .map-panel .map-grid {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.page-operator .location-grid {
  grid-auto-rows: minmax(0, 1fr);
}

.page-operator .location-card {
  aspect-ratio: auto;
}

.page-operator .picking-location .location-meta {
  padding-top: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-3);
}

.panel-head h3 {
  margin: 0;
  font-size: 17px;
}

.queue-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  min-height: 0;
}

.compact-queue {
  grid-template-columns: 1fr;
}

.queue-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-left: 7px solid var(--line);
  border-right: 7px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: default;
  text-align: left;
  box-shadow: 0 4px 14px rgba(18, 32, 51, 0.06);
  overflow: hidden;
}

.queue-action-zone {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.queue-action-zone:hover {
  filter: saturate(1.05) brightness(0.99);
}

.queue-card.status-READY {
  border-color: #15803d;
  background: #86efac;
}

.queue-card.status-IN_PROGRESS {
  border-color: #c2410c;
  background: #fdba74;
}

.queue-card.status-BLOCKED {
  border-color: #b91c1c;
  background: #f87171;
}

.queue-card.queue-overdue {
  box-shadow:
    inset 0 0 0 3px rgba(202, 138, 4, 0.45),
    0 0 0 2px rgba(202, 138, 4, 0.28),
    0 4px 14px rgba(18, 32, 51, 0.06);
}

.queue-card.queue-overdue .queue-time {
  border-color: #ca8a04;
  background: #fef3c7;
  color: #422006;
}

.queue-panel {
  position: sticky;
  top: 8px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: 100%;
  overflow: hidden;
}

.queue-scroll {
  min-height: 0;
  overflow: auto;
}

.queue-number {
  display: grid;
  width: 56px;
  height: 66px;
  place-items: center;
  border-radius: 8px;
  background: #edf5f8;
  font-size: 28px;
  font-weight: 850;
}

.queue-body {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.queue-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.queue-card h4 {
  margin: 0;
  font-size: 18px;
}

.queue-code {
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.queue-height {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid rgba(23, 32, 51, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  font-size: 17px;
  font-weight: 950;
}

.queue-time {
  min-height: 28px;
  font-size: 14px;
}

.queue-urgent {
  min-height: 27px;
  white-space: nowrap;
}

.queue-reason {
  max-width: 100%;
}

.queue-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.queue-copy-wrap {
  display: inline-flex;
  justify-self: start;
  width: fit-content;
  margin: 0 10px 10px 78px;
  padding: 5mm;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 7px;
  background: #fff;
  cursor: default;
  box-shadow: 0 2px 8px rgba(18, 32, 51, 0.08);
}

.copy-location-btn {
  justify-self: start;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #64748b;
  border-radius: 7px;
  background: #f8fafc;
  color: #172033;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.copy-location-btn:active {
  transform: translateY(1px);
}

.undo-bar {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 70;
  transform: translateX(-50%);
}

.undo-button {
  min-height: 54px;
  padding: 10px 20px;
  border: 2px solid #0f766e;
  border-radius: 8px;
  background: #0f766e;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.34);
}

.queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 10px 10px;
  border-top: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.92);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 4px;
}

.legend-free {
  border-color: #d4dde8;
  background: #fbfdff;
}

.legend-ready {
  border-color: #15803d;
  background: #86efac;
}

.legend-progress {
  border-color: #c2410c;
  background: #fdba74;
}

.legend-blocked {
  border-color: #b91c1c;
  background: #f87171;
}

.legend-urgent {
  border-color: #65a30d;
  background: #bef264;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.kpi-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.kpi-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  font-size: 29px;
  line-height: 1;
}

.kpi-card small {
  display: block;
  margin-top: 8px;
  color: #5f6f85;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f8fafc;
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.modal {
  width: min(560px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.modal p {
  margin: 0 0 14px;
  color: var(--muted);
}

.height-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 12px;
}

.height-grid button {
  min-height: 72px;
  border: 2px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #172033;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
}

.height-grid button.active {
  border-color: #ca8a04;
  background: #fef3c7;
}

.urgent-toggle {
  width: 100%;
  min-height: 60px;
  border: 2px solid #d6b44c;
  border-radius: 7px;
  background: #f8fafc;
  color: #172033;
  cursor: pointer;
  font-size: 18px;
  font-weight: 850;
}

.urgent-toggle.active {
  border-color: #ca8a04;
  background: #fef08a;
  color: #422006;
  box-shadow: inset 0 0 0 2px rgba(202, 138, 4, 0.18);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.instructions-modal {
  width: min(620px, 100%);
}

.instructions-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.instructions-list p {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #d8e2ec;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-size: 15px;
  line-height: 1.35;
}

.instructions-list strong {
  color: var(--text);
}

.confirm-layer {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(15, 23, 42, 0.08);
}

.confirm-popover {
  position: fixed;
  width: min(340px, calc(100vw - 28px));
  padding: 15px;
  border: 2px solid #cbd8e4;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
}

.confirm-popover h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.15;
}

.confirm-popover p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.confirm-ok-btn,
.confirm-cancel-btn {
  min-height: 54px;
  font-size: 17px;
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #172033;
  color: #fff;
  box-shadow: var(--shadow);
}

@keyframes urgentPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(132, 204, 22, 0.6),
      0 4px 14px rgba(18, 32, 51, 0.08);
  }

  50% {
    box-shadow:
      0 0 0 14px rgba(132, 204, 22, 0),
      0 4px 14px rgba(18, 32, 51, 0.08);
  }
}

@media (max-width: 860px) {
  .topbar,
  .page-head {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    flex-wrap: wrap;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .location-grid {
    grid-template-columns: repeat(8, minmax(54px, 1fr));
    gap: 5px;
  }

  .worker-map {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .worker-map .location-number {
    font-size: clamp(32px, 6vw, 52px);
  }

  .worker-map .pill {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 12px;
  }

  .worker-map .elapsed-pill {
    font-size: 11px;
  }

  .location-card {
    grid-template-rows: minmax(0, 42%) minmax(66px, 58%);
    padding: 6px 5px;
  }

  .location-number {
    font-size: 30px;
  }

  .location-meta {
    min-height: 66px;
    gap: 3px;
  }

  .operator-layout {
    grid-template-columns: 1fr;
  }

  .queue-panel {
    position: static;
  }

  .block-location-tile {
    grid-column: 8 / span 2;
    grid-row: 4;
    padding: 6px;
    font-size: 12px;
  }
}
