/* Tema visual YOVOY */
:root {
  --yy-orange: #ff6b00;
  --yy-orange-dark: #e85d00;
  --yy-orange-soft: #fff1e8;
  --yy-ink: #17191c;
  --yy-muted: #6f7580;
  --yy-bg: #f5f5f3;
  --yy-surface: #ffffff;
  --yy-line: #e7e7e3;
  --yy-success: #178a4b;
  --yy-success-soft: #eaf8f0;
  --yy-danger: #d92d3f;
  --yy-radius: 18px;
  --yy-shadow: 0 8px 26px rgba(23,25,28,.07);
}

html { background: var(--yy-bg); }

body {
  color: var(--yy-ink) !important;
  font-family: "Manrope", sans-serif !important;
  background: var(--yy-bg) !important;
}

body.alarm-active {
  animation: alarmPulse .55s ease-in-out infinite !important;
}

.driver-app {
  width: min(100%, 520px) !important;
  gap: 10px !important;
  padding: max(10px, env(safe-area-inset-top)) 10px calc(20px + env(safe-area-inset-bottom)) !important;
}

.driver-top {
  min-height: 58px !important;
  padding: 8px 10px 8px 16px !important;
  border: 0 !important;
  border-radius: 17px !important;
  background: #17191c !important;
  box-shadow: 0 7px 20px rgba(23,25,28,.13) !important;
}

.driver-top .logo,
.driver-logo {
  width: 108px !important;
  height: 38px !important;
  object-fit: contain;
}

.driver-top button {
  width: 40px !important;
  height: 40px !important;
  border: 0 !important;
  border-radius: 12px !important;
  color: #fff !important;
  background: #2a2d31 !important;
}

.driver-sound-required {
  position: fixed;
  z-index: 25000;
  inset: 0;
  display: grid;
  place-items: center;
  padding:
    max(22px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  color: #fff;
  background: rgba(8, 9, 11, .9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  overscroll-behavior: contain;
  touch-action: manipulation;
}

.driver-sound-required.hidden {
  display: none !important;
}

body.driver-sound-gated {
  overflow: hidden !important;
  touch-action: none;
}

.driver-sound-required-card {
  width: min(92vw, 520px);
  min-height: min(66vh, 540px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 20px;
  padding: clamp(30px, 7vw, 48px) clamp(22px, 6vw, 42px);
  border: 3px solid #ff6500;
  border-radius: 30px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 5%, rgba(255, 101, 0, .22), transparent 36%),
    #17191c;
  box-shadow:
    0 0 0 7px rgba(255, 101, 0, .11),
    0 28px 70px rgba(0, 0, 0, .52);
}

.driver-sound-required-icon {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 28px;
  color: #fff;
  background: #ff6500;
  font-size: 44px;
  box-shadow: 0 16px 34px rgba(255, 101, 0, .4);
}

.driver-sound-required-copy small {
  display: block;
  margin-bottom: 8px;
  color: #ff9a56;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .14em;
}

.driver-sound-required strong {
  display: block;
  font-size: clamp(25px, 6.4vw, 34px);
  font-weight: 950;
  line-height: 1.05;
  text-wrap: balance;
}

.driver-sound-required p {
  max-width: 390px;
  margin: 12px auto 0;
  color: #d9dde2;
  font-size: clamp(14px, 3.6vw, 17px);
  font-weight: 750;
  line-height: 1.45;
}

.driver-sound-required button {
  width: 100%;
  min-height: 64px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: #ff6500;
  font-family: inherit;
  font-size: clamp(16px, 4.2vw, 19px);
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(255, 101, 0, .34);
  cursor: pointer;
}

.driver-sound-required button:active {
  transform: scale(.985);
}

.driver-sound-required em {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #bfc5cc;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
}

.driver-sound-required.needs-attention .driver-sound-required-card {
  animation: driverSoundGate 1s ease-in-out infinite alternate;
}

.order-actions {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)) !important;
}

@keyframes driverSoundGate {
  to {
    border-color: #ffb47f;
    box-shadow:
      0 0 0 11px rgba(255, 101, 0, .16),
      0 30px 76px rgba(0, 0, 0, .58);
  }
}

@media (prefers-reduced-motion: reduce) {
  .driver-sound-required.needs-attention .driver-sound-required-card { animation: none; }
}

/* Decisión crítica del viaje: dos zonas táctiles completas, sin columnas ni
   elementos decorativos capaces de interceptar el primer toque. */
.smart-actions.is-decision {
  position: relative !important;
  z-index: 20 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  gap: 10px !important;
}

.smart-actions.is-decision #driver-main-action,
.smart-actions.is-decision #driver-reject-action {
  position: relative !important;
  z-index: 21 !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 62px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

.smart-actions.is-decision #driver-main-action { order: 1 !important; }
.smart-actions.is-decision #driver-reject-action { order: 2 !important; min-height: 56px !important; }

.smart-actions.is-decision #driver-main-action::before,
.smart-actions.is-decision #driver-main-action::after,
.smart-actions.is-decision #driver-reject-action::before,
.smart-actions.is-decision #driver-reject-action::after {
  pointer-events: none !important;
}

