:root {
  --bg: #121c2b;
  --bg-soft: #223754;
  --panel: rgba(17, 28, 44, 0.94);
  --card: rgba(55, 70, 93, 0.84);
  --card-2: rgba(82, 94, 112, 0.78);
  --text: #ffffff;
  --muted: #c9d1df;
  --blue: #0b6fff;
  --blue-deep: #0751bb;
  --accent: #6aa0ff;
  --green: #00c719;
  --green-soft: #d8ffd8;
  --red: #f20707;
  --gold: #ff9f1a;
  --gold-soft: #fff0c7;
  --shadow: 0 16px 22px rgba(0, 0, 0, 0.34);
  --font: "Inter", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #080e18;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
  background:
    linear-gradient(132deg, rgba(31, 47, 69, 0.98) 0%, rgba(55, 86, 136, 0.98) 44%, rgba(7, 12, 21, 1) 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.driver-app {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(150deg, rgba(31, 47, 69, 0.96), rgba(25, 40, 62, 0.96) 48%, rgba(6, 12, 21, 0.98)),
    var(--bg);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.4);
}

.driver-page {
  min-height: 100vh;
  padding: max(22px, env(safe-area-inset-top)) 28px max(112px, calc(92px + env(safe-area-inset-bottom)));
}

.driver-page.no-nav {
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

.driver-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
}

.driver-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 28px;
}

.login-card {
  width: min(100%, 430px);
  display: grid;
  gap: 24px;
  padding: 30px;
  border-radius: 18px;
  background: rgba(12, 24, 40, 0.94);
  box-shadow: var(--shadow);
}

.login-card .driver-logo {
  margin: 0 auto 8px;
}

.login-card h1 {
  margin: 0;
  text-align: center;
  font-size: 2.1rem;
  text-transform: uppercase;
}

.login-card form,
.login-card label {
  display: grid;
  gap: 12px;
}

.install-app-button {
  min-height: 54px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
}

.install-app-button svg {
  width: 22px;
  height: 22px;
}

.settings-install {
  background: rgba(11, 111, 255, 0.22);
}

.login-card label span {
  font-weight: 800;
  text-transform: uppercase;
}

.login-card input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.1rem;
  outline: none;
}

.login-error {
  margin: 0;
  color: #ffb4b4;
  font-weight: 800;
}

.driver-register-card {
  width: min(100%, 430px);
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(12, 24, 40, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.register-toggle {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
}

.register-toggle svg {
  width: 20px;
  height: 20px;
}

.driver-register-form {
  display: grid;
  gap: 12px;
}

.driver-register-form label {
  display: grid;
  gap: 8px;
}

.driver-register-form label span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-register-form input,
.driver-register-form select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
}

.driver-register-form .secondary-action {
  min-height: 58px;
  border-radius: 14px;
  font-size: 1.08rem;
  font-weight: 800;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.driver-logo {
  width: 78%;
  max-width: 340px;
  display: block;
  margin: 8px auto 34px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.46));
}

.hello {
  margin: 0 0 30px;
}

.hello h1 {
  margin: 0;
  font-size: clamp(2.1rem, 9vw, 3rem);
  line-height: 1.08;
  font-weight: 500;
}

.hello p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.35rem, 6vw, 2rem);
  line-height: 1.18;
}

.delivery-stack {
  margin-inline: -28px;
  padding: 32px 28px 44px;
  background: linear-gradient(180deg, rgba(11, 19, 31, 0.9), rgba(16, 27, 43, 0.92));
  border-radius: 36px 36px 0 0;
}

.delivery-date {
  margin: 0 0 22px;
  font-size: clamp(1.4rem, 7vw, 2.1rem);
  font-weight: 500;
}

.delivery-card {
  width: 100%;
  min-height: 128px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 22px 18px;
  border: 0;
  border-radius: 20px;
  background: var(--card);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
}

.delivery-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 6vw, 2.1rem);
  line-height: 1.05;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.delivery-card strong {
  display: block;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: clamp(1.2rem, 5vw, 1.75rem);
  font-weight: 500;
  text-transform: uppercase;
}

