:root {
  --ink: #101828;
  --muted: #667085;
  --paper: #f5f7fb;
  --surface: #ffffff;
  --line: #d8e0eb;
  --green: #07875c;
  --saffron: #ff9f1c;
  --navy: #102a43;
  --blue: #1c5fd4;
  --red: #d92d20;
  --shadow: 0 20px 60px rgba(16, 42, 67, .13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 4%, rgba(255, 159, 28, .18), transparent 26%),
    radial-gradient(circle at 86% 12%, rgba(7, 135, 92, .14), transparent 24%),
    linear-gradient(180deg, #fbfcff 0%, var(--paper) 42%, #edf3f7 100%);
}

button, input, select { font: inherit; }
button { cursor: pointer; }
svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand-button {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .8);
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 13px 10px 10px;
  box-shadow: 0 10px 30px rgba(16, 42, 67, .07);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--saffron);
  font-size: 12px;
  font-weight: 950;
}

.brand-button b,
.brand-button small {
  display: block;
  text-align: left;
}

.brand-button b {
  font-size: 15px;
  letter-spacing: 0;
}

.brand-button small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 1px;
}

.plaza-chip {
  max-width: 45vw;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px 70px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.intro span,
.hero-copy span,
.callout span {
  display: inline-block;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 860px;
  margin: 10px 0 0;
  font-size: clamp(38px, 5.5vw, 72px);
  line-height: .96;
  letter-spacing: 0;
}

.role-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .78);
}

.role-nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  min-width: 92px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 850;
}

.role-nav button.active {
  background: var(--navy);
  color: white;
  box-shadow: 0 8px 20px rgba(16, 42, 67, .18);
}

.driver-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.phone-panel {
  width: min(100%, 390px);
  min-height: 760px;
  border: 8px solid #111827;
  border-radius: 36px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  position: relative;
}

.phone-panel::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 22px;
  border-radius: 0 0 16px 16px;
  background: #111827;
  z-index: 3;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  padding: 13px 20px 4px;
  font-size: 11px;
  font-weight: 900;
}

.phone-appbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 10px;
}

.mini-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 950;
}

.mini-brand span {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--saffron);
  font-size: 11px;
}

.circle-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #eef2f7;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.phone-content {
  padding: 10px 20px 24px;
}

.hero-copy h1 {
  margin: 10px 0 8px;
  font-size: 31px;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy p,
.workspace-head p,
.callout p,
.flow-card li,
.fine-print {
  color: var(--muted);
  line-height: 1.5;
}

.hero-copy p {
  margin: 0 0 18px;
  font-size: 13px;
}

.input-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  background: white;
}

.input-card span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.input-card input,
.input-card select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .03em;
}

#vehicleInput,
#staffPlateInput,
#zoneInput {
  text-transform: uppercase;
}

.input-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 15px 0 9px;
}

.section-row b { font-size: 14px; }
.section-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

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

.duration-grid button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.duration-grid button.active {
  border-color: var(--green);
  background: #e8f7ef;
  color: var(--green);
}

.extension-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 2px;
}

.extension-grid button {
  min-height: 54px;
}

.extension-grid small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.extension-grid button.active small {
  color: var(--green);
}

.price-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
}

.price-card span {
  display: block;
  color: rgba(255, 255, 255, .66);
  font-size: 11px;
  font-weight: 800;
}

.price-card strong {
  display: block;
  font-size: 26px;
  margin-top: 2px;
}

.price-card b {
  display: block;
  margin-top: 6px;
  color: var(--saffron);
}

.free-rule-strip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 8px;
  background: #fff7e8;
  color: #9a5b00;
  font-size: 12px;
}

.free-rule-strip span {
  font-weight: 900;
}

.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 8px;
  min-height: 48px;
  padding: 0 16px;
  font-weight: 950;
}

.primary-btn {
  width: 100%;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--green);
  color: white;
  box-shadow: 0 12px 24px rgba(7, 135, 92, .18);
}

.primary-btn.danger {
  background: var(--red);
  box-shadow: 0 12px 24px rgba(217, 45, 32, .18);
}