@media (max-height: 620px) {
  .driver-sound-required-card {
    min-height: 88vh;
    gap: 13px;
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .driver-sound-required-icon {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    font-size: 34px;
  }
}

.login-card,
.hero-card,
.driver-map-card,
.orders-card,
.order-card {
  border: 1px solid var(--yy-line) !important;
  background: var(--yy-surface) !important;
  box-shadow: var(--yy-shadow) !important;
}

.login-card {
  padding: 24px !important;
  border-radius: 22px !important;
}

.login-card .logo {
  width: 126px !important;
  padding: 10px 14px;
  border-radius: 14px;
  background: #17191c;
}

.login-card .eyebrow {
  color: var(--yy-orange-dark) !important;
  background: var(--yy-orange-soft) !important;
}

.login-card h1 { color: var(--yy-ink) !important; letter-spacing: -.045em; }

.login-card input {
  min-height: 48px !important;
  border: 1px solid #dcdeda !important;
  border-radius: 12px !important;
  background: #fff !important;
}

.login-card input:focus {
  border-color: var(--yy-orange) !important;
  outline: 3px solid rgba(255,107,0,.12) !important;
}

.login-card > button {
  min-height: 48px !important;
  border-radius: 12px !important;
  background: var(--yy-orange) !important;
  box-shadow: none !important;
}

.hero-card {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 7px 10px !important;
  min-height: auto !important;
  padding: 14px !important;
  border-radius: 19px !important;
  color: var(--yy-ink) !important;
}

.hero-card::after { display: none !important; }

.hero-card h1 {
  margin: 2px 0 0 !important;
  color: var(--yy-ink) !important;
  font-size: clamp(24px, 7vw, 31px) !important;
  line-height: 1.05 !important;
  letter-spacing: -.045em;
}

.hero-card > p { display: none !important; }

.driver-status-banner {
  width: max-content !important;
  margin: 0 !important;
  padding: 5px !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: var(--yy-success) !important;
  background: var(--yy-success-soft) !important;
  box-shadow: none !important;
}

.driver-status-banner .eyebrow,
.driver-status-banner strong {
  color: inherit !important;
  background: transparent !important;
  font-size: 10px !important;
}

.driver-online-badge {
  justify-self: end !important;
  align-self: start !important;
  border: 0 !important;
  color: var(--yy-success) !important;
  background: var(--yy-success-soft) !important;
  box-shadow: none !important;
}

.current-trip-card {
  grid-column: 1 / -1 !important;
  margin: 5px 0 0 !important;
  padding: 12px !important;
  border: 1px solid var(--yy-line) !important;
  border-radius: 14px !important;
  color: var(--yy-ink) !important;
  background: #fafaf8 !important;
  box-shadow: none !important;
}

.trip-status {
  color: var(--yy-orange-dark) !important;
  background: var(--yy-orange-soft) !important;
}

.smart-actions {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
  margin-top: 3px !important;
}

.driver-btn,
.smart-actions button {
  min-height: 48px !important;
  border: 0 !important;
  border-radius: 12px !important;
  color: #fff !important;
  background: var(--yy-orange) !important;
  box-shadow: none !important;
  font-weight: 800 !important;
}

.driver-btn.secondary,
.driver-btn.ghost,
.smart-actions button:nth-child(2) {
  border: 1px solid var(--yy-line) !important;
  color: var(--yy-ink) !important;
  background: #fff !important;
}

.driver-location-line {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: var(--yy-muted) !important;
  background: #f3f3f0 !important;
  font-size: 10px !important;
}

.driver-map-card {
  min-height: 380px !important;
  padding: 10px !important;
  border-radius: 19px !important;
}

.route-panel-head {
  padding: 3px 3px 9px !important;
}

.route-panel-kicker {
  color: var(--yy-orange-dark) !important;
  font-size: 9px !important;
  letter-spacing: .08em !important;
}

.route-panel-head strong { color: var(--yy-ink) !important; font-size: 17px !important; }

.mini-map-action {
  width: 38px !important;
  height: 38px !important;
  border: 1px solid var(--yy-line) !important;
  border-radius: 11px !important;
  color: var(--yy-ink) !important;
  background: #fff !important;
}

.driver-map {
  min-height: 320px !important;
  border-radius: 14px !important;
  background: #ecece8 !important;
}

.map-empty {
  border: 1px dashed #d7d9d5 !important;
  color: var(--yy-muted) !important;
  background: #fafaf8 !important;
}

.route-panel-controls {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 7px !important;
  margin-top: 8px !important;
}

.route-control {
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 11px !important;
  color: #fff !important;
  background: #17191c !important;
  font-weight: 800 !important;
}

.route-control.secondary {
  border: 1px solid var(--yy-line) !important;
  color: var(--yy-ink) !important;
  background: #fff !important;
}

.driver-map-card.route-focus {
  outline: 3px solid rgba(255,107,0,.13) !important;
}

.orders-card {
  padding: 14px !important;
  border-radius: 19px !important;
}

.section-head h2,
.orders-card h2 {
  color: var(--yy-ink) !important;
  font-size: 19px !important;
  letter-spacing: -.035em;
}

.section-head span {
  color: var(--yy-success) !important;
  background: var(--yy-success-soft) !important;
}

.order-card {
  padding: 12px !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

.order-earnings { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px solid #ffd7bc; border-radius: 12px; background: #fff8f3; }
.order-earnings span, .order-earnings strong { display: block; }
.order-earnings span { color: var(--yy-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.order-earnings strong { margin-top: 2px; color: var(--yy-orange-dark); font-size: 20px; line-height: 1; }
.order-earnings small { color: var(--yy-muted); font-size: 10px; font-weight: 800; text-align: right; }

.order-card button {
  min-height: 40px !important;
  border-radius: 11px !important;
  background: var(--yy-orange) !important;
}

.order-actions .preview-route {
  border: 1px solid #ffd7bc !important;
  color: var(--yy-orange-dark) !important;
  background: #fff8f3 !important;
}

.order-actions .start-route {
  color: #fff !important;
  background: var(--yy-orange) !important;
}

.smart-actions #driver-main-action.accept-offer-action,
.order-actions .start-route.accept-offer-button {
  border-color: #101216 !important;
  color: #fff !important;
  background: linear-gradient(115deg, #050608, #22262c 48%, #050608) !important;
  box-shadow: 0 14px 30px rgba(5, 6, 8, 0.3) !important;
}

.driver-map-card .map-google-action {
  border: 1px solid rgba(255, 255, 255, 0.82) !important;
  color: #fff !important;
  background: linear-gradient(135deg, #0b57d0, #1a73e8) !important;
}

.map-chat-below-action {
  display: flex !important;
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  border-radius: 13px;
  padding-inline: 14px;
  font-size: 12px;
}

.map-chat-below-action.hidden {
  display: none !important;
}

.map-chat-below-action span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  border: 1px dashed #d7d9d5 !important;
  border-radius: 14px !important;
  color: var(--yy-muted) !important;
  background: #fafaf8 !important;
}

@media (max-width: 520px) {
  .driver-app { width: 100% !important; padding-inline: 8px !important; }
  .driver-top { border-radius: 15px !important; }
  .hero-card,
  .driver-map-card,
  .orders-card { border-radius: 17px !important; }
  .driver-map-card { min-height: 350px !important; }
  .driver-map { min-height: 292px !important; }
  .route-panel-controls { grid-template-columns: 1fr 1fr !important; }
}

/* Decisión prioritaria del viaje: ganancia y acciones antes del mapa. */
.current-trip-card {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: stretch !important;
}

.current-trip-copy {
  display: grid;
  min-width: 0;
  align-content: center;
}

.current-trip-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.current-trip-payout {
  display: grid;
  min-width: 118px;
  place-items: center;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid #ffcaa9;
  border-radius: 13px;
  color: #fff !important;
  background: var(--yy-orange) !important;
  text-align: center;
}

.current-trip-payout span,
.current-trip-payout strong,
.current-trip-payout small {
  color: #fff !important;
}

.current-trip-payout span {
  font-size: 8px !important;
}

.current-trip-payout strong {
  margin: 3px 0 1px !important;
  font-size: 25px !important;
  line-height: 1 !important;
}

.current-trip-payout small {
  margin: 0 !important;
  font-size: 8px !important;
}

.smart-actions #driver-main-action {
  order: 1;
}

.smart-actions #driver-secondary-action {
  order: 2;
}

.smart-actions #driver-reject-action {
  order: 3;
  border: 1px solid #efb8b3 !important;
  color: #c62828 !important;
  background: #fff !important;
}

.smart-actions.is-decision {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) !important;
}

.smart-actions.is-decision #driver-secondary-action {
  grid-column: 1 / -1;
  order: 1;
}

.smart-actions.is-decision #driver-reject-action {
  grid-column: 1;
  order: 2;
}

.smart-actions.is-decision #driver-main-action {
  grid-column: 2;
  order: 3;
}

.driver-priority-map {
  margin-top: 10px !important;
}

.driver-orders-lower,
.driver-activity-lower {
  scroll-margin-top: 12px;
}

.driver-activity-lower {
  margin-top: 12px;
}

.hero-card.offer-focus,
.order-card.offer-focus {
  outline: 3px solid rgba(255, 101, 8, .28) !important;
  box-shadow: 0 16px 40px rgba(255, 101, 8, .20) !important;
}

@media (max-width: 380px) {
  .current-trip-card {
    grid-template-columns: 1fr !important;
  }

  .current-trip-payout {
    grid-template-columns: auto auto auto;
    gap: 6px;
    min-width: 0;
    justify-content: center;
  }

  .current-trip-payout strong {
    margin: 0 !important;
    font-size: 22px !important;
  }
}

.driver-session-restore {
  display: none;
}

html.driver-session-restoring .driver-session-restore {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-content: center;
  place-items: center;
  gap: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 101, 0, .24), transparent 28%),
    #17191c;
}

html.driver-session-restoring .driver-session-restore img {
  width: 136px;
  height: auto;
}

html.driver-session-restoring .driver-session-restore span {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, .22);
  border-top-color: #ff6500;
  border-radius: 50%;
  animation: driver-session-spin .7s linear infinite;
}

html.driver-session-restoring .driver-session-restore strong {
  font-size: 12px;
  letter-spacing: .02em;
}

html:not(.driver-session-restoring) .driver-session-restore {
  display: none;
}

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

/* Controles compactos de operación en el banner superior. */
.driver-top {
  min-height: 56px !important;
  padding: 6px 7px 6px 12px !important;
}

.driver-top .logo {
  width: 94px !important;
  height: 34px !important;
  margin: 0 !important;
  display: block;
  opacity: 1 !important;
  object-fit: contain;
  filter: none !important;
}

.driver-top-brand {
  position: relative;
  display: grid;
  width: 94px;
  height: 38px;
  flex: 0 0 94px;
  place-items: center;
  overflow: visible;
}

.driver-top-brand-fallback {
  display: none;
  position: relative;
  color: #fff;
  font-size: 21px;
  font-weight: 950;
  letter-spacing: -.08em;
  line-height: 1;
}

.driver-top-brand-fallback i {
  position: absolute;
  left: 22%;
  right: 16%;
  top: 24px;
  height: 8px;
  border-bottom: 1.8px solid #fff;
  border-radius: 0 0 50% 50%;
}

.driver-top-brand.is-fallback .driver-top-brand-fallback {
  display: block;
}

.driver-top-capabilities {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.driver-top .driver-capability-button {
  display: grid !important;
  width: 45px !important;
  height: auto !important;
  min-height: 47px !important;
  place-items: center;
  gap: 2px;
  padding: 2px !important;
  border: 0 !important;
  border-radius: 11px !important;
  color: #fff !important;
  background: transparent !important;
  box-shadow: none !important;
}

.driver-capability-circle {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  color: #fff;
  background: #353940;
  font-size: 14px;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.driver-capability-button small {
  color: #eef1f4;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
}

#driver-sound-button.is-active .driver-capability-circle {
  border-color: #00c857;
  background: #00a844;
  box-shadow: 0 0 0 3px rgba(0,200,87,.18), 0 5px 12px rgba(0,168,68,.34);
}

#driver-location-button.is-active .driver-capability-circle {
  border-color: #3093ff;
  background: #087cff;
  box-shadow: 0 0 0 3px rgba(8,124,255,.18), 0 5px 12px rgba(8,124,255,.34);
}