.delivery-card span {
  color: var(--text);
  font-size: 1.05rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge.route {
  background: var(--green-soft);
  color: #147c2a;
}

.status-badge.pending {
  background: var(--gold-soft);
  color: var(--gold);
}

.status-badge.done {
  background: var(--green);
  color: #fff;
}

.screen-top {
  min-height: 70px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.screen-top h1 {
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(1.42rem, 6.2vw, 2.08rem);
  line-height: 1.05;
  font-weight: 800;
}

.screen-top p {
  grid-column: 2;
  margin: 4px 0 0;
  text-align: center;
  text-transform: uppercase;
  font-size: 1.05rem;
}

.back-button,
.plain-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
}

.back-button svg,
.plain-icon svg {
  width: 42px;
  height: 42px;
  stroke-width: 1.8;
}

.detail-panel,
.form-panel,
.confirm-box,
.delivery-success-card {
  background: var(--panel);
  border-radius: 36px;
  padding: 32px 28px;
}

.detail-code {
  margin: 48px 0 34px;
  font-size: clamp(2rem, 8vw, 2.8rem);
  line-height: 1.05;
  font-weight: 700;
}

.info-card {
  padding: 28px 24px;
  border-radius: 22px;
  background: var(--card);
  color: var(--text);
}

.info-line {
  margin: 0 0 26px;
  font-size: clamp(1.35rem, 5.7vw, 2rem);
  line-height: 1.22;
}

.info-line:last-child {
  margin-bottom: 0;
}

.info-line span {
  color: var(--accent);
  text-transform: uppercase;
}

.delivery-window {
  margin: 70px 0 54px;
  text-align: center;
}

.delivery-window h2 {
  margin: 0 0 42px;
  font-size: clamp(1.4rem, 6vw, 1.95rem);
  text-transform: uppercase;
}

.delivery-window p {
  margin: 18px 0;
  font-size: clamp(1.25rem, 5.8vw, 1.8rem);
}

.primary-action,
.success-action,
.danger-action,
.secondary-action {
  width: 100%;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 18px;
  color: #fff;
  text-transform: uppercase;
  font-size: clamp(1.35rem, 6vw, 1.9rem);
  font-weight: 500;
  box-shadow: var(--shadow);
}

.primary-action {
  background: linear-gradient(90deg, var(--blue), var(--blue-deep));
}

.success-action {
  background: linear-gradient(90deg, #02dd22, #008b00);
}

.danger-action {
  background: linear-gradient(90deg, #ff0606, #9c0808);
}

.secondary-action {
  background: rgba(105, 115, 130, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.primary-action.compact,
.secondary-action.compact {
  min-height: 54px;
  margin-top: 22px;
  margin-bottom: 18px;
  border-radius: 14px;
  font-size: clamp(1rem, 4.6vw, 1.28rem);
}

.route-page {
  padding-inline: 0;
  padding-top: max(22px, env(safe-area-inset-top));
}

.route-page .screen-top {
  padding: 0 24px;
  margin-bottom: 22px;
}

.route-map {
  width: 100%;
  height: min(66vh, 680px);
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: #e9e2d4;
}

.route-map.rounded {
  border-radius: 28px 28px 0 0;
}

.route-map .leaflet-control-attribution {
  font-size: 10px;
}

.route-map .leaflet-driver-symbols-pane {
  z-index: 760 !important;
}

.route-map .leaflet-marker-icon.driver-map-marker {
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
}

.route-map .leaflet-marker-icon.driver-map-marker.current,
.route-map .leaflet-marker-icon.driver-map-marker.van {
  width: 42px !important;
  height: 42px !important;
}

.route-map .leaflet-marker-icon.driver-map-marker.destination {
  width: 42px !important;
  height: 42px !important;
}

.driver-route-card {
  min-width: 178px;
  max-width: min(260px, calc(100vw - 168px));
  display: grid;
  gap: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(16, 24, 40, 0.88);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.22);
  backdrop-filter: blur(8px);
}

.driver-route-card strong,
.driver-route-card small,
.driver-route-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-route-card span,
.driver-route-card small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.driver-route-card strong {
  margin: 4px 0;
  font-size: 1.2rem;
  line-height: 1;
}

.map-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #1a2738;
  text-align: center;
  font-weight: 800;
}

.route-sheet {
  position: relative;
  margin-top: -12px;
  padding: 26px 28px max(32px, env(safe-area-inset-bottom));
  background: rgba(8, 16, 28, 0.96);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 22px rgba(0, 0, 0, 0.24);
}

.sheet-handle {
  width: 66px;
  height: 9px;
  margin: 0 auto 28px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.7);
}

.route-destination {
  display: grid;
  gap: 20px;
}

.route-destination span {
  font-size: 1.55rem;
  text-transform: uppercase;
}

.route-destination strong {
  color: var(--accent);
  font-size: clamp(2.2rem, 10vw, 3.2rem);
  font-weight: 500;
  text-transform: uppercase;
}

.route-destination p {
  margin: 26px 0 38px;
  font-size: clamp(1.4rem, 6vw, 2rem);
  line-height: 1.25;
  text-transform: uppercase;
}

.route-stats {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
}

.route-stats strong {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(2.3rem, 10vw, 3rem);
  font-weight: 500;
  text-transform: uppercase;
}

.route-stats p {
  margin: 0;
  font-size: clamp(1.2rem, 5vw, 1.55rem);
}

.transmission-status {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.transmission-status > span {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.transmission-status.is-live > span {
  background: var(--green);
}

.transmission-status.is-paused > span {
  background: var(--red);
}

.transmission-status strong,
.transmission-status p {
  min-width: 0;
  margin: 0;
}

.transmission-status strong {
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.transmission-status p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  line-height: 1.25;
}

.map-controls {
  display: grid;
  justify-items: center;
  gap: 24px;
  font-size: 2.6rem;
}

.map-icon-button {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: var(--shadow);
}

.map-icon-button svg {
  width: 30px;
  height: 30px;
}

.security-panel {
  margin-inline: -28px;
  min-height: calc(100vh - 96px);
  padding: 42px 24px;
  background: var(--panel);
  border-radius: 36px 36px 0 0;
  text-align: center;
}

.shield {
  width: 190px;
  height: 190px;
  margin: 0 auto 46px;
  display: grid;
  place-items: center;
  color: var(--security-color, #4de866);
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.45));
}

.shield svg {
  width: 180px;
  height: 180px;
  stroke-width: 1.7;
}

.security-copy {
  margin: 0 auto 40px;
  max-width: 380px;
  font-size: clamp(1.55rem, 7vw, 2.25rem);
  line-height: 1.2;
}

.code-boxes {
  display: grid;
  grid-template-columns: repeat(var(--code-length, 8), minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 36px;
}

.code-box {
  aspect-ratio: 0.72;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 7px;
  background: rgba(63, 76, 97, 0.58);
  box-shadow: var(--shadow);
  font-size: clamp(1rem, 5vw, 1.6rem);
  font-weight: 700;
}

.code-hidden {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.validation-message {
  min-height: 92px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-top: 42px;
  text-align: left;
}

.validation-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.validation-icon.ok {
  background: var(--green);
}

.validation-icon.bad {
  background: var(--red);
}

.validation-icon svg {
  width: 42px;
  height: 42px;
  stroke-width: 4;
}

.validation-message strong {
  display: block;
  color: var(--validation-color, #55f46d);
  font-size: clamp(1.45rem, 6vw, 2rem);
  font-weight: 500;
}

.validation-message span {
  display: block;
  color: #fff;
  font-size: clamp(1.02rem, 4.7vw, 1.45rem);
}

.settings-hero {
  display: grid;
  grid-template-columns: 1fr 150px;
  align-items: start;
  gap: 20px;
  margin-bottom: 42px;
}

.settings-hero h2 {
  margin: 0;
  font-size: clamp(1.55rem, 7vw, 2.1rem);
  line-height: 1.2;
  text-transform: uppercase;
}

.avatar-frame {
  width: 150px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: #10233c;
  box-shadow: var(--shadow);
}

.profile-photo-picker {
  position: relative;
  cursor: pointer;
}

.profile-photo-picker span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #0777ff, #064eb5);
  color: #fff;
  box-shadow: var(--shadow);
}

.profile-photo-picker span svg {
  width: 25px;
  height: 25px;
}

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

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.form-panel {
  display: grid;
  gap: 20px;
  background: var(--card);
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--accent);
  font-size: clamp(1.35rem, 6vw, 1.9rem);
  text-transform: uppercase;
}

.field input,
.field select,
.recipient-input {
  width: 100%;
  min-height: 58px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: rgba(114, 123, 138, 0.72);
  color: #fff;
  outline: none;
  font-size: clamp(1.22rem, 5vw, 1.65rem);
}

.navigator-menu {
  display: grid;
  gap: 10px;
}

.navigator-choice {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: rgba(90, 101, 119, 0.72);
  color: #fff;
  text-transform: uppercase;
  font-size: 1.3rem;
}

.navigator-choice.is-active {
  outline: 2px solid rgba(255, 255, 255, 0.72);
}

.settings-actions {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.confirm-box {
  display: grid;
  gap: 22px;
  background: var(--card);
}

.confirm-line {
  margin: 0;
  font-size: clamp(1.15rem, 5vw, 1.5rem);
  line-height: 1.32;
}

.confirm-line span {
  color: var(--accent);
  text-transform: uppercase;
}

.confirm-date {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.evidence-title {
  margin: 42px 0 20px;
  font-size: clamp(1.35rem, 6vw, 1.9rem);
  font-weight: 500;
}

.signature-section {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.signature-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 150px);
  align-items: center;
  gap: 12px;
}

.signature-heading h2 {
  margin: 0;
  font-size: clamp(1.25rem, 5.6vw, 1.75rem);
  font-weight: 600;
  text-transform: uppercase;
}

.signature-pad {
  width: 100%;
  height: 188px;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  touch-action: none;
}

.signature-preview {
  max-width: 100%;
  max-height: 150px;
  justify-self: start;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
}

.evidence-frame {
  position: relative;
  width: 100%;
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px dashed rgba(116, 166, 255, 0.72);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(10, 22, 38, 0.92), rgba(24, 45, 74, 0.82)),
    var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.evidence-frame img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.evidence-frame input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.evidence-frame.has-photo {
  border-style: solid;
}

.evidence-placeholder {
  display: grid;
  justify-items: center;
  gap: 14px;
  color: #dbeafe;
  text-align: center;
  text-transform: uppercase;
}

.evidence-placeholder > svg {
  width: 92px;
  height: 92px;
  stroke-width: 1.7;
}

.evidence-placeholder b {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-top: -42px;
  margin-left: 78px;
  border-radius: 16px;
  background: #1473ff;
  box-shadow: var(--shadow);
}

.evidence-placeholder b svg {
  width: 34px;
  height: 34px;
  stroke-width: 3;
}

.evidence-placeholder strong {
  font-size: clamp(1.25rem, 5.6vw, 1.65rem);
  letter-spacing: 0;
}

.evidence-overlay {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  background: rgba(8, 18, 32, 0.84);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  pointer-events: none;
}

.evidence-frame.is-empty .evidence-overlay {
  background: #1473ff;
}

.evidence-overlay svg {
  width: 24px;
  height: 24px;
}

.completion-wrap {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 32px;
}

.big-check {
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: #00a800;
  box-shadow: var(--shadow);
}

.big-check svg {
  width: 118px;
  height: 118px;
  stroke-width: 5;
}

.completion-copy {
  text-align: center;
}

.completion-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 9vw, 2.7rem);
}

.completion-copy p {
  margin: 0;
  font-size: clamp(1.2rem, 5.5vw, 1.65rem);
  line-height: 1.35;
}

.delivery-success-card {
  display: grid;
  gap: 16px;
  background: var(--card);
  text-align: center;
}

.delivery-success-card h2 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 2.8rem);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.delivery-success-card strong {
  color: var(--accent);
  font-size: clamp(1.4rem, 6vw, 1.9rem);
  font-weight: 500;
}

.success-date-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  font-size: clamp(1.25rem, 5.5vw, 1.7rem);
}

.empty-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 1.2rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 10;
  width: min(100% - 42px, 438px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  transform: translateX(-50%);
  pointer-events: none;
}

.nav-button {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: linear-gradient(145deg, #0777ff, #064eb5);
  color: #fff;
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.nav-button.is-active {
  outline: 2px solid rgba(255, 255, 255, 0.82);
}

.nav-button svg {
  width: 38px;
  height: 38px;
  stroke-width: 1.8;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  z-index: 20;
  width: min(100% - 34px, 420px);
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(9, 15, 25, 0.96);
  color: #fff;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: var(--shadow);
}

@keyframes pageRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes softPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: var(--shadow);
  }

  50% {
    transform: scale(1.018);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.42);
  }
}

