/* ============================================================
   MyLagosApp — Components Library
   components.css
   ============================================================ */

/* ── Top App Bar ────────────────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-w);
  height: var(--top-bar-h);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  z-index: var(--z-nav);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}

.top-bar--dark {
  background: var(--black);
  border-bottom-color: var(--dark-2);
}

.top-bar--transparent {
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}

.top-bar__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--black);
  flex: 1;
  text-align: center;
}

.top-bar__title--white { color: var(--white); }

.top-bar__logo {
  height: 36px;
  width: auto;
}

.top-bar__action {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--dark);
  font-size: 20px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
  position: relative;
}

.top-bar__action:hover,
.top-bar__action:active { background: var(--gray-100); }

.top-bar__action--white { color: var(--white); }
.top-bar__action--white:hover { background: rgba(255,255,255,.15); }

.badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--danger);
  border: 2px solid var(--white);
}

/* ── Bottom Navigation ──────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-w);
  height: var(--bottom-nav-h);
  background: var(--white);
  display: flex;
  align-items: center;
  border-top: 1px solid var(--gray-100);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  z-index: var(--z-nav);
  padding: 0 var(--space-2);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: var(--space-2) var(--space-1);
  color: var(--gray-400);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
  position: relative;
  border-radius: var(--radius-md);
  text-decoration: none;
}

.bottom-nav__item i {
  font-size: 22px;
  transition: transform var(--dur-fast) var(--ease-bounce);
}

.bottom-nav__item.active {
  color: var(--primary);
}

.bottom-nav__item.active i {
  transform: scale(1.15) translateY(-1px);
}

.bottom-nav__fab-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bottom-nav__fab {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: var(--shadow-primary);
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-bounce),
              box-shadow var(--dur-base) var(--ease);
  margin-top: -18px;
  border: 3px solid var(--white);
}

.bottom-nav__fab:active {
  transform: scale(0.92);
  box-shadow: 0 4px 12px rgba(255,156,32,.3);
}

/* ── Floating Action Button ─────────────────────────────── */
.fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 20px);
  right: calc(50% - var(--app-max-w)/2 + 20px);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-primary);
  cursor: pointer;
  z-index: var(--z-fab);
  transition: transform var(--dur-base) var(--ease-bounce),
              box-shadow var(--dur-base) var(--ease);
  animation: fabPulse 2.5s ease-in-out infinite;
}

.fab:active {
  transform: scale(0.9);
  box-shadow: 0 4px 12px rgba(255,156,32,.25);
  animation: none;
}

@keyframes fabPulse {
  0%, 100% { box-shadow: var(--shadow-primary); }
  50% { box-shadow: 0 8px 32px rgba(255,156,32,.55), 0 0 0 8px rgba(255,156,32,.12); }
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 13px var(--space-6);
  border-radius: var(--radius-full);
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.2);
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.btn:active::after { opacity: 1; }

.btn--primary {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255,156,32,.45);
}

.btn--primary:active { transform: translateY(0); }

.btn--dark {
  background: var(--black);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn--outline:hover {
  background: var(--primary-pale);
}

.btn--outline-white {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn--outline-white:hover {
  background: rgba(255,255,255,.1);
}

.btn--ghost {
  background: var(--gray-100);
  color: var(--dark);
}

.btn--ghost:hover { background: var(--gray-200); }

.btn--danger {
  background: var(--danger);
  color: var(--white);
}

.btn--success {
  background: var(--success);
  color: var(--white);
}

.btn--whatsapp {
  background: #25D366;
  color: var(--white);
}

.btn--sm {
  padding: 8px var(--space-4);
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
}

.btn--lg {
  padding: 16px var(--space-8);
  font-size: var(--text-md);
}

.btn--block { width: 100%; }

.btn--icon {
  padding: 0;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  font-size: 18px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Card ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}

.card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-sm);
}

.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card--elevated {
  box-shadow: var(--shadow-md);
}

.card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card__img--sm { height: 120px; }
.card__img--lg { height: 220px; }

.card__body {
  padding: var(--space-4);
}

.card__body--sm {
  padding: var(--space-3);
}