#driver-location-button.is-pending .driver-capability-circle {
  border-color: #287fd8;
  background: #125da9;
}

.driver-capability-button.needs-attention .driver-capability-circle {
  animation: driverCapabilityAttention .8s ease-in-out infinite alternate;
}

.driver-top .driver-top-chat-button,
.driver-top .driver-profile-button {
  position: relative;
  display: grid !important;
  width: 43px !important;
  height: auto !important;
  min-height: 47px !important;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 2px !important;
  border-radius: 11px !important;
  color: #fff !important;
  background: transparent !important;
  box-shadow: none !important;
}

.driver-top-chat-circle,
.driver-profile-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  color: #fff;
  background: #353940;
  font-size: 14px;
  font-style: normal;
  font-weight: 950;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.driver-profile-avatar {
  border-color: rgba(255,101,0,.72);
  background: #ff6500;
  overflow: hidden;
}

.driver-profile-avatar img,
.driver-profile-card-avatar img,
.driver-profile-photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.driver-top-chat-button small,
.driver-profile-button small {
  color: #eef1f4;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
}

.driver-top-chat-button b {
  position: absolute;
  z-index: 2;
  top: -2px;
  right: -1px;
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #17191c;
  border-radius: 999px;
  color: #fff;
  background: #ef3340;
  font-size: 9px;
  font-weight: 950;
}

.driver-top-chat-button.has-unread .driver-top-chat-circle {
  border-color: #ff8b3d;
  color: #fff;
  background: #ff6500;
  animation: driverChatAttention .82s ease-in-out infinite alternate;
}

@keyframes driverChatAttention {
  to {
    transform: translateY(-1px) scale(1.08);
    box-shadow: 0 0 0 4px rgba(255,101,0,.24), 0 7px 18px rgba(255,101,0,.32);
  }
}

.driver-profile-popover {
  position: fixed;
  z-index: 23000;
  inset: 0;
  display: grid;
  align-items: start;
  justify-items: center;
  padding:
    max(76px, calc(env(safe-area-inset-top) + 66px))
    max(12px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
}

.driver-profile-popover.hidden { display: none !important; }

.driver-profile-backdrop {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(10,12,15,.52) !important;
  backdrop-filter: blur(4px);
}

.driver-profile-card {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 390px);
  max-height: calc(100vh - 94px);
  max-height: calc(100dvh - 94px);
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 17px;
  border: 1px solid #e3e5e8;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 65px rgba(5,8,12,.28);
}

.driver-profile-card-head {
  display: grid;
  grid-template-columns: 50px minmax(0,1fr) 38px;
  align-items: center;
  gap: 11px;
}

.driver-profile-card-avatar {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #ff7a17, #ee5300);
  box-shadow: 0 8px 18px rgba(255,101,0,.25);
  font-size: 21px;
  font-weight: 950;
}