@keyframes markerPop {
  from {
    opacity: 0;
    transform: scale(0.45);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes liveDash {
  to {
    stroke-dashoffset: -42;
  }
}

@keyframes routePulse {
  0% {
    opacity: 0.7;
    transform: scale(0.72);
  }

  100% {
    opacity: 0;
    transform: scale(1.34);
  }
}

@keyframes cartFloat {
  0%,
  100% {
    transform: scale(1.12) translateY(0);
  }

  50% {
    transform: scale(1.12) translateY(-3px);
  }
}

@keyframes cartTrail {
  0%,
  100% {
    opacity: 0.36;
    transform: translateX(0);
  }

  50% {
    opacity: 0.9;
    transform: translateX(-4px);
  }
}

@keyframes destinationPop {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@keyframes cartMarkerDrive {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-4px) rotate(2deg);
  }
}

@keyframes wheelSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes cartTrailMove {
  0% {
    opacity: 0;
    transform: translateX(10px) scaleX(0.55);
  }

  50% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: translateX(-7px) scaleX(1);
  }
}

@keyframes destinationTargetPulse {
  0% {
    opacity: 0.6;
    transform: scale(0.68);
  }

  100% {
    opacity: 0;
    transform: scale(1.36);
  }
}

@keyframes destinationPinBounce {
  0%,
  100% {
    transform: rotate(-45deg) translate(0, 0);
  }

  50% {
    transform: rotate(-45deg) translate(3px, -3px);
  }
}