/* ── Form Elements ──────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--dark);
  margin-bottom: var(--space-2);
}

.form-control {
  width: 100%;
  height: 52px;
  padding: 0 var(--space-4);
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--dark);
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}

.form-control:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(255,156,32,.15);
}

.form-control::placeholder { color: var(--gray-400); }

.form-control--error { border-color: var(--danger); }
.form-control--error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.15); }

textarea.form-control {
  height: auto;
  padding: var(--space-3) var(--space-4);
  resize: none;
  line-height: 1.6;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--gray-400);
  pointer-events: none;
}

.input-icon + .form-control {
  padding-left: 46px;
}

.input-icon-right {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--gray-400);
  cursor: pointer;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-error {
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Search Bar ─────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--gray-50);
  border-radius: var(--radius-full);
  padding: 0 var(--space-4);
  height: 46px;
  border: 1.5px solid var(--gray-200);
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,156,32,.12);
  background: var(--white);
}

.search-bar i { color: var(--gray-400); font-size: 18px; }

.search-bar input {
  flex: 1;
  background: none;
  font-size: var(--text-sm);
  color: var(--dark);
}

.search-bar input::placeholder { color: var(--gray-400); }

/* ── Tabs ───────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  background: var(--white);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: var(--top-bar-h);
  z-index: 10;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-item {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
}

.tab-item.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(255,156,32,.3);
}

.tab-item:not(.active):hover {
  background: var(--primary-pale);
  color: var(--primary);
}

/* ── List Item ──────────────────────────────────────────── */
.list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
  text-decoration: none;
  color: inherit;
}

.list-item:active { background: var(--gray-50); }

.list-item:last-child { border-bottom: none; }

.list-item__thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.list-item__thumb--sm {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
}

.list-item__thumb--avatar {
  border-radius: var(--radius-full);
}

.list-item__body { flex: 1; min-width: 0; }

.list-item__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--black);
  margin-bottom: 3px;
  line-height: 1.3;
}

.list-item__subtitle {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: 1.4;
}

.list-item__meta {
  font-size: var(--text-xs);
  color: var(--gray-400);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ── Badge / Chip ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}

.badge--primary  { background: var(--primary-pale); color: var(--primary-dark); }
.badge--danger   { background: var(--danger-bg); color: var(--danger); }
.badge--warning  { background: var(--warning-bg); color: var(--warning); }
.badge--success  { background: var(--success-bg); color: var(--success); }
.badge--info     { background: var(--info-bg); color: var(--info); }
.badge--dark     { background: var(--dark); color: var(--white); }
.badge--gray     { background: var(--gray-100); color: var(--gray-600); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  border: 1.5px solid transparent;
}

.chip.active {
  background: var(--primary-pale);
  color: var(--primary-dark);
  border-color: var(--primary);
}

/* ── Avatar ─────────────────────────────────────────────── */
.avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gray-200);
}

.avatar--sm { width: 32px; height: 32px; }
.avatar--lg { width: 56px; height: 56px; }
.avatar--xl { width: 80px; height: 80px; }

.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: var(--white);
  font-weight: 700;
  font-size: var(--text-sm);
  width: 42px;
  height: 42px;
}

.avatar-initials--sm {
  width: 32px; height: 32px; font-size: var(--text-xs);
}

/* ── Section Header ─────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4) var(--space-2);
}

.section-header__title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--black);
}

.section-header__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
}

/* ── Hero Banner ────────────────────────────────────────── */
.hero-banner {
  position: relative;
  overflow: hidden;
  background: var(--black);
}

.hero-banner__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  opacity: 0.7;
}

.hero-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.1) 0%, rgba(0,0,0,.7) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-4);
}

/* ── Weather Widget ─────────────────────────────────────── */
.weather-widget {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #0ea5e9 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  color: var(--white);
  position: relative;
  overflow: hidden;
  margin: 0 var(--space-4);
}

.weather-widget::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.08);
}

.weather-widget::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 150px;
  height: 150px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.05);
}