.secondary-btn {
  background: #eef2f7;
  color: var(--ink);
}

.secondary-btn.wide { width: 100%; }

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.fine-print {
  margin: 10px 0 0;
  font-size: 11px;
}

.side-panel {
  display: grid;
  gap: 14px;
}

.callout,
.flow-card,
.workspace,
.table-card,
.incident-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 12px 36px rgba(16, 42, 67, .07);
}

.callout,
.flow-card {
  padding: 24px;
}

.callout {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(145deg, rgba(7, 135, 92, .1), rgba(255, 255, 255, .92)),
    white;
}

.callout.warning {
  background:
    linear-gradient(145deg, rgba(255, 159, 28, .18), rgba(255, 255, 255, .92)),
    white;
}

.callout h2 {
  margin: 12px 0 8px;
  font-size: 42px;
  line-height: 1;
}

.callout p {
  margin: 0 0 18px;
  max-width: 560px;
}

.flow-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.rules-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 36px rgba(16, 42, 67, .07);
  padding: 18px;
}

.workspace > .rules-card {
  margin-bottom: 14px;
}

.rules-card h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.rules-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.rule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.rule-list span {
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 900;
}

.rule-list span.active {
  background: #e8f7ef;
  color: var(--green);
}

.rules-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.flow-card ol {
  margin: 0;
  padding-left: 20px;
}

.flow-card li + li {
  margin-top: 8px;
}

.pass-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(7, 135, 92, .09), rgba(255, 255, 255, 1) 45%),
    white;
}

.pass-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.pass-head span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.pass-head h1 {
  margin: 7px 0 0;
  font-size: 24px;
  letter-spacing: .04em;
}

.pass-head strong {
  color: var(--green);
  font-size: 44px;
  line-height: .9;
  text-align: right;
}

.pass-head small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.pass-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 18px 0 4px;
}

.pass-meta div,
.receipt-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
}

.pass-meta span,
.receipt-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.receipt-card {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.receipt-card div {
  align-items: center;
}

.receipt-card svg {
  color: var(--green);
}

.workspace {
  padding: 24px;
}

.workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.workspace-head h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1;
}

.workspace-head p {
  max-width: 720px;
  margin: 10px 0 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.report-card,
.mix-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 36px rgba(16, 42, 67, .07);
  padding: 18px;
  margin-bottom: 14px;
}

.report-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.report-card h2,
.mix-card h2 {
  margin: 0 0 5px;
  font-size: 22px;
}

.report-card p,
.mix-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.report-tabs {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 7px;
}

.report-tabs button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.report-tabs button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.mix-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.mix-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.mix-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.mix-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  color: var(--green);
}