.driver-page {
  animation: pageRise 420ms ease both;
}

.driver-logo,
.hello,
.delivery-stack,
.detail-panel,
.form-panel,
.security-panel,
.confirm-box,
.completion-wrap,
.route-map,
.route-sheet {
  animation: cardRise 460ms ease both;
}

.delivery-card,
.info-card,
.delivery-success-card,
.evidence-frame,
.validation-message {
  animation: cardRise 420ms ease both;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.delivery-card:nth-of-type(2) {
  animation-delay: 50ms;
}

.delivery-card:nth-of-type(3) {
  animation-delay: 95ms;
}

.delivery-card:nth-of-type(4) {
  animation-delay: 140ms;
}

.primary-action,
.success-action,
.danger-action,
.secondary-action,
.navigator-choice,
.nav-button,
.back-button {
  transition:
    transform 160ms ease,
    filter 160ms ease,
    opacity 160ms ease,
    box-shadow 160ms ease;
}

.primary-action:active,
.success-action:active,
.danger-action:active,
.secondary-action:active,
.navigator-choice:active,
.nav-button:active,
.back-button:active {
  transform: translateY(1px) scale(0.985);
}

.primary-action[disabled],
.success-action[disabled],
.danger-action[disabled],
.secondary-action[disabled] {
  cursor: wait;
  opacity: 0.68;
  filter: saturate(0.75);
}

.status-badge.route,
.status-badge.pending {
  animation: softPulse 2.8s ease-in-out infinite;
}

.route-line-live {
  stroke-dasharray: none;
  animation: none;
  filter: drop-shadow(0 3px 5px rgba(8, 119, 255, 0.2));
}

.route-line-shadow {
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.22));
}

.driver-route-dot {
  background: transparent;
  border: 0;
  display: none;
}

.driver-route-dot span {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #0877ff;
  border: 2px solid #fff;
  box-shadow:
    0 0 0 3px rgba(8, 119, 255, 0.14),
    0 4px 9px rgba(0, 0, 0, 0.28);
}

.driver-map-marker {
  background: transparent;
  border: 0;
}

.driver-map-marker > span {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 14px;
  background: #096bdb;
  color: #fff;
  box-shadow: 0 10px 18px rgba(16, 24, 40, 0.28);
}

.driver-map-marker.destination > span {
  background: #11984f;
  animation: none;
  box-shadow: 0 10px 18px rgba(16, 24, 40, 0.28);
}

.driver-map-marker.origin > span {
  background: #101828;
}

.driver-map-marker.van > span,
.driver-map-marker.current > span {
  background: #ec1118;
  transform: none;
  box-shadow: 0 10px 18px rgba(16, 24, 40, 0.28);
}

.driver-map-marker.current > .cart-marker-shell,
.driver-map-marker.van > .cart-marker-shell {
  width: 64px;
  height: 54px;
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: none;
  transform-origin: 50% 70%;
}