.weather-widget__temp {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.weather-widget__icon {
  font-size: 3.5rem;
}

/* ── Traffic Banner ─────────────────────────────────────── */
.traffic-banner {
  background: linear-gradient(135deg, var(--black) 0%, var(--dark-2) 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  overflow: hidden;
  position: relative;
}

.traffic-status-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.traffic-status-dot--red { background: var(--traffic-heavy); }
.traffic-status-dot--yellow { background: var(--traffic-mod); }
.traffic-status-dot--green { background: var(--traffic-light); }

/* ── Feature Grid ───────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
}

.feature-item__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform var(--dur-base) var(--ease-bounce),
              box-shadow var(--dur-base) var(--ease);
}

.feature-item:active .feature-item__icon {
  transform: scale(0.92);
}

.feature-item__label {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-600);
  text-align: center;
  line-height: 1.2;
}

.feature-icon--traffic   { background: #FEF3C7; color: #D97706; }
.feature-icon--news      { background: #DBEAFE; color: #2563EB; }
.feature-icon--report    { background: #FCE7F3; color: #DB2777; }
.feature-icon--emergency { background: #FEE2E2; color: #DC2626; }
.feature-icon--taxi      { background: #D1FAE5; color: #059669; }
.feature-icon--events    { background: #EDE9FE; color: #7C3AED; }
.feature-icon--discover  { background: #FFEDD5; color: #EA580C; }
.feature-icon--market    { background: #ECFDF5; color: #10B981; }
.feature-icon--tv        { background: #F3F4F6; color: #374151; }
.feature-icon--business  { background: #EFF6FF; color: #1D4ED8; }
.feature-icon--security  { background: #FDF2F8; color: #A21CAF; }
.feature-icon--more      { background: var(--gray-100); color: var(--gray-600); }

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  width: 100%;
  max-width: var(--app-max-w);
  background: var(--white);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal--center {
  border-radius: var(--radius-xl);
  align-self: center;
  max-width: calc(var(--app-max-w) - 32px);
  transform: scale(0.85) translateY(20px);
  margin: 0 auto;
}

.modal-overlay.active .modal--center {
  transform: scale(1) translateY(0);
}

.modal__handle {
  width: 40px;
  height: 4px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  margin: 12px auto;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--gray-100);
}

.modal__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--black);
}

.modal__close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--gray-600);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}

.modal__close:hover { background: var(--gray-200); }

.modal__body { padding: var(--space-5); }

/* ── Toast Notification ─────────────────────────────────── */
.toast {
  position: fixed;
  top: calc(var(--top-bar-h) + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: var(--dark);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur-slow) var(--ease-out);
  max-width: calc(var(--app-max-w) - 40px);
}

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

.toast--success { background: var(--success); }
.toast--danger  { background: var(--danger); }
.toast--warning { background: var(--warning); color: var(--black); }

/* ── Comment Item ───────────────────────────────────────── */
.comment {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--gray-100);
}

.comment:last-child { border-bottom: none; }

.comment__body {
  flex: 1;
}

.comment__bubble {
  background: var(--gray-50);
  border-radius: 4px var(--radius-md) var(--radius-md) var(--radius-md);
  padding: var(--space-3);
  font-size: var(--text-sm);
  color: var(--dark);
  line-height: 1.55;
}

.comment__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--gray-400);
}

/* ── Emergency Contact Card ─────────────────────────────── */
.emergency-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}

.emergency-card:active {
  transform: scale(0.97);
}

.emergency-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.emergency-card__number {
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1;
}

.emergency-card__label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
}

/* ── Settings Row ───────────────────────────────────────── */
.settings-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4);
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
  text-decoration: none;
  color: inherit;
}

.settings-row:active { background: var(--gray-50); }

.settings-row__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.settings-row__body { flex: 1; }
.settings-row__title { font-size: var(--text-base); font-weight: 500; }
.settings-row__subtitle { font-size: var(--text-xs); color: var(--gray-400); margin-top: 1px; }

.settings-row__arrow {
  font-size: 18px;
  color: var(--gray-400);
}

/* ── Toggle Switch ──────────────────────────────────────── */
.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease);
}

.toggle__slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-bounce);
}

.toggle input:checked + .toggle__slider { background: var(--primary); }
.toggle input:checked + .toggle__slider::before { transform: translateX(22px); }

/* ── Skeleton Loader ────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 400% 100%;
  animation: skeleton-wave 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-wave {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Progress / Tracking ────────────────────────────────── */
.track-timeline {
  position: relative;
  padding-left: var(--space-6);
}

.track-step {
  position: relative;
  padding-bottom: var(--space-5);
}

.track-step:last-child { padding-bottom: 0; }

.track-step::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.track-step:last-child::before { display: none; }

.track-step__dot {
  position: absolute;
  left: -28px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-200);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.track-step--done .track-step__dot {
  background: var(--success);
  border-color: var(--success);
}

.track-step--active .track-step__dot {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255,156,32,.2);
}

.track-step--done::before { background: var(--success); }

/* ── Video Card ─────────────────────────────────────────── */
.video-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--black);
  cursor: pointer;
  position: relative;
}

.video-card__thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity var(--dur-base) var(--ease);
}

.video-card:active .video-card__thumb { opacity: 0.6; }

.video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.25);
}

.play-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--primary);
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur-base) var(--ease-bounce);
}

.video-card:active .play-btn { transform: scale(0.9); }