.driver-profile-card-head > div { display: grid; gap: 2px; min-width: 0; }
.driver-profile-card-head small { color: #e85d00; font-size: 9px; font-weight: 950; letter-spacing: .09em; }
.driver-profile-card-head h2 { margin: 0; color: #17191c; font-size: 20px; letter-spacing: -.04em; }

.driver-profile-card-head > button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #e2e5e8;
  border-radius: 12px;
  color: #30343a;
  background: #f5f6f7;
}

.driver-profile-identity {
  display: grid;
  gap: 3px;
  padding: 13px 14px;
  border-radius: 15px;
  background: #f6f7f8;
}

.driver-profile-identity strong { color: #17191c; font-size: 16px; font-weight: 950; }
.driver-profile-identity span { color: #737984; font-size: 12px; font-weight: 650; }
.driver-profile-identity em {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #08783d;
  background: #e3f7ec;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.driver-profile-identity em.is-offline { color: #7a3b28; background: #fff0e8; }
.driver-profile-identity em i { font-size: 7px; }

.driver-profile-photo-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e6e8eb;
  border-radius: 16px;
  background: #fff;
}

.driver-profile-photo-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.driver-profile-photo-preview {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 21px;
  color: #fff;
  background: linear-gradient(145deg, #ff7a17, #ee5300);
  box-shadow: 0 0 0 1px #dfe3e7, 0 9px 21px rgba(23,25,28,.13);
  font-size: 25px;
  font-weight: 950;
}

.driver-profile-photo-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.driver-profile-photo-copy > strong {
  color: #17191c;
  font-size: 14px;
  font-weight: 950;
}

.driver-profile-photo-copy > small {
  color: #737984;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
}

.driver-profile-photo-picker {
  display: inline-flex;
  width: max-content;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 2px;
  padding: 7px 11px;
  border: 1px solid #ffd5b8;
  border-radius: 10px;
  color: #d84f00;
  background: #fff4ec;
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
  touch-action: manipulation;
}

.driver-profile-photo-picker.is-disabled {
  cursor: wait;
  opacity: .58;
  pointer-events: none;
}

.driver-profile-photo-editor:focus-within .driver-profile-photo-picker {
  outline: 3px solid rgba(255,101,0,.3);
  outline-offset: 2px;
}

.driver-profile-photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.driver-profile-photo-actions {
  display: grid;
  gap: 8px;
}

.driver-profile-photo-state {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  min-height: 28px;
  padding: 7px 9px;
  border-radius: 10px;
  color: #626975;
  background: #f3f5f6;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

.driver-profile-photo-state > i {
  margin-top: 1px;
  font-size: 12px;
}

.driver-profile-photo-state.is-ready { color: #a74608; background: #fff1e7; }
.driver-profile-photo-state.is-uploading { color: #075eb8; background: #eaf4ff; }
.driver-profile-photo-state.is-saved { color: #08783d; background: #e3f7ec; }
.driver-profile-photo-state.is-error { color: #a12a22; background: #ffebe9; }
.driver-profile-photo-state.is-uploading > i { animation: driverActionSpin .72s linear infinite; }

#driver-profile-photo-save {
  display: inline-flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #ff6500;
  font-family: inherit;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(255,101,0,.2);
}

#driver-profile-photo-save:disabled {
  color: #8a9099;
  background: #e8ebee;
  box-shadow: none;
}

#driver-profile-photo-save[aria-busy="true"] > i {
  animation: driverActionSpin .72s linear infinite;
}

.driver-profile-activity,
.driver-profile-logout {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid #e1e4e7;
  border-radius: 14px;
  font-family: inherit;
  text-align: left;
}

.driver-profile-activity { color: #17191c; background: #fff; }
.driver-profile-activity > i:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 11px;
  color: #ff6500;
  background: #fff0e6;
  font-size: 16px;
}
.driver-profile-activity > span { display: grid; min-width: 0; gap: 1px; }
.driver-profile-activity strong { font-size: 13px; font-weight: 950; }
.driver-profile-activity small { color: #777e88; font-size: 10px; font-weight: 650; }
.driver-profile-activity > i:last-child { margin-left: auto; color: #838994; }

.driver-profile-logout {
  justify-content: center;
  color: #fff;
  background: #202328;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(23,25,28,.14);
}

@keyframes driverCapabilityAttention {
  to { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(255,101,0,.24); }
}

.hero-card {
  padding: 11px 12px !important;
  gap: 6px 9px !important;
}

.hero-card h1 { font-size: clamp(21px, 6vw, 27px) !important; }
.current-trip-card { padding: 10px !important; }
.smart-actions.hidden { display: none !important; }

.driver-btn,
.smart-actions button {
  min-height: 45px !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.smart-actions button.is-busy,
.smart-actions button:disabled { cursor: wait; opacity: .82; }

#driver-main-action.offline-action,
#driver-main-action.connect-action {
  font-size: 15px !important;
  letter-spacing: -.01em;
}

#driver-main-action.connect-action {
  color: #fff !important;
  border-color: #08783f !important;
  background: linear-gradient(135deg, #0aa55a, #08783f) !important;
  box-shadow: 0 12px 26px rgba(8, 120, 63, .28) !important;
}

#driver-main-action.offline-action {
  color: #fff !important;
  border-color: #b42318 !important;
  background: linear-gradient(135deg, #e13a2d, #b42318) !important;
  box-shadow: 0 12px 26px rgba(180, 35, 24, .25) !important;
}

#driver-main-action.is-busy {
  filter: saturate(.8);
  animation: driverAvailabilityPulse .7s ease-in-out infinite alternate;
}

@keyframes driverAvailabilityPulse {
  to { transform: scale(.985); box-shadow: 0 7px 18px rgba(15, 23, 42, .18) !important; }
}

.smart-actions.is-decision {
  grid-template-columns: minmax(0,.72fr) minmax(0,1.28fr) !important;
}

.smart-actions.is-decision #driver-reject-action {
  grid-column: 1 !important;
  order: 1 !important;
}

.smart-actions.is-decision #driver-main-action {
  grid-column: 2 !important;
  order: 2 !important;
}

.driver-map-card { min-height: 350px !important; }
.driver-map { min-height: 292px !important; }

.driver-trip-map-actions {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(178px,.9fr);
  align-items: center;
  gap: 10px;
  margin-top: -2px;
  padding: 10px;
  border: 1px solid #dfe4e8;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--yy-shadow);
}

.driver-trip-map-actions.hidden { display: none !important; }
.driver-trip-map-actions > span { display: grid; gap: 2px; min-width: 0; }
.driver-trip-map-actions small { color: #6f7580; font-size: 8px; font-weight: 950; letter-spacing: .08em; }
.driver-trip-map-actions strong { color: #17191c; font-size: 12px; font-weight: 900; line-height: 1.25; }

.driver-trip-map-actions button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 13px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 950;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.driver-trip-map-actions button:active:not(:disabled) { transform: scale(.98); }
.driver-trip-map-actions button.is-busy,
.driver-trip-map-actions button:disabled { cursor: wait; opacity: .82; }
.driver-action-spinner { animation: driverActionSpin .72s linear infinite; }

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

.driver-trip-map-actions button.is-pickup {
  background: #5b21b6;
  box-shadow: 0 9px 20px rgba(91,33,182,.28);
}

@media (hover: hover) {
  .driver-trip-map-actions button.is-pickup:hover:not(:disabled):not([aria-disabled="true"]) {
    background: #4c1d95;
    box-shadow: 0 11px 24px rgba(76,29,149,.34);
  }
}

.driver-trip-map-actions button.is-pickup:focus-visible {
  outline: 3px solid #5b21b6 !important;
  outline-offset: 3px;
}

.driver-trip-map-actions button.is-delivery {
  background: #008f45;
  box-shadow: 0 9px 20px rgba(0,143,69,.22);
}

.order-card button {
  font-size: 13px !important;
  font-weight: 900 !important;
}

@media (max-width: 520px) {
  .driver-top-brand { width: 82px; flex-basis: 82px; }
  .driver-top .logo { width: 82px !important; }
  .driver-top-capabilities { gap: 2px; }
  .driver-map-card { min-height: 326px !important; }
  .driver-map { min-height: 270px !important; }
  .driver-trip-map-actions { grid-template-columns: 1fr; gap: 7px; }
  .driver-trip-map-actions > span { padding-inline: 3px; }
  .driver-trip-map-actions button { width: 100%; }
}

@media (max-width: 365px) {
  .driver-top { padding-inline: 8px 4px !important; }
  .driver-top-brand { width: 68px; flex-basis: 68px; }
  .driver-top .logo { width: 68px !important; }
  .driver-top .driver-capability-button,
  .driver-top .driver-top-chat-button,
  .driver-top .driver-profile-button { width: 43px !important; }
  .driver-top #driver-location-button { width: 52px !important; }
  .driver-top-capabilities { gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .driver-capability-button.needs-attention .driver-capability-circle,
  .driver-top-chat-button.has-unread .driver-top-chat-circle { animation: none; }
}

/* Estado territorial y mensajes en vivo del viaje. */
.driver-status-banner.status-outside {
  color: #9a4b00 !important;
  background: #fff1d6 !important;
}

#driver-location-button.is-active.needs-attention .driver-capability-circle {
  border-color: #ff9f2f !important;
  background: #e87500 !important;
  box-shadow: 0 0 0 3px rgba(232,117,0,.18), 0 5px 12px rgba(154,75,0,.25) !important;
}

.store-delivery-chat-badge {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #e83d18;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.store-delivery-chat-badge.hidden { display: none !important; }

/* Mapa propio antes del primer pedido y resumen activo más compacto. */
.driver-location-line {
  display: none !important;
}

.driver-location-map-fallback {
  overflow: hidden;
  background: #eef3f1 !important;
}

.driver-location-map-grid {
  position: relative;
  width: 100%;
  min-height: 270px;
  overflow: hidden;
  background:
    linear-gradient(34deg, transparent 45%, rgba(205, 218, 214, .72) 46% 50%, transparent 51%),
    linear-gradient(145deg, transparent 44%, rgba(217, 226, 223, .88) 45% 50%, transparent 51%),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(208, 221, 217, .65) 36px 38px),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(208, 221, 217, .65) 43px 45px),
    #eef5f3;
}

.driver-location-road {
  position: absolute;
  display: block;
  height: 14px;
  border: 4px solid #fff;
  border-radius: 999px;
  background: #d7e2df;
  box-shadow: 0 2px 6px rgba(23, 25, 28, .06);
}

.driver-location-road.road-one { width: 72%; top: 21%; left: -8%; transform: rotate(12deg); }
.driver-location-road.road-two { width: 86%; top: 62%; right: -14%; transform: rotate(-18deg); }
.driver-location-road.road-three { width: 63%; top: 43%; left: 31%; transform: rotate(78deg); }
.driver-location-road.road-four { width: 55%; bottom: 12%; left: -5%; transform: rotate(6deg); }

.driver-location-you {
  position: absolute;
  z-index: 3;
  top: 48%;
  left: 50%;
  display: grid;
  width: 76px;
  height: 62px;
  place-items: center;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 28px rgba(23, 25, 28, .22);
  transform: translate(-50%, -50%);
}

.driver-location-you::after {
  position: absolute;
  z-index: -1;
  inset: -17px;
  border: 2px solid rgba(255, 101, 0, .24);
  border-radius: 50%;
  content: "";
  animation: driverLocationPulse 1.8s ease-out infinite;
}

.driver-location-you img {
  display: block;
  width: 70px;
  height: 54px;
  object-fit: contain;
}

.driver-location-label {
  position: absolute;
  z-index: 4;
  top: calc(48% + 40px);
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(23, 25, 28, .08);
  border-radius: 999px;
  color: #17191c;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 8px 20px rgba(23, 25, 28, .12);
  font-size: 10px;
  font-weight: 900;
  transform: translateX(-50%);
}

.current-trip-card {
  grid-template-columns: minmax(0, 1fr) 92px !important;
  gap: 7px !important;
  align-items: stretch !important;
  margin-top: 2px !important;
  padding: 8px !important;
  border-radius: 12px !important;
}

.current-trip-copy {
  align-content: start !important;
  gap: 3px !important;
}

.current-trip-copy > strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px !important;
  line-height: 1.15 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.current-trip-copy > small {
  overflow: hidden;
  color: #68717c !important;
  font-size: 8px !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-trip-service {
  justify-self: start;
  padding: 4px 7px !important;
  font-size: 7px !important;
}

.current-trip-locations {
  grid-template-columns: 1fr 1fr !important;
  gap: 5px !important;
  margin-top: 1px !important;
}

.current-trip-locations > span {
  grid-template-columns: 15px minmax(0, 1fr) !important;
  max-height: 47px;
  min-height: 0 !important;
  overflow: hidden;
  padding: 5px !important;
  font-size: 7px !important;
  line-height: 1.18 !important;
}

.current-trip-locations > span i { font-size: 12px !important; }
.current-trip-locations > span b { font-size: 7px !important; }

.current-trip-payout {
  min-width: 92px !important;
  padding: 8px 6px !important;
  border-radius: 11px !important;
}

.current-trip-payout span,
.current-trip-payout small { font-size: 7px !important; }
.current-trip-payout strong { font-size: 22px !important; }

@keyframes driverLocationPulse {
  from { opacity: .75; transform: scale(.7); }
  to { opacity: 0; transform: scale(1.22); }
}

@media (max-width: 380px) {
  .current-trip-card {
    grid-template-columns: minmax(0, 1fr) 82px !important;
  }

  .current-trip-payout {
    display: grid !important;
    min-width: 82px !important;
    grid-template-columns: 1fr !important;
    gap: 1px !important;
  }

  .current-trip-payout strong {
    margin: 2px 0 !important;
    font-size: 20px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .driver-location-you::after { animation: none; }
}
:where(button, [role="button"], a.btn, a[class*="button"], a[class*="action"]):not(:disabled):not([aria-disabled="true"]) {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform-origin: center;
  transition:
    transform .09s ease,
    filter .09s ease,
    opacity .09s ease,
    box-shadow .16s ease !important;
}

:where(button, [role="button"], a.btn, a[class*="button"], a[class*="action"]):not(:disabled):not([aria-disabled="true"]):is(:active, .yovoy-button-pressed) {
  transform: translateY(2px) scale(.95) !important;
  filter: brightness(.84) saturate(1.16) !important;
  opacity: .92;
}

:where(button, [role="button"], a.btn, a[class*="button"], a[class*="action"]):not(:disabled):not([aria-disabled="true"]):focus-visible {
  outline: 3px solid rgba(255, 101, 0, .5) !important;
  outline-offset: 3px;
}

/* Los controles internos del mapa conservan el gesto y respuesta nativos de Google Maps. */
.gm-style :where(button, [role="button"], a) {
  touch-action: auto;
  transition: none !important;
}

.gm-style :where(button, [role="button"], a):is(:active, .yovoy-button-pressed) {
  transform: none !important;
  filter: none !important;
  opacity: 1;
}

button[aria-busy="true"] {
  animation: yovoy-button-working .72s ease-in-out infinite alternate;
}

@keyframes yovoy-button-working {
  from { box-shadow: 0 0 0 0 rgba(255, 101, 8, .2); }
  to { box-shadow: 0 0 0 7px rgba(255, 101, 8, 0); }
}

@media (prefers-reduced-motion: reduce) {
  :where(button, [role="button"], a.btn, a[class*="button"], a[class*="action"]):not(:disabled):not([aria-disabled="true"]) {
    transition: filter .01s linear, opacity .01s linear !important;
  }

  :where(button, [role="button"], a.btn, a[class*="button"], a[class*="action"]):not(:disabled):not([aria-disabled="true"]):is(:active, .yovoy-button-pressed) {
    transform: none !important;
  }
}

/*
 * Cuenta de efectivo y cobro al entregar.
 * Los avisos son parte del flujo normal (nunca flotan sobre Aceptar/Rechazar).
 * La única capa fija es la confirmación intencional de "Pedido entregado".
 */
.driver-cash-account {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
  width: 100%;
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid #9eddbd;
  border-radius: 14px;
  background: #effcf5;
  color: #123d2a;
  box-sizing: border-box;
}

.driver-cash-account.hidden { display: none !important; }

.driver-cash-account.is-warning {
  border-color: #f3c56c;
  background: #fff8e8;
  color: #633b00;
}

.driver-cash-account.is-blocked {
  border-color: #ef8c8c;
  background: #fff1f1;
  color: #6f1717;
}

.driver-cash-account-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #d7f7e6;
  color: #08763e;
  font-size: 18px;
}

.driver-cash-account.is-warning .driver-cash-account-icon {
  background: #ffebbd;
  color: #9a5900;
}

.driver-cash-account.is-blocked .driver-cash-account-icon {
  background: #ffdada;
  color: #bc2525;
}

.driver-cash-account-copy { min-width: 0; }
.driver-cash-account-copy small,
.driver-cash-account-copy strong,
.driver-cash-account-copy p { display: block; }
.driver-cash-account-copy small { font-size: 9.5px; font-weight: 900; letter-spacing: .035em; }
.driver-cash-account-copy strong { margin-top: 1px; font-size: 20px; line-height: 1.05; }

.driver-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.driver-cash-account-values {
  text-align: right;
  white-space: nowrap;
}

.driver-cash-account-values strong,
.driver-cash-account-values span,
.driver-cash-account-values small { display: block; }
.driver-cash-account-values strong { margin-top: 1px; font-size: 12px; line-height: 1.15; }
.driver-cash-account-values span { font-size: 9.5px; font-weight: 850; text-transform: uppercase; }
.driver-cash-account-values small { margin-top: 1px; font-size: 8.5px; opacity: .78; }

.driver-cash-account-progress {
  grid-column: 2 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 90, 54, .13);
}

.driver-cash-account-progress > i {
  display: block;
  width: var(--cash-progress, 0%);
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #18a05b;
}

.driver-cash-account.is-warning .driver-cash-account-progress > i { background: #e99500; }
.driver-cash-account.is-blocked .driver-cash-account-progress > i { background: #d93434; }


.driver-cash-handling {
  grid-column: 1 / -1;
  width: 100%;
  margin: 8px 0 0;
  padding: 9px;
  border: 1px solid #f4b84d;
  border-radius: 13px;
  background: #fff8e8;
  color: #563300;
  box-sizing: border-box;
}

.driver-cash-handling-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.driver-cash-handling-head i {
  flex: 0 0 auto;
  color: #de7800;
  font-size: 15px;
}

.driver-cash-handling-head strong,
.driver-cash-handling-head span { display: block; }
.driver-cash-handling-head span { font-size: 10.5px; font-weight: 950; line-height: 1.2; letter-spacing: .03em; }
.driver-cash-handling-head strong { margin-left: auto; font-size: 11.5px; line-height: 1.2; text-align: right; }

.driver-cash-handling-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(214, 143, 33, .3);
  border-radius: 10px;
  background: rgba(255, 255, 255, .84);
}

.driver-cash-handling-values > span {
  min-width: 0;
  padding: 7px 6px 6px;
  border-left: 1px solid rgba(214, 143, 33, .22);
  text-align: left;
}

.driver-cash-handling-values > span:first-child { border-left: 0; }

.driver-cash-handling-values small,
.driver-cash-handling-values b { display: block; }
.driver-cash-handling-values small { font-size: 9.5px; font-weight: 850; line-height: 1.15; text-transform: uppercase; }
.driver-cash-handling-values b {
  margin-top: 2px;
  font-size: clamp(14px, 4vw, 17px);
  line-height: 1.1;
  white-space: nowrap;
}
.driver-cash-handling-values .is-collection b { color: #b65c00; }
.driver-cash-handling-values .is-debt b { color: #9b2c12; }

.driver-business-settlement {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 10px;
  margin-top: 7px;
  padding: 8px 9px;
  border: 1px solid rgba(183, 104, 0, .28);
  border-radius: 10px;
  background: rgba(255, 255, 255, .78);
}

.driver-business-settlement span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #704000;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-business-settlement strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: #9b2c12;
  font-size: 17px;
  font-weight: 950;
}

.driver-business-settlement small {
  color: #875000;
  font-size: 10px;
  font-weight: 800;
}

.driver-business-settlement.is-confirmed {
  border-color: rgba(17, 129, 75, .3);
  background: #effbf5;
}

.driver-business-settlement.is-confirmed span,
.driver-business-settlement.is-confirmed small,
.driver-business-settlement.is-confirmed strong { color: #17633a; }

.driver-cash-handling-detail {
  margin-top: 5px;
  border-top: 1px dashed rgba(139, 79, 0, .27);
}

.driver-cash-handling-detail summary {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 6px;
  color: #754300;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  list-style: none;
}

.driver-cash-handling-detail summary::-webkit-details-marker { display: none; }
.driver-cash-handling-detail summary .bi-chevron-down { margin-left: auto; transition: transform .18s ease; }
.driver-cash-handling-detail[open] summary .bi-chevron-down { transform: rotate(180deg); }
.driver-cash-handling-detail p { margin: 0 0 7px; font-size: 11.5px; font-weight: 720; line-height: 1.35; }

.driver-cash-collection-reminder {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 11px 12px;
  border: 2px solid #f36a00;
  border-radius: 13px;
  color: #4b1c00;
  background: linear-gradient(145deg, #fff7dd, #ffe2b8);
  box-shadow: 0 7px 18px rgba(169, 68, 0, .16);
}
.driver-cash-collection-reminder > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #b53d00;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .035em;
  line-height: 1.2;
}
.driver-cash-collection-reminder > strong {
  color: #842600;
  font-size: clamp(17px, 4.8vw, 21px);
  font-weight: 950;
  line-height: 1.12;
}
.driver-cash-collection-reminder > p {
  margin: 0;
  color: #6f350d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.driver-cash-handling.is-compact { padding: 8px; }
.driver-cash-handling.is-compact .driver-cash-handling-values > span { padding: 6px 5px 5px; }
.current-trip-card .driver-cash-handling,
.driver-trip-map-actions .driver-cash-handling { grid-column: 1 / -1; }
.order-card .driver-cash-handling { margin-top: 8px; }

/* La tarjeta del viaje define texto blanco/amarillo para su contenido general.
 * Estos resets específicos mantienen legible el bloque claro de efectivo. */
.current-trip-card .driver-cash-handling .driver-cash-handling-head span {
  margin: 0;
  color: #563300;
  font-size: 10.5px;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.current-trip-card .driver-cash-handling .driver-cash-handling-head strong {
  margin-top: 0;
  color: #563300;
  font-size: 11.5px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
}

.current-trip-card .driver-cash-handling .driver-cash-handling-values > span {
  margin: 0;
  color: #563300;
  font-size: inherit;
  font-weight: inherit;
  line-height: normal;
  letter-spacing: normal;
  text-transform: none;
}

.current-trip-card .driver-cash-handling .driver-cash-handling-values small {
  margin: 0;
  color: #744800;
  font-size: 9.5px;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: normal;
  text-transform: uppercase;
}

.current-trip-card .driver-cash-handling .driver-cash-handling-values b {
  margin-top: 2px;
  color: #3f2a09;
  font-size: clamp(14px, 4vw, 17px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: normal;
  text-transform: none;
}

.current-trip-card .driver-cash-handling .driver-cash-handling-values .is-collection b { color: #b65c00; }
.current-trip-card .driver-cash-handling .driver-cash-handling-values .is-payout b { color: #17633a; }
.current-trip-card .driver-cash-handling .driver-cash-handling-values .is-debt b { color: #9b2c12; }
.current-trip-card .driver-cash-handling .driver-cash-handling-detail summary span,
.current-trip-card .driver-cash-handling .driver-cash-handling-detail p {
  color: #754300;
  letter-spacing: normal;
  text-transform: none;
}

.smart-actions #driver-main-action.is-cash-blocked {
  border-color: #b72929 !important;
  background: #b72929 !important;
  color: #fff !important;
}

.smart-actions #driver-main-action.is-settlement-pending {
  border-color: #b66a00 !important;
  background: #b66a00 !important;
  color: #fff !important;
}

body.driver-cash-modal-open { overflow: hidden; }

.driver-cash-delivery-modal {
  position: fixed;
  z-index: 220;
  inset: 0;
  display: grid;
  place-items: center;
  padding:
    max(18px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    max(18px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.driver-cash-delivery-modal.hidden { display: none !important; }

.driver-cash-delivery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 17, 24, .72);
  backdrop-filter: blur(3px);
}

.driver-cash-delivery-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 3px 10px;
  width: min(100%, 430px);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  color: #20242b;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
  box-sizing: border-box;
}

.driver-cash-delivery-modal.is-success .driver-cash-delivery-card {
  border: 2px solid #34a96b;
  background: #f1fff7;
}

.driver-cash-delivery-icon {
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 2;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 12px;
  background: #fff0d7;
  color: #d86b00;
  font-size: 19px;
}

.driver-cash-delivery-modal.is-success .driver-cash-delivery-icon {
  background: #d8f7e5;
  color: #14834a;
}

.driver-cash-delivery-kicker {
  grid-column: 2;
  align-self: end;
  margin: 0;
  color: #d76500;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.driver-cash-delivery-modal h2 { grid-column: 2; margin: 0; font-size: 21px; line-height: 1.12; }
.driver-cash-delivery-copy {
  grid-column: 1 / -1;
  margin: 8px 0 10px;
  color: #59616c;
  font-size: 13px;
  line-height: 1.35;
}

.driver-cash-delivery-breakdown {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #f1d3a3;
  border-radius: 12px;
  background: #fffaf0;
}

.driver-cash-delivery-breakdown > span {
  min-width: 0;
  padding: 8px 6px;
  border-left: 1px solid #f1d3a3;
  text-align: left;
}

.driver-cash-delivery-breakdown > span:first-child { border-left: 0; }

.driver-cash-delivery-breakdown small,
.driver-cash-delivery-breakdown strong { display: block; }
.driver-cash-delivery-breakdown small { font-size: 9.5px; font-weight: 850; line-height: 1.15; text-transform: uppercase; }
.driver-cash-delivery-breakdown strong {
  margin-top: 2px;
  font-size: clamp(14px, 4vw, 17px);
  line-height: 1.1;
  white-space: nowrap;
}

.driver-cash-delivery-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 8px 0;
  padding: 8px 9px;
  border-radius: 12px;
  background: #fff3d6;
  color: #714400;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.3;
}

.driver-cash-delivery-error {
  grid-column: 1 / -1;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #ffe8e8;
  color: #a42121;
  font-size: 12px;
  font-weight: 800;
}

.driver-cash-delivery-error:empty,
.driver-cash-delivery-error.hidden { display: none !important; }

.driver-cash-delivery-error.is-syncing {
  border: 1px solid #b8d9f6;
  background: #edf7ff;
  color: #174f7d;
}

.driver-cash-delivery-error.is-not-confirmed {
  border: 1px solid #f0cf8a;
  background: #fff7df;
  color: #775000;
}

.driver-cash-delivery-error.is-rejected {
  border: 1px solid #f1b7b7;
  background: #ffe8e8;
  color: #a42121;
}

.driver-cash-delivery-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(90px, .65fr) minmax(0, 1.35fr);
  gap: 8px;
}

.driver-cash-delivery-actions button {
  width: 100%;
  min-height: 55px;
  margin: 0;
  border-radius: 15px;
  font: inherit;
  font-weight: 850;
  touch-action: manipulation;
}

#driver-cash-delivery-confirm {
  order: 2;
  border: 0;
  background: #ff6500;
  color: #fff;
}

#driver-cash-delivery-cancel {
  order: 1;
  border: 1px solid #cfd4db;
  background: #fff;
  color: #303741;
}

#driver-cash-delivery-cancel.hidden + #driver-cash-delivery-confirm { grid-column: 1 / -1; }

.driver-cash-delivery-actions button:disabled { opacity: .62; }

@media (max-width: 440px) {
  .driver-cash-account {
    grid-template-columns: 34px minmax(78px, 1fr) auto;
    gap: 5px 8px;
    padding: 8px 9px;
  }

  .driver-cash-account-icon { width: 34px; height: 34px; }
  .driver-cash-account-copy strong { font-size: 18px; }
  .driver-cash-account-values strong { font-size: 11px; }
  .driver-cash-account-progress { grid-column: 2 / -1; }
  .driver-cash-handling-head strong { max-width: 58%; }
  .driver-cash-delivery-card { padding: 14px; border-radius: 18px; }
}

/* Debe permanecer al final: anula las rejillas heredadas de decisión. */
.smart-actions.is-decision {
  position: relative !important;
  z-index: 20 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  gap: 10px !important;
}
.smart-actions.is-decision #driver-main-action,
.smart-actions.is-decision #driver-reject-action {
  position: relative !important;
  z-index: 21 !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 62px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}
.smart-actions.is-decision #driver-main-action { order: 1 !important; }
.smart-actions.is-decision #driver-reject-action { order: 2 !important; min-height: 56px !important; }
.smart-actions.is-decision #driver-main-action::before,
.smart-actions.is-decision #driver-main-action::after,
.smart-actions.is-decision #driver-reject-action::before,
.smart-actions.is-decision #driver-reject-action::after { pointer-events: none !important; }

#driver-map-chat-action.map-chat-below-action {
  display: flex !important;
  width: 100% !important;
  min-height: 56px !important;
  justify-content: center !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}
#driver-map-chat-action.map-chat-below-action.hidden { display: none !important; }

/* La disponibilidad es independiente de las acciones del pedido: permanece
   visible aunque haya una oferta esperando decisión. */
.hero-card #driver-availability-action {
  grid-column: 1 / -1 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 46px;
  margin: 2px 0 1px;
  border: 1px solid #cfd7d3;
  border-radius: 13px;
  color: #26322d;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  touch-action: manipulation;
}

.hero-card #driver-availability-action.is-online {
  border-color: #ffd1b3;
  color: #a34408;
  background: #fff7f1;
}

.hero-card #driver-availability-action.is-pending {
  border-color: #b8d6c9;
  color: #17633a;
  background: #eefaf4;
}

.hero-card #driver-availability-action.is-required,
.hero-card #driver-availability-action:disabled {
  border-color: #d7dadd;
  color: #687078;
  background: #f3f4f5;
  box-shadow: none;
}

/* Las ofertas de tienda también deben tener blancos de toque amplios en móvil.
 * Se apilan todas las acciones para que Aceptar nunca comparta media fila con
 * el enlace del mapa ni pueda quedar debajo de un aviso del sistema. */
.store-delivery-card .order-actions {
  position: relative !important;
  z-index: 20 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  gap: 10px !important;
}
.store-delivery-card .order-actions > button {
  position: relative !important;
  z-index: 21 !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}
.store-delivery-card .order-actions > .start-route { min-height: 62px !important; }
.store-delivery-card .order-actions > .start-route.trip-pickup-action {
  border-color: #5b21b6 !important;
  background: #5b21b6 !important;
  box-shadow: 0 9px 20px rgba(91,33,182,.28) !important;
}
@media (hover: hover) {
  .store-delivery-card .order-actions > .start-route.trip-pickup-action:hover:not(:disabled):not([aria-disabled="true"]) {
    border-color: #4c1d95 !important;
    background: #4c1d95 !important;
    box-shadow: 0 11px 24px rgba(76,29,149,.34) !important;
  }
}
.store-delivery-card .order-actions > .start-route.trip-delivery-action {
  border-color: #008f45 !important;
  background: #008f45 !important;
  box-shadow: 0 9px 20px rgba(0,143,69,.22) !important;
}
.store-delivery-card .order-actions > [data-store-action][aria-busy="true"] {
  cursor: wait !important;
  opacity: .78;
}
.store-delivery-card .order-actions > .trip-pickup-action:focus-visible {
  outline: 3px solid #5b21b6 !important;
  outline-offset: 3px;
}
.store-delivery-card .order-actions > .trip-pickup-action:focus-visible,
.store-delivery-card .order-actions > .trip-delivery-action:focus-visible,
.driver-trip-map-actions button:focus-visible {
  outline: 3px solid rgba(18,93,180,.32);
  outline-offset: 3px;
}
.store-delivery-card .order-actions > button::before,
.store-delivery-card .order-actions > button::after { pointer-events: none !important; }

/* Adeudos de efectivo por negocio: información breve, legible y accionable. */
#driver-center .driver-center-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

#driver-center .driver-center-tabs button {
  min-width: 0;
  min-height: 44px;
  padding: 0 2px;
  touch-action: manipulation;
}

.driver-cash-debt-badge {
  position: absolute;
  top: 2px;
  right: 3px;
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid #f1f1ee;
  border-radius: 999px;
  color: #fff;
  background: #ff6508;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  box-sizing: border-box;
}

.driver-center-tabs button.active .driver-cash-debt-badge { border-color: #17191d; }
.driver-cash-debt-badge.hidden { display: none !important; }

.driver-cash-debts-panel,
.driver-cash-debt-businesses {
  display: grid;
  gap: 9px;
}

.driver-cash-debts-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(58px, .55fr));
  align-items: stretch;
  gap: 7px;
  padding: 10px;
  border: 1px solid #ffd4b8;
  border-radius: 15px;
  background: linear-gradient(135deg, #fff8f2 0%, #fff 72%);
  color: #29241f;
  box-sizing: border-box;
}

.driver-cash-debts-summary-total {
  min-width: 0;
  padding: 2px 7px;
}

.driver-cash-debts-summary small,
.driver-cash-debts-summary strong,
.driver-cash-debts-summary b { display: block; }
.driver-cash-debts-summary small { color: #7a6c62; font-size: 10px; font-weight: 900; line-height: 1.15; letter-spacing: .045em; }
.driver-cash-debts-summary-total strong { margin-top: 2px; color: #d95100; font-size: clamp(22px, 7vw, 28px); line-height: 1; }
.driver-cash-debts-summary > span:not(.driver-cash-debts-summary-icon) {
  display: grid;
  min-width: 0;
  place-content: center;
  border-radius: 11px;
  background: #f6f3f0;
  text-align: center;
}
.driver-cash-debts-summary > span b { color: #29241f; font-size: 17px; line-height: 1.1; }

.driver-cash-debts-summary.is-clear {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  border-color: #b7e5cb;
  background: #f1fff7;
}

.driver-cash-debts-summary.is-clear > div { min-width: 0; }
.driver-cash-debts-summary.is-clear strong { margin-top: 2px; color: #15643b; font-size: 15px; }
.driver-cash-debts-summary.is-clear p { margin: 3px 0 0; color: #567063; font-size: 10.5px; line-height: 1.3; }
.driver-cash-debts-summary-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #159255;
  font-size: 20px;
}

.driver-cash-debts-stale {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 10px;
  color: #704800;
  background: #fff3d6;
  font-size: 10px;
  font-weight: 800;
}
.driver-cash-debts-stale button { margin-left: auto; border: 0; color: #ab5200; background: transparent; font: inherit; font-weight: 950; }

.driver-cash-debt-business {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e4e5e8;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(22, 28, 36, .055);
  box-sizing: border-box;
}

.driver-cash-debt-business > header {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.driver-cash-debt-business-icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 11px;
  color: #d95200;
  background: #fff0e6;
  font-size: 17px;
}

.driver-cash-debt-business > header > div { min-width: 0; }
.driver-cash-debt-business > header small,
.driver-cash-debt-business > header strong { display: block; }
.driver-cash-debt-business > header > div > small { color: #867a71; font-size: 10px; font-weight: 950; line-height: 1.1; letter-spacing: .045em; }
.driver-cash-debt-business > header > div > strong { overflow: hidden; margin-top: 2px; color: #25282d; font-size: 13px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }

.driver-cash-debt-total { padding-left: 7px; text-align: right; white-space: nowrap; }
.driver-cash-debt-business > header .driver-cash-debt-total small { color: #7b7170; font-size: 10px; letter-spacing: 0; text-transform: none; }
.driver-cash-debt-business > header .driver-cash-debt-total strong { color: #bd3d00; font-size: 20px; line-height: 1; }

.driver-cash-debt-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #ece8e4;
  border-radius: 11px;
  background: #faf9f8;
}

.driver-cash-debt-breakdown > span {
  min-width: 0;
  padding: 7px 8px;
  border-left: 1px solid #ece8e4;
}
.driver-cash-debt-breakdown > span:first-child { border-left: 0; }
.driver-cash-debt-breakdown small,
.driver-cash-debt-breakdown b { display: block; }
.driver-cash-debt-breakdown small { color: #746d68; font-size: 10px; font-weight: 850; line-height: 1.1; }
.driver-cash-debt-breakdown b { overflow: hidden; margin-top: 2px; color: #282b30; font-size: 14px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }

.driver-cash-debt-orders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.driver-cash-debt-orders > span {
  display: flex;
  min-width: 0;
  min-height: 29px;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 9px;
  color: #555c65;
  background: #f3f4f6;
  box-sizing: border-box;
}
.driver-cash-debt-orders small { overflow: hidden; min-width: 0; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.driver-cash-debt-orders b { margin-left: auto; color: #282c32; font-size: 10.5px; white-space: nowrap; }
.driver-cash-debt-orders > span.is-more { justify-content: center; color: #cb4a00; background: #fff1e8; }
.driver-cash-debt-orders > span.is-more b { margin-left: 0; }
.driver-cash-debt-orders-empty { margin: 0; color: #69717a; font-size: 10px; font-weight: 750; }

.driver-cash-debt-pay,
.driver-cash-debt-retry {
  width: 100%;
  min-height: 52px;
  margin: 0;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #ff6508, #e95600);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.driver-cash-debt-pay i,
.driver-cash-debt-retry i { margin-right: 6px; }
.driver-cash-debt-pay:disabled { opacity: .68; }
.driver-cash-debt-pay[aria-busy="true"] i { animation: driver-cash-debt-spin .8s linear infinite; }

.driver-cash-debt-expiry {
  display: block;
  margin: -2px 0 0;
  color: #727780;
  font-size: 10px;
  text-align: center;
}

.driver-cash-link-pending {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 7px 9px;
  border: 1px dashed #e4aa64;
  border-radius: 12px;
  color: #714500;
  background: #fff8eb;
  box-sizing: border-box;
}
.driver-cash-link-pending > i { font-size: 18px; text-align: center; }
.driver-cash-link-pending strong,
.driver-cash-link-pending small { display: block; }
.driver-cash-link-pending strong { font-size: 11px; }
.driver-cash-link-pending small { margin-top: 2px; font-size: 10.5px; line-height: 1.25; }

.driver-cash-at-business-note {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px;
  border: 1px solid #bfe2cd;
  border-radius: 10px;
  color: #315c43;
  background: #eaf8ef;
  font-size: 10.5px;
  font-weight: 730;
  line-height: 1.3;
}
.driver-cash-at-business-note > i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: #188d58;
  font-size: 14px;
}
.driver-cash-at-business-note strong { display: block; margin-bottom: 2px; color: #17633a; font-size: 11px; }

.driver-cash-debts-help {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 1px 2px 0;
  color: #68717a;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}
.driver-cash-debts-help i { color: #159255; font-size: 12px; }

.driver-cash-debts-support {
  width: 100%;
  min-height: 44px;
  margin: 0;
  border: 1px solid #d8dce1;
  border-radius: 12px;
  color: #4d555f;
  background: #fff;
  font: inherit;
  font-size: 10.5px;
  font-weight: 850;
  touch-action: manipulation;
}
.driver-cash-debts-support i { margin-right: 5px; color: #ff6508; }

.driver-cash-history {
  display: grid;
  gap: 9px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid #e2e5e8;
}
.driver-cash-history > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}
.driver-cash-history > header small,
.driver-cash-history > header strong { display: block; }
.driver-cash-history > header small { color: #777f87; font-size: 10px; font-weight: 950; letter-spacing: .06em; }
.driver-cash-history > header strong { margin-top: 2px; color: #292d31; font-size: 14px; }
.driver-cash-history > header > span {
  min-width: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #17633a;
  background: #e4f7ec;
  font-size: 11px;
  font-weight: 950;
  text-align: center;
}
.driver-cash-history-empty {
  margin: 0;
  padding: 13px;
  border: 1px dashed #cfd5d9;
  border-radius: 12px;
  color: #667078;
  background: #fafbfb;
  font-size: 10.5px;
  font-weight: 750;
  text-align: center;
}
.driver-cash-history-empty i { margin-right: 5px; color: #1a9960; }
.driver-cash-receipts { display: grid; gap: 9px; }
.driver-cash-receipt {
  overflow: hidden;
  border: 1px solid #d8e4dc;
  border-radius: 14px;
  color: #28302b;
  background: linear-gradient(180deg, #fff 0%, #f7fcf9 100%);
  box-shadow: 0 5px 14px rgba(23, 99, 58, .07);
}
.driver-cash-receipt.is-cash { border-color: #bfe0cc; }
.driver-cash-receipt > header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
}
.driver-cash-receipt-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #198e59;
  font-size: 18px;
}
.driver-cash-receipt > header > div { min-width: 0; }
.driver-cash-receipt > header small,
.driver-cash-receipt > header strong { display: block; }
.driver-cash-receipt > header small { color: #6b7b70; font-size: 10px; font-weight: 950; letter-spacing: .055em; }
.driver-cash-receipt > header strong { overflow: hidden; margin-top: 2px; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.driver-cash-receipt > header > b { color: #17633a; font-size: 19px; white-space: nowrap; }
.driver-cash-receipt-folio {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-block: 1px dashed #cbded2;
  color: #4f6055;
  background: #eff9f3;
  font-size: 10px;
}
.driver-cash-receipt-folio span { font-weight: 850; text-transform: uppercase; }
.driver-cash-receipt-folio strong { overflow-wrap: anywhere; color: #194d31; text-align: right; }
.driver-cash-receipt dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 5px 10px;
}
.driver-cash-receipt dl > div { min-width: 0; padding: 6px 4px; }
.driver-cash-receipt dt { color: #758079; font-size: 10px; font-weight: 800; }
.driver-cash-receipt dd { overflow-wrap: anywhere; margin: 2px 0 0; color: #252b27; font-size: 10.5px; font-weight: 850; line-height: 1.25; }
.driver-cash-receipt-orders {
  margin: 0 10px 9px;
  padding: 7px 8px;
  border-radius: 8px;
  color: #4e6255;
  background: #f0f4f1;
  font-size: 10px;
  line-height: 1.3;
}
.driver-cash-receipt-orders i { margin-right: 4px; color: #188653; }
.driver-cash-receipt > footer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  color: #17633a;
  background: #e5f6ec;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
}
.driver-cash-receipt > footer i { flex: 0 0 auto; font-size: 12px; }

@keyframes driver-cash-debt-spin { to { transform: rotate(360deg); } }

@media (max-width: 440px) {
  #driver-center .driver-center-tabs button { min-height: 43px; font-size: 10px; }
  .driver-cash-debts-summary { grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(52px, .55fr)); gap: 5px; padding: 8px; }
  .driver-cash-debts-summary-total { padding-left: 4px; }
  .driver-cash-debt-business { gap: 7px; padding: 9px; }
  .driver-cash-debt-business > header { grid-template-columns: 35px minmax(0, 1fr) auto; gap: 7px; }
  .driver-cash-debt-business-icon { width: 35px; height: 35px; }
  .driver-cash-debt-breakdown > span { padding: 7px 6px; }
  .driver-cash-debt-orders > span { padding-inline: 6px; }
  .driver-cash-receipt > header { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 9px 8px; }
  .driver-cash-receipt-icon { width: 34px; height: 34px; border-radius: 10px; }
  .driver-cash-receipt > header > b { font-size: 17px; }
  .driver-cash-receipt-folio,
  .driver-cash-receipt dl { padding-inline: 8px; }
}

/* Las acciones críticas permanecen visibles antes del mapa para que el
   repartidor no tenga que recorrer la ruta para confirmar o navegar. */
.driver-map-primary-actions {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}

.driver-map-primary-actions .driver-trip-map-actions,
.driver-map-primary-actions .map-google-action,
.driver-map-primary-actions .map-chat-below-action {
  margin-top: 0 !important;
}

.driver-map-primary-actions .driver-trip-map-actions {
  box-shadow: 0 8px 22px rgba(17, 24, 39, .08);
}
/* Estado y acción comparten una sola fila: evita repetir "Disponible" y
   deja Conectarme/Desconectarme como una decisión clara y notoria. */
.driver-availability-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(122px, .72fr);
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.hero-card .driver-availability-row .driver-status-banner {
  display: flex;
  min-width: 0;
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 8px 11px;
  border: 2px solid #a9dfc4;
  border-radius: 15px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  color: #075d36;
  background: linear-gradient(135deg, #e9fff4, #fff);
  box-sizing: border-box;
}

.hero-card .driver-availability-row .driver-status-banner .eyebrow {
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  color: #39725a;
  background: transparent;
  font-size: 10px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-card .driver-availability-row .driver-status-banner strong {
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  color: #075d36;
  background: transparent;
  font-size: 17px;
  line-height: 1.05;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.hero-card .driver-availability-row .driver-status-banner.status-busy {
  border-color: #b9cdfa;
  color: #184ca1;
  background: linear-gradient(135deg, #edf3ff, #fff);
}

.hero-card .driver-availability-row .driver-status-banner.status-busy strong { color: #184ca1; }
.hero-card .driver-availability-row .driver-status-banner.status-outside {
  border-color: #f2d182;
  background: linear-gradient(135deg, #fff8df, #fff);
}
.hero-card .driver-availability-row .driver-status-banner.status-offline {
  border-color: #d9dde3;
  background: linear-gradient(135deg, #f2f4f6, #fff);
}
.hero-card .driver-availability-row .driver-status-banner.status-offline strong { color: #3f4853; }

.hero-card .driver-availability-row #driver-availability-action {
  grid-column: auto !important;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 7px 10px;
  border: 2px solid #ffb685;
  border-radius: 15px;
  color: #963d08;
  background: linear-gradient(135deg, #fff3e9, #fff);
  font-size: 12.5px;
  line-height: 1.15;
  box-shadow: 0 9px 20px rgba(255, 101, 8, .13);
}

.hero-card .driver-availability-row #driver-availability-action.is-online {
  border-color: #ff8a42;
  color: #fff;
  background: linear-gradient(135deg, #ff6508, #d94b00);
  box-shadow: 0 11px 24px rgba(217, 75, 0, .25);
}

/* El resumen de efectivo vive inmediatamente después de Mis pedidos. */
.orders-card + .driver-cash-account {
  margin: 10px 0 0;
  padding: 13px 14px;
  border-width: 2px;
  border-radius: 19px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, .09);
}

.orders-card + .driver-cash-account .driver-cash-account-copy small {
  color: #087045;
  font-size: 11.5px;
  letter-spacing: .055em;
}

.orders-card + .driver-cash-account.is-warning .driver-cash-account-copy small { color: #995800; }
.orders-card + .driver-cash-account.is-blocked .driver-cash-account-copy small { color: #ad2020; }
.orders-card + .driver-cash-account .driver-cash-account-copy strong { font-size: 25px; }

@media (max-width: 350px) {
  .driver-availability-row {
    grid-template-columns: minmax(0, 1fr) minmax(112px, .7fr);
    gap: 6px;
  }

  .hero-card .driver-availability-row #driver-availability-action { padding-inline: 6px; font-size: 11.5px; }
  .hero-card .driver-availability-row .driver-status-banner { padding-inline: 8px; }
}

/* Identidad comercial visible en pedidos promocionales del repartidor. */
.order-business-identity {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 8px 9px;
  border: 1px solid #ffc79e;
  border-radius: 13px;
  color: #2b241f;
  background: linear-gradient(135deg, #fff3e8, #fffaf6);
}

.order-business-identity > i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: #ff6508;
  box-shadow: 0 6px 14px rgba(255, 101, 8, .2);
}

.order-business-identity > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.order-business-identity small {
  margin: 0;
  color: #a64308;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .075em;
  line-height: 1.1;
  text-transform: uppercase;
}

.order-business-identity strong {
  margin: 0 !important;
  color: #17191c !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
  overflow-wrap: anywhere;
  text-overflow: clip !important;
  white-space: normal !important;
}

.order-business-identity em {
  color: #6f5748;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.order-business-identity em b { color: #9a410c; font-size: inherit; text-transform: uppercase; }
.order-customer { display: flex; flex-wrap: wrap; gap: 3px 8px; line-height: 1.35; }
.order-customer > strong,
.order-customer > span > strong { color: #3f4853; font-weight: 900; }

.order-business-identity.is-current-trip {
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 6px;
  margin: 3px 0;
  padding: 5px 6px;
  border-radius: 10px;
}

.order-business-identity.is-current-trip > i { width: 23px; height: 23px; border-radius: 8px; font-size: 11px; }
.order-business-identity.is-current-trip small { font-size: 10px; }
.order-business-identity.is-current-trip strong { font-size: 10px !important; line-height: 1.12 !important; }
.order-business-identity.is-current-trip em { font-size: 10px; }