.cart-shadow {
  position: absolute;
  left: 17px;
  bottom: 8px;
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: rgba(4, 13, 25, 0.28);
  filter: blur(2px);
}

.cart-trail {
  position: absolute;
  left: 0;
  top: 19px;
  display: grid;
  gap: 5px;
}

.cart-trail b {
  width: 13px;
  height: 3px;
  border-radius: 999px;
  background: rgba(8, 119, 255, 0.78);
  animation: cartTrailMove 780ms ease-in-out infinite;
}

.cart-trail b:nth-child(2) {
  width: 9px;
  animation-delay: 110ms;
}

.cart-trail b:nth-child(3) {
  width: 6px;
  animation-delay: 210ms;
}

.delivery-cart {
  position: absolute;
  left: 14px;
  top: 9px;
  width: 43px;
  height: 32px;
}

.cart-box {
  position: absolute;
  left: 0;
  top: 9px;
  width: 28px;
  height: 18px;
  border-radius: 6px 4px 4px 6px;
  background: linear-gradient(135deg, #0877ff, #0047b8);
  border: 2px solid #fff;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28);
}

.cart-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 10px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.cart-cabin {
  position: absolute;
  right: 1px;
  top: 11px;
  width: 17px;
  height: 16px;
  border-radius: 4px 7px 5px 3px;
  background: linear-gradient(135deg, #21dc76, #0d9d56);
  border: 2px solid #fff;
  border-left: 0;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}

.cart-window {
  position: absolute;
  right: 7px;
  top: 14px;
  width: 7px;
  height: 6px;
  border-radius: 2px 5px 2px 2px;
  background: #d9f3ff;
}

.cart-wheel {
  position: absolute;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 0 28%, #07111f 30% 48%, #fff 50% 100%);
  border: 1px solid #07111f;
  animation: wheelSpin 620ms linear infinite;
}

.wheel-left {
  left: 6px;
}

.wheel-right {
  right: 4px;
}

.cart-label,
.destination-label {
  display: none;
}

.driver-map-marker.destination > .destination-marker-shell {
  width: 58px;
  height: 70px;
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: none;
}

.driver-map-marker.destination > .destination-marker-shell::after,
.driver-map-marker.current > .cart-marker-shell::after {
  display: none;
}

.destination-radar {
  position: absolute;
  left: 7px;
  top: 3px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(19, 164, 93, 0.35);
  animation: destinationTargetPulse 1.6s ease-out infinite;
}

.destination-pin {
  position: absolute;
  left: 10px;
  top: 3px;
  width: 38px;
  height: 38px;
  border-radius: 50% 50% 50% 9px;
  background: linear-gradient(135deg, #18bd6b, #0877ff);
  border: 4px solid #fff;
  box-shadow:
    0 0 0 6px rgba(19, 164, 93, 0.16),
    0 10px 18px rgba(0, 0, 0, 0.28);
  transform: rotate(-45deg);
  animation: none;
}

.destination-pin::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.98;
}

.destination-checkmark {
  position: absolute;
  left: 11px;
  top: 12px;
  z-index: 1;
  width: 12px;
  height: 7px;
  border-left: 3px solid #13a45d;
  border-bottom: 3px solid #13a45d;
  transform: rotate(0deg);
}

.driver-map-marker.destination > span::after,
.driver-map-marker.current > span::after {
  display: none;
}

.driver-map-marker.destination > span::after {
  border-color: rgba(19, 164, 93, 0.46);
}

.driver-map-marker.current > span::after {
  border-color: rgba(8, 119, 255, 0.46);
  animation-duration: 1.45s;
}

.driver-map-marker svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
}

.driver-map-marker .destination-check svg {
  width: 15px;
  height: 15px;
  stroke-width: 3.2;
}

@media (hover: hover) {
  .delivery-card:hover,
  .navigator-choice:hover,
  .nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 34px rgba(0, 0, 0, 0.42);
  }

  .primary-action:hover,
  .success-action:hover,
  .danger-action:hover,
  .secondary-action:hover {
    filter: brightness(1.07);
  }
}

@media (min-width: 720px) {
  body {
    min-height: 100vh;
    padding: 20px;
  }

  .driver-app {
    width: min(100%, 820px);
    min-height: calc(100vh - 40px);
    border-radius: 28px;
    overflow: hidden;
  }

  .driver-page {
    min-height: calc(100vh - 40px);
    padding: 30px 34px 118px;
  }

  .driver-page.no-nav {
    padding-bottom: 34px;
  }

  .driver-logo {
    width: 240px;
    margin: 0 0 28px;
  }

  .delivery-stack {
    margin-inline: 0;
    border-radius: 28px;
  }

  .delivery-card {
    min-height: 118px;
    border-radius: 18px;
  }

  .route-page {
    padding: 24px;
  }

  .route-page .screen-top {
    padding: 0;
  }

  .route-map,
  .route-map.rounded {
    border-radius: 28px;
  }

  .route-sheet {
    margin-top: -24px;
    border-radius: 28px 28px 0 0;
  }
}