.metric-card {
  padding: 18px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.metric-card strong {
  display: block;
  margin-top: 7px;
  font-size: 30px;
}

.metric-card.green strong { color: var(--green); }
.metric-card.blue strong { color: var(--blue); }
.metric-card.saffron strong { color: #b54708; }
.metric-card.navy strong { color: var(--navy); }

.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 14px;
}

.table-card,
.incident-card {
  padding: 18px;
}

.table-card h2,
.incident-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.data-table {
  display: grid;
  gap: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr .8fr .5fr .65fr .65fr .55fr .75fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 13px;
}

.table-head {
  background: #f1f5f9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.status-pill,
.status-text {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 8px;
  background: #e8f7ef;
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.status-text {
  font-size: 12px;
}

.status-pill.unpaid,
.status-text.unpaid {
  background: #fde8e6;
  color: var(--red);
}

.status-pill.waiver,
.status-text.waiver,
.status-pill.processing,
.status-text.processing {
  background: #fff2d8;
  color: #b54708;
}

.incident-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.incident-row.resolved {
  opacity: .64;
}

.incident-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.incident-head h2 {
  margin-bottom: 0;
}

.incident-head label {
  min-width: 126px;
}

.incident-head label span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.incident-head input {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 8px 9px;
  font-weight: 900;
}

.incident-row:first-of-type {
  border-top: 0;
}

.incident-row p,
.incident-row small {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.incident-actions {
  display: grid;
  gap: 7px;
  justify-items: end;
}

.incident-actions b {
  color: var(--red);
}

.incident-actions button {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: #eef2f7;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.incident-actions button:disabled {
  cursor: default;
  color: var(--muted);
}

.photo-chip {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff2d8;
  color: #b54708;
}

.proof-link {
  display: block;
  border: 0;
  background: transparent;
  color: var(--muted);
  margin: 3px 0 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.staff-phone {
  background: #fffdf8;
}

.photo-upload {
  display: grid;
  place-items: center;
  min-height: 150px;
  margin-bottom: 10px;
  border: 1.5px dashed #e6a340;
  border-radius: 8px;
  background: #fff7e8;
  color: #9a5b00;
  text-align: center;
  position: relative;
}

.photo-upload svg {
  width: 34px;
  height: 34px;
}

.photo-upload span {
  margin-top: 8px;
  color: var(--ink);
  font-weight: 950;
}

.photo-upload b {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.photo-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  width: min(410px, calc(100vw - 28px));
  transform: translateX(-50%) translateY(16px);
  border-radius: 8px;
  background: var(--navy);
  color: white;
  padding: 15px 16px;
  box-shadow: 0 18px 50px rgba(16, 42, 67, .24);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast strong,
.toast span {
  display: block;
}

.toast span {
  margin-top: 3px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, .5);
}

.proof-modal {
  width: min(560px, 100%);
  border-radius: 10px;
  background: white;
  box-shadow: 0 24px 80px rgba(16, 24, 40, .35);
  overflow: hidden;
}

.modal-close {
  float: right;
  margin: 12px;
  border: 0;
  border-radius: 8px;
  background: #eef2f7;
  color: var(--ink);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 950;
}

.proof-preview {
  clear: both;
  min-height: 320px;
  display: grid;
  place-items: center;
  background: #111827;
}

.proof-preview img {
  max-width: 100%;
  max-height: 520px;
  display: block;
}

.proof-placeholder {
  display: grid;
  place-items: center;
  gap: 10px;
  color: white;
  font-weight: 950;
}

.proof-placeholder svg {
  width: 56px;
  height: 56px;
  color: var(--saffron);
}

.proof-detail {
  padding: 18px;
}

.proof-detail h2 {
  margin: 0 0 6px;
  font-size: 26px;
}

.proof-detail p {
  margin: 0 0 10px;
  color: var(--muted);
}

.proof-detail span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .role-nav {
    width: 100%;
  }

  .driver-grid,
  .board-grid {
    grid-template-columns: 1fr;
  }

  .phone-panel {
    margin: 0 auto;
  }

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

  .report-card {
    align-items: stretch;
    flex-direction: column;
  }

  .report-tabs {
    grid-template-columns: repeat(4, 1fr);
  }

  .mix-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 14px 12px 0;
  }

  .plaza-chip {
    max-width: 38vw;
    font-size: 11px;
  }

  .shell {
    padding: 30px 12px 46px;
  }

  .intro h1 {
    font-size: 36px;
  }

  .role-nav button {
    min-width: 0;
    padding: 10px 7px;
    font-size: 12px;
  }

  .role-nav svg {
    display: none;
  }

  .phone-panel {
    min-height: auto;
    border-width: 6px;
    border-radius: 30px;
  }

  .duration-grid,
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .workspace {
    padding: 14px;
  }

  .workspace-head {
    display: block;
  }

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

  .workspace-head .secondary-btn {
    width: 100%;
  }

  .workspace-head h1 {
    font-size: 32px;
  }

  .table-row {
    grid-template-columns: 1fr 54px;
  }

  .table-head {
    display: none;
  }

  .table-row span:nth-child(3),
  .table-row span:nth-child(4),
  .table-row span:nth-child(5),
  .table-row span:nth-child(6),
  .table-row span:nth-child(7) {
    color: var(--muted);
    font-size: 12px;
  }

  .report-tabs,
  .mix-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .incident-row {
    grid-template-columns: 38px 1fr;
  }

  .incident-actions {
    grid-column: 2;
    justify-items: start;
  }

  .incident-head {
    display: block;
  }

  .incident-head label {
    display: block;
    margin-top: 10px;
  }
}
