* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #eaf2f8 0%, #f8fbfc 100%);
  color: #102a43;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 22px 16px 32px;
}

.title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.title-bar .label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4b6478;
}

.logo-bar {
  height: auto;
  max-width: 180px;
  width: 100%;
  display: block;
}

.title-bar .title {
  font-size: 18px;
  font-weight: 700;
  color: #102a43;
}

.card {
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.08);
  margin-bottom: 18px;
  padding: 18px;
}

.section-title {
  display: inline-flex;
  margin-bottom: 12px;
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #627d98;
}

.stop-name {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  color: #102a43;
}

.stop-distance,
.stop-state,
.reserve-info,
.status-text {
  color: #52606d;
  font-size: 18px;
  margin-top: 8px;
}

.stop-distance {
  display: inline-block;
  margin-left: 4px;
  font-weight: 500;
}

.map-container {
  height: 320px;
  border-radius: 28px;
  overflow: hidden;
  background: #d8e2ea;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

#map {
  height: 100%;
  width: 100%;
}

.button {
  display: block;
  width: 100%;
  border: none;
  border-radius: 20px;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  margin-bottom: 12px;
}

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

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button-success {
  background: #1d865c;
  color: #fff;
  box-shadow: 0 14px 28px rgba(29, 134, 92, 0.24);
}

.button-danger {
  background: #d93f49;
  color: #fff;
  box-shadow: 0 14px 28px rgba(217, 63, 73, 0.22);
}

.button-primary {
  background: #0d6d8f;
  color: #fff;
  box-shadow: 0 14px 28px rgba(13, 109, 143, 0.22);
}

.button-secondary {
  background: #4f5968;
  color: #fff;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  color: #334155;
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-block {
  background: #f7fbfe;
  border-radius: 22px;
  padding: 16px;
}

.stat-block .label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #627d98;
}

.stat-block .value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
  color: #102a43;
}

.control-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.envio-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: #334155;
}

.envio-indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0f9d58;
  opacity: 0.3;
  transform: scale(1);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.envio-indicator-dot.active {
  opacity: 1;
  transform: scale(1.25);
  animation: envio-flash 0.5s ease-in-out;
}

@keyframes envio-flash {
  0% { opacity: 1; transform: scale(1.1); }
  50% { opacity: 0.35; transform: scale(1.35); }
  100% { opacity: 1; transform: scale(1.1); }
}

.small-text {
  font-size: 13px;
  color: #52606d;
  margin-top: 8px;
}

/* iOS-style Toggle Switch */
.map-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-radius: 28px;
  padding: 12px 18px;
  margin-bottom: 12px;
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.08);
}

.map-toggle-label {
  font-size: 15px;
  font-weight: 600;
  color: #102a43;
}

.switch-ios {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
  cursor: pointer;
}

.switch-ios input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-ios {
  position: absolute;
  inset: 0;
  background: #e2e8f0;
  border-radius: 31px;
  transition: background 0.25s ease;
}

.slider-ios::before {
  content: '';
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 27px;
  height: 27px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: transform 0.25s ease;
}

.switch-ios input:checked + .slider-ios {
  background: #0d6d8f;
}

.switch-ios input:checked + .slider-ios::before {
  transform: translateX(20px);
}

.map-container.map-hidden {
  display: none;
}

.pago-btn {
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 64px;
  color: #102a43;
}

.pago-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.pago-btn.selected {
  background: #1d865c;
  border-color: #1d865c;
  color: #fff;
}

.pago-btn-small {
  padding: 8px 16px;
  font-size: 13px;
  min-width: 52px;
}

.hold-status-card {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 18px;
  border: 2px solid #e2e8f0;
  animation: slideDown 0.3s ease-out;
}
.hold-status-card .hold-status-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.hold-status-card .hold-status-icon {
  font-size: 24px;
}
.hold-status-card .hold-status-title {
  font-size: 24px;
  font-weight: 700;
  color: #102a43;
}
.hold-status-card .hold-status-body {
  margin-left: 32px;
}
.hold-status-card .hold-status-message {
  margin: 0;
  font-size: 20px;
  color: #334155;
}
.hold-status-card .hold-status-eta {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 800;
  color: #1d865c;
}
.hold-status-card.active {
  border-color: #1d865c;
  background: #f0fdf4;
}
.hold-status-card.waiting {
  border-color: #e6a817;
  background: #fffbe6;
}