@media (min-width: 980px) {
  body {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
      linear-gradient(132deg, rgba(28, 45, 69, 0.98) 0%, rgba(75, 105, 148, 0.96) 46%, rgba(10, 17, 29, 1) 100%);
  }

  .driver-app {
    width: min(1480px, calc(100vw - 48px));
    min-height: calc(100vh - 48px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }

  .driver-page {
    min-height: calc(100vh - 48px);
    padding: 34px 38px 120px;
  }

  .home-page {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 24px 32px;
    align-items: start;
  }

  .home-page .driver-logo {
    width: 230px;
    margin: 8px 0 0;
  }

  .home-page .hello {
    align-self: center;
    margin: 0;
  }

  .hello h1 {
    font-size: 3rem;
  }

  .hello p {
    font-size: 1.65rem;
  }

  .home-page .delivery-stack,
  .notifications-page .delivery-stack {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
    gap: 18px;
    align-content: start;
    max-height: calc(100vh - 282px);
    overflow: auto;
    padding: 26px;
  }

  .delivery-date {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    font-size: 1.4rem;
  }

  .delivery-card {
    margin: 0;
  }

  .detail-page .detail-panel,
  .confirm-page,
  .security-page,
  .completed-page,
  .settings-page {
    max-width: 1120px;
    margin-inline: auto;
  }

  .detail-page .detail-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 28px;
    align-items: start;
  }

  .detail-page .detail-panel > div:first-child,
  .detail-code,
  .detail-page .primary-action,
  .detail-page .secondary-action {
    grid-column: 1 / -1;
  }

  .detail-code {
    margin: 10px 0 0;
    font-size: 2.6rem;
  }

  .delivery-window {
    margin: 0;
    align-self: stretch;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: rgba(55, 70, 93, 0.56);
    padding: 28px;
  }

  .route-page {
    min-height: calc(100vh - 48px);
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.82fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 22px;
    padding: 28px;
  }

  .route-page .screen-top {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .route-map,
  .route-map.rounded {
    height: auto;
    min-height: 560px;
    max-height: calc(100vh - 158px);
    border-radius: 28px;
  }

  .route-sheet {
    margin-top: 0;
    min-height: 560px;
    max-height: calc(100vh - 158px);
    overflow: auto;
    border-radius: 28px;
    padding: 34px;
  }

  .sheet-handle {
    display: none;
  }

  .route-destination strong {
    font-size: 2.55rem;
  }

  .route-destination p {
    font-size: 1.35rem;
  }

  .settings-page .form-panel,
  .confirm-page .confirm-box {
    max-width: 760px;
    margin-inline: auto;
  }

  .security-panel {
    min-height: auto;
    margin-inline: auto;
    border-radius: 34px;
    max-width: 760px;
  }

  .bottom-nav {
    width: min(520px, 100% - 70px);
    bottom: 28px;
    gap: 16px;
  }

  .nav-button {
    border-radius: 16px;
  }

  .toast {
    bottom: 116px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 390px) {
  .driver-page {
    padding-inline: 20px;
  }

  .route-page {
    padding-inline: 0;
  }

  .route-page .screen-top {
    padding-inline: 20px;
  }

  .delivery-stack,
  .security-panel {
    margin-inline: -20px;
  }

  .code-boxes {
    gap: 5px;
  }

  .bottom-nav {
    gap: 12px;
  }
}

/* Driver app polish: compact, operational layout */
.driver-page {
  padding-inline: 18px;
}

.home-page {
  display: block;
}

.driver-home-top {
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
}

.driver-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.driver-brand-row .driver-logo,
.home-page .driver-logo {
  width: 152px;
  max-width: 42vw;
  margin: 0;
}

.driver-profile-chip {
  min-width: 68px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.driver-profile-chip span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d9fff0;
  color: #096241;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-profile-chip svg {
  width: 18px;
  height: 18px;
}

.home-page .hello {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(13, 110, 253, 0.28), rgba(0, 179, 142, 0.12)),
    rgba(12, 24, 40, 0.84);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

.home-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #97c1ff;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hello h1 {
  font-size: clamp(1.65rem, 7vw, 2.25rem);
  font-weight: 850;
  line-height: 1.04;
}

.hello p {
  max-width: 32rem;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.98rem;
  line-height: 1.35;
}

.driver-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.driver-stat {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.driver-stat span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.driver-stat strong {
  font-size: 1.7rem;
  line-height: 1;
}

.active-route-card {
  width: 100%;
  min-height: 94px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  margin: 10px 0 16px;
  padding: 16px;
  border: 1px solid rgba(120, 255, 209, 0.34);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(3, 169, 124, 0.3), rgba(7, 119, 255, 0.18)),
    rgba(9, 20, 34, 0.92);
  color: #fff;
  text-align: left;
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.22);
}