.video-card__duration {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  background: rgba(0,0,0,.75);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* ── Star Rating ────────────────────────────────────────── */
.stars {
  display: flex;
  gap: 2px;
  color: #FBBF24;
  font-size: var(--text-sm);
}

/* ── Divider ────────────────────────────────────────────── */
.divider {
  height: 8px;
  background: var(--gray-100);
  margin: var(--space-4) 0;
}

.divider--thin {
  height: 1px;
  background: var(--gray-100);
  margin: var(--space-3) var(--space-4);
}

/* ── Page Padding Section ───────────────────────────────── */
.section { padding: var(--space-4); }
.section--sm { padding: var(--space-3) var(--space-4); }

/* ── Map Placeholder ────────────────────────────────────── */
.map-placeholder {
  width: 100%;
  height: 180px;
  background: #E5E7EB;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--gray-600);
  font-size: var(--text-sm);
  font-weight: 500;
  background-image:
    linear-gradient(rgba(156,163,175,.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(156,163,175,.3) 1px, transparent 1px);
  background-size: 20px 20px;
}

.map-placeholder i { font-size: 36px; color: var(--primary); }

/* ── Notification Item ──────────────────────────────────── */
.notif-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background var(--dur-fast);
}

.notif-item--unread { background: #FFFBF5; }
.notif-item:active { background: var(--gray-50); }

.notif-item__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.notif-item__body { flex: 1; }
.notif-item__title { font-size: var(--text-sm); font-weight: 600; color: var(--black); line-height: 1.35; }
.notif-item__text { font-size: var(--text-xs); color: var(--gray-600); margin-top: 2px; line-height: 1.45; }
.notif-item__time { font-size: var(--text-xs); color: var(--gray-400); margin-top: 4px; }
.notif-item__dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 6px;
}

/* ── Onboarding Slider ──────────────────────────────────── */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: var(--space-4) 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--gray-300);
  transition: all var(--dur-base) var(--ease-bounce);
  cursor: pointer;
}

.dot.active {
  background: var(--primary);
  width: 24px;
}

/* ── Splash / Intro Screen ──────────────────────────────── */
.splash-screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.splash-screen__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.splash-screen__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,.3) 0%,
    rgba(0,0,0,.1) 30%,
    rgba(0,0,0,.6) 70%,
    rgba(0,0,0,.92) 100%
  );
}

/* ── Profile Hero ───────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, var(--black) 0%, var(--dark-2) 100%);
  padding: var(--space-6) var(--space-4) var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-full);
  background: rgba(255,156,32,.12);
}

/* ── Input Reply Bar ────────────────────────────────────── */
.reply-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  position: sticky;
  bottom: 0;
}

.reply-bar__input {
  flex: 1;
  background: var(--gray-50);
  border-radius: var(--radius-full);
  padding: 10px var(--space-4);
  font-size: var(--text-sm);
  border: 1px solid var(--gray-200);
  font-family: var(--font);
  color: var(--dark);
}

.reply-bar__input::placeholder { color: var(--gray-400); }

.reply-bar__send {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--white);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-bounce),
              box-shadow var(--dur-fast) var(--ease);
}

.reply-bar__send:active {
  transform: scale(0.9);
}

/* ── Ride Option Card ───────────────────────────────────── */
.ride-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  background: var(--white);
}

.ride-option.selected {
  border-color: var(--primary);
  background: var(--primary-pale);
}

.ride-option__icon {
  font-size: 32px;
  flex-shrink: 0;
}

.ride-option__name {
  font-weight: 700;
  font-size: var(--text-base);
}

.ride-option__info {
  font-size: var(--text-xs);
  color: var(--gray-600);
}

.ride-option__price {
  margin-left: auto;
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--primary);
}

/* ── Auth Card ──────────────────────────────────────────── */
.auth-card {
  background: var(--white);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding: var(--space-8) var(--space-5) var(--space-10);
  min-height: 60vh;
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-header__logo {
  height: 40px;
  margin: 0 auto var(--space-4);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
}

.auth-divider__line {
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.auth-divider__text {
  font-size: var(--text-xs);
  color: var(--gray-400);
  font-weight: 500;
  white-space: nowrap;
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
  text-align: center;
  gap: var(--space-3);
}

.empty-state__icon {
  font-size: 56px;
  opacity: 0.4;
}

.empty-state__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--dark);
}

.empty-state__text {
  font-size: var(--text-sm);
  color: var(--gray-600);
  max-width: 250px;
  line-height: 1.6;
}

/* ── Responsive Helpers ─────────────────────────────────── */
@media (min-width: 431px) {
  .app-shell {
    margin: 20px auto;
    min-height: calc(100vh - 40px);
    border-radius: var(--radius-2xl);
  }

  .top-bar,
  .bottom-nav {
    border-radius: 0;
  }

  .fab {
    right: calc(50% - var(--app-max-w)/2 + 20px);
  }
}