.active-route-card small,
.active-route-card em {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-route-card small {
  margin-bottom: 5px;
  color: #78ffd1;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.active-route-card strong {
  display: block;
  margin-bottom: 6px;
  overflow: hidden;
  font-size: 1.18rem;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.active-route-card svg {
  width: 24px;
  height: 24px;
  justify-self: end;
}

.delivery-stack {
  margin-inline: -18px;
  padding: 18px 18px 98px;
  border-radius: 24px 24px 0 0;
  background:
    linear-gradient(180deg, rgba(8, 17, 30, 0.94), rgba(11, 20, 34, 0.98));
}

.delivery-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
}

.delivery-section-heading span {
  font-size: 0.88rem;
}

.delivery-section-heading strong {
  min-width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #78ffd1;
  font-size: 0.9rem;
}

.delivery-card {
  min-height: 116px;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(55, 70, 93, 0.86), rgba(35, 52, 78, 0.9));
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.delivery-card-main {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.delivery-card-overline,
.delivery-card-meta,
.delivery-card-footer {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-card-overline {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.delivery-card strong {
  margin: 0;
  color: #fff;
  font-size: clamp(1rem, 4.6vw, 1.22rem);
  font-weight: 900;
  line-height: 1.15;
}

.delivery-card-meta {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
}

.delivery-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 800;
}

.delivery-card-side {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.delivery-card-side svg {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.55);
}

.delivery-progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.delivery-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #62a1ff, #2ee6a6);
}

.status-badge {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.detail-panel-modern {
  display: grid;
  gap: 16px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.detail-hero {
  display: grid;
  gap: 9px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(10, 111, 255, 0.24), rgba(0, 184, 148, 0.12)),
    rgba(14, 26, 43, 0.94);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

.detail-hero > span {
  justify-self: start;
}

.detail-hero strong {
  color: #9cc2ff;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-hero h2 {
  margin: 0;
  font-size: clamp(1.45rem, 6vw, 2.05rem);
  line-height: 1.08;
  text-transform: uppercase;
}

.detail-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.94rem;
  line-height: 1.35;
}

.detail-progress-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.detail-progress-card > span {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.detail-progress-card small {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 900;
  text-transform: uppercase;
}

.detail-progress-card strong {
  font-size: 1.8rem;
  line-height: 1;
}

.detail-panel-modern .info-card,
.detail-panel-modern .delivery-window {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(55, 70, 93, 0.62);
  text-align: left;
}

.detail-panel-modern .info-line {
  margin-bottom: 13px;
  font-size: 1rem;
}

.detail-panel-modern .delivery-window {
  display: grid;
  gap: 7px;
}

.detail-panel-modern .delivery-window h2,
.detail-panel-modern .delivery-window p {
  margin: 0;
  font-size: 1rem;
}

.detail-panel-modern .delivery-window h2 {
  color: #9cc2ff;
  font-size: 0.8rem;
  font-weight: 900;
}

.detail-panel-modern .primary-action,
.detail-panel-modern .secondary-action {
  min-height: 60px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 900;
}

.bottom-nav {
  width: min(100% - 24px, 438px);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background: rgba(6, 13, 23, 0.88);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.nav-button {
  aspect-ratio: auto;
  min-width: 0;
  min-height: 54px;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 6px 4px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
}

.nav-button.is-active {
  outline: 0;
  background: linear-gradient(145deg, #0b6fff, #00a878);
}

.nav-button svg {
  width: 22px;
  height: 22px;
}

.nav-button span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (min-width: 760px) {
  .home-page {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(340px, 1.2fr);
    gap: 18px;
    align-content: start;
  }

  .driver-home-top,
  .driver-summary-grid,
  .active-route-card {
    grid-column: 1;
  }

  .delivery-stack {
    grid-column: 2;
    grid-row: 1 / span 4;
    margin: 0;
    min-height: calc(100vh - 172px);
    border-radius: 24px;
  }

  .detail-panel-modern {
    max-width: 920px;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
    align-items: start;
  }

  .detail-hero,
  .detail-progress-card,
  .detail-panel-modern .primary-action,
  .detail-panel-modern .secondary-action {
    grid-column: 1 / -1;
  }
}

.login-page {
  gap: 14px;
  padding: 18px;
}

.login-card,
.driver-register-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(16, 33, 55, 0.96), rgba(7, 15, 26, 0.96));
}

.login-card {
  gap: 18px;
  padding: 24px;
}

.login-card .driver-logo {
  width: 170px;
}

.login-card h1 {
  font-size: clamp(1.55rem, 7vw, 2rem);
}

.login-card input,
.driver-register-form input,
.driver-register-form select {
  min-height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.11);
}

.settings-page {
  display: block;
}

.settings-page .screen-top {
  margin-bottom: 18px;
}

.settings-hero {
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(10, 111, 255, 0.2), rgba(0, 168, 120, 0.12)),
    rgba(13, 25, 42, 0.9);
}

.settings-hero h2 {
  font-size: clamp(1.25rem, 5.8vw, 1.7rem);
  line-height: 1.15;
}

.avatar-frame {
  width: 108px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.profile-photo-picker span {
  right: 8px;
  bottom: 8px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.profile-photo-picker span svg {
  width: 20px;
  height: 20px;
}

.settings-page .form-panel {
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.settings-page .field {
  gap: 7px;
}

.settings-page .field label {
  color: #9cc2ff;
  font-size: 0.82rem;
  font-weight: 900;
}

.settings-page .field input,
.settings-page .field select,
.settings-page .navigator-choice {
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1rem;
  font-weight: 750;
}

.settings-page .navigator-choice {
  padding-inline: 16px;
}

.settings-actions {
  gap: 10px;
  margin-top: 10px;
}

.settings-actions .primary-action,
.settings-actions .danger-action,
.settings-actions .install-app-button {
  min-height: 56px;
  border-radius: 16px;
  font-size: 0.98rem;
  font-weight: 900;
}

/* MAYA 3.5 · repartidor móvil */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .driver-shell, .driver-app, .driver-layout { width: 100%; min-height: 100dvh; }
  .driver-header { position: sticky; top: 0; z-index: 50; padding: 10px 12px; backdrop-filter: blur(14px); }
  .driver-main, .driver-content { padding: 10px !important; }
  .driver-grid, .route-grid, .evidence-grid { grid-template-columns: 1fr !important; }
  .driver-card, .route-card, .evidence-card { border-radius: 17px !important; }
  .driver-actions, .evidence-actions { display: grid !important; grid-template-columns: 1fr !important; }
  .driver-actions > *, .evidence-actions > * { width: 100%; min-height: 48px; justify-content: center; }
  .route-map, #driverRouteMap { min-height: 42dvh !important; border-radius: 18px !important; }
  input, select, textarea, button { font-size: 16px; }
  * { scrollbar-width: thin; scrollbar-color: #4e91ff rgba(6,17,31,.85); }
  *::-webkit-scrollbar { width: 9px; height: 9px; }
  *::-webkit-scrollbar-thumb { border-radius: 999px; background: linear-gradient(#7180ff,#2e95e9); }
}

/* IZEL 4.0 · acabado común para la aplicación de reparto */
:root {
  --bg: #07111f;
  --bg-soft: #10223a;
  --panel: rgba(13, 28, 47, .97);
  --card: rgba(22, 43, 69, .94);
  --card-2: rgba(30, 54, 84, .9);
  --muted: #94a7c0;
  --blue: #377cf6;
  --blue-deep: #2863cd;
  --accent: #6ea7ff;
  --green: #25c875;
  --red: #ef6570;
  --gold: #f2b84b;
  --shadow: 0 18px 42px rgba(0,0,0,.28);
}
html { color-scheme: dark; background: #050d18; }
body {
  background:
    radial-gradient(circle at 50% -10%, rgba(55,124,246,.15), transparent 32%),
    linear-gradient(145deg,#0a1728,#050d18);
}
.driver-app {
  background:
    radial-gradient(circle at 100% 0%, rgba(55,124,246,.1), transparent 30%),
    linear-gradient(155deg,#0d1c30,#07111f 65%);
  box-shadow: 0 0 80px rgba(0,0,0,.34);
}
.home-page .hello,
.detail-hero {
  border-color: rgba(133,165,207,.18);
  background:
    radial-gradient(circle at 100% 0%, rgba(55,124,246,.22), transparent 42%),
    linear-gradient(145deg,#142a46,#0d1c30);
  box-shadow: 0 16px 35px rgba(0,0,0,.22);
}
.home-eyebrow,
.detail-hero strong { color: #79adff; letter-spacing: .06em; }
.driver-stat {
  border-color: rgba(137,166,207,.16);
  border-radius: 13px;
  background: rgba(107,139,183,.075);
}
.driver-stat span { color: #8094af; font-size: .65rem; text-transform: none; }
.active-route-card {
  border-color: rgba(60,211,137,.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(37,200,117,.18), transparent 42%),
    linear-gradient(145deg,#13344a,#0c2035);
  box-shadow: 0 15px 34px rgba(0,0,0,.22);
}
.active-route-card small { color: #59db9c; }
.delivery-stack { background: linear-gradient(180deg,rgba(8,20,35,.96),rgba(6,15,27,.99)); }
.delivery-section-heading { text-transform: none; }
.delivery-section-heading strong { color: #75aaff; background: rgba(55,124,246,.13); }
.delivery-card {
  border-color: rgba(136,165,204,.17);
  border-radius: 15px;
  background: linear-gradient(145deg,rgba(21,42,68,.98),rgba(15,31,51,.98));
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
}
.delivery-card:hover { border-color: rgba(99,160,255,.38); background: linear-gradient(145deg,#19365a,#112844); }
.delivery-card-overline { color: #7e94b1; font-size: .68rem; letter-spacing: .03em; }
.delivery-card strong { text-transform: none; }
.delivery-card-meta,
.delivery-card-footer { color: #91a4bd; }
.delivery-progress { background: rgba(133,159,193,.16); }
.delivery-progress span { background: linear-gradient(90deg,#377cf6,#39c3d6); }
.detail-progress-card,
.detail-panel-modern .info-card,
.detail-panel-modern .delivery-window {
  border: 1px solid rgba(137,166,207,.16);
  background: rgba(105,137,181,.07);
}
.detail-hero h2 { text-transform: none; }
.bottom-nav {
  border-color: rgba(135,164,204,.2);
  background: rgba(7,17,31,.92);
  box-shadow: 0 18px 36px rgba(0,0,0,.34);
}
.nav-button { border-radius: 14px; color: #8297b3; }
.nav-button.is-active { color: #fff; background: linear-gradient(145deg,#4388fb,#2d69d4); }
.nav-button span { font-size: .62rem; letter-spacing: 0; text-transform: none; }
.login-card,
.driver-register-card {
  border-color: rgba(137,166,207,.2);
  background:
    radial-gradient(circle at 100% 0%, rgba(55,124,246,.12), transparent 38%),
    linear-gradient(145deg,#14263d,#0d1b2e);
  box-shadow: 0 25px 65px rgba(0,0,0,.36);
}
.login-card h1 { text-transform: none; letter-spacing: -.025em; }
.login-card label { color: #9aacc3; font-size: .7rem; letter-spacing: .03em; text-transform: none; }
.login-card button,
.driver-register-card button { border-radius: 10px; letter-spacing: 0; text-transform: none; }
input, select, textarea {
  border-color: rgba(137,166,207,.23);
  border-radius: 10px;
  background: rgba(98,129,171,.09);
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: #63a0ff; box-shadow: 0 0 0 3px rgba(55,124,246,.14); }
