:root {
  /* Tema padrão: branco e azul */
  --bg: #F8F9FB;
  --surface: #FFFFFF;
  --fg: #111827;
  --muted: #6B7280;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-light: #DBEAFE;
  --accent-soft: #EFF6FF;
  --success: #10B981;
  --success-light: #D1FAE5;
  --success-soft: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FEE2E2;

  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);
}

/* Modo daltônico: amarelo dourado original do MODALE */
#app.colorblind {
  --accent: #D4B85C;
  --accent-hover: #B89A3D;
  --accent-light: #F5EAC8;
  --accent-soft: #FBF5E3;
  --success: #15803D;
  --success-light: #BBF7D0;
  --success-soft: #F0FDF4;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: #0b0b0f;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-frame {
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  max-height: 932px;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 36px 36px;
  box-shadow: 0 0 80px rgba(0,0,0,0.55);
  background: var(--bg);
  clip-path: inset(0 0 0 0 round 0 0 36px 36px);
}
#app {
  width: 100%;
  height: 100%;
  background: transparent;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (max-width: 430px) {
  .phone-frame {
    border-radius: 0;
    box-shadow: none;
  }
  #app {
    border-radius: 0;
  }
}

.screen {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: 100px;
  animation: fadeIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 24px; line-height: 1.2; }
h3 { font-size: 17px; line-height: 1.3; }
p { font-size: 15px; line-height: 1.5; color: var(--muted); }
.small { font-size: 13px; line-height: 1.4; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
  min-width: 44px;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.colorblind .btn-primary {
  box-shadow: 0 4px 14px rgba(212, 184, 92, 0.25);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: var(--surface);
  color: var(--fg);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-strong); background: var(--bg); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  height: 44px;
  padding: 0 12px;
}
.btn-ghost:hover { background: var(--accent-soft); }
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--fg);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-icon:hover { background: var(--bg); }
.text-link {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  font-family: inherit;
}
.text-link:hover { text-decoration: underline; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

/* Inputs */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}
.input-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 16px;
  height: 56px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.input-row input {
  border: none;
  background: transparent;
  font-size: 16px;
  flex: 1;
  outline: none;
  color: var(--fg);
  font-family: inherit;
}
.input-row input::placeholder { color: var(--muted); }

/* Bottom nav */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 84px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: 10px;
  z-index: 10;
}
.bottom-nav.hidden { display: none; }
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
  font-family: inherit;
  min-width: 36px;
  min-height: 44px;
  flex: 1;
  transition: color 0.15s;
}
.nav-item svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.nav-item.active {
  color: var(--accent);
}
.nav-item.active svg {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}
.colorblind .nav-item.active svg {
  box-shadow: 0 4px 10px rgba(212, 184, 92, 0.3);
}

/* Screen header */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  margin-top: -4px;
}
.screen-header h2 { flex: 1; text-align: center; }

/* Onboarding */
.onboarding-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 24px;
  padding: 12px 0;
}
.logo-mark {
  width: 96px;
  height: 96px;
  background: var(--accent);
  border-radius: var(--radius-xl);
  display: grid;
  place-items: center;
  color: white;
  margin-bottom: 4px;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25);
}
.logo-mark.logo-ticket {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25);
}
.colorblind .logo-mark.logo-ticket {
  background: #D4B85C;
  box-shadow: 0 12px 32px rgba(212, 184, 92, 0.35);
}
.logo-mark.logo-ticket img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.colorblind .logo-mark {
  box-shadow: 0 12px 32px rgba(212, 184, 92, 0.25);
}
.logo-mark-sm {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
}
.onboarding-subtitle {
  font-size: 16px;
  margin-top: 10px;
}
.accessibility-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.onboarding-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

/* Login */
.login-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 0;
}
.login-header {
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.login-header h2 { margin-bottom: 4px; }
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-footer {
  margin-top: 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Home */
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.greeting { margin-bottom: 2px; }
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.colorblind .avatar {
  box-shadow: 0 4px 12px rgba(212, 184, 92, 0.2);
}
.search-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-family: inherit;
}
.search-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.search-card .search-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.search-card .search-icon svg {
  width: 26px;
  height: 26px;
}
.search-card .label {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  color: var(--fg);
}

.last-route-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-family: inherit;
}
.last-route-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.last-route-card:active { transform: scale(0.99); }
.last-route-info { display: flex; flex-direction: column; gap: 5px; }
.last-route-info .small { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.last-route-info h3 {
  font-size: 17px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 8px;
}
.last-route-info h3 span { color: var(--accent); font-weight: 500; }
.last-route-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.quick-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-family: inherit;
}
.quick-item:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.quick-item:active { transform: scale(0.98); }
.quick-item .icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.quick-item .icon svg {
  width: 28px;
  height: 28px;
}
.quick-item h3 { font-size: 16px; margin-bottom: 2px; }
.quick-item.full {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.quick-item.full .icon { background: rgba(255,255,255,0.2); color: #fff; }
.quick-item.full p { color: rgba(255,255,255,0.85); }
.quick-item.full h3 { color: #fff; }
.quick-item.full:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.quick-text { flex: 1; text-align: left; }

.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 12px;
}

.tickets-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}
.ticket-preview-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-family: inherit;
  overflow: hidden;
}
.ticket-preview-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ticket-preview-card:active { transform: scale(0.98); }
.ticket-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}
.ticket-preview-header span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ticket-preview-body {
  z-index: 1;
}
.ticket-preview-body h3 { font-size: 15px; margin-bottom: 3px; }
.ticket-standard {
  background: linear-gradient(135deg, #F3E8FF 0%, #E9D5FF 100%);
  border-color: #D8B4FE;
  color: #7E22CE;
}
.ticket-standard .ticket-preview-header,
.ticket-standard h3 { color: #7E22CE; }
.ticket-standard .small { color: #6B21A8; }

.ticket-infinit {
  background: #111827;
  border-color: #374151;
  color: #fff;
}
.ticket-infinit .ticket-preview-header,
.ticket-infinit h3,
.ticket-infinit .small,
.ticket-infinit .ticket-preview-header span { color: #fff; }
.infinit-stripes {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60%;
  background: repeating-linear-gradient(
    135deg,
    #EF4444 0px,
    #EF4444 10px,
    #F59E0B 10px,
    #F59E0B 20px,
    #10B981 20px,
    #10B981 30px,
    #3B82F6 30px,
    #3B82F6 40px,
    #8B5CF6 40px,
    #8B5CF6 50px
  );
  opacity: 0.35;
  mask-image: linear-gradient(to left, rgba(0,0,0,1), transparent);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1), transparent);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--success-soft);
  color: #065F46;
  width: fit-content;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Routes */
.routes-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.routes-inputs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.route-input {
  border: none;
  background: transparent;
  padding: 0;
  height: 48px;
}
.route-input input {
  font-weight: 600;
}
.route-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.route-line {
  width: 2px;
  height: 18px;
  background: var(--border);
  margin-left: 21px;
}
.swap-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s;
}
.swap-btn:hover { color: var(--accent); border-color: var(--accent); }

.mode-toggle {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 24px;
  padding-bottom: 4px;
}
.mode-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.mode-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.route-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-family: inherit;
}
.route-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.route-card:active { transform: scale(0.99); }
.route-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.route-time { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; color: var(--fg); }
.route-price { font-size: 20px; font-weight: 700; color: var(--accent); }
.route-detail { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.route-modes { display: flex; gap: 6px; }
.mode-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-blue { background: var(--accent-soft); color: var(--accent-hover); }
.badge-green { background: var(--success-soft); color: #065F46; }

/* Saved Routes */
.saved-routes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.saved-route-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-family: inherit;
}
.saved-route-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.saved-route-card:active { transform: scale(0.99); }
.saved-route-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.saved-route-info { flex: 1; }
.saved-route-info h3 { font-size: 16px; margin-bottom: 3px; }
.add-route-section { margin-top: 8px; }
.add-route-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Tickets */
.ticket-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px 20px;
  margin-bottom: 24px;
  text-align: center;
}
.qr-wrap {
  width: 180px;
  height: 180px;
  background: #fff;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.03);
}
.qr-pattern {
  width: 150px;
  height: 150px;
  background-image:
    linear-gradient(45deg, var(--fg) 25%, transparent 25%),
    linear-gradient(-45deg, var(--fg) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--fg) 75%),
    linear-gradient(-45deg, transparent 75%, var(--fg) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  opacity: 0.92;
}

.ticket-option {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--surface);
  text-align: left;
  font-family: inherit;
}
.ticket-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ticket-option h3 { margin-bottom: 2px; }
.ticket-option .radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.ticket-option.selected .radio {
  border-color: var(--accent);
  background: var(--accent);
}
.ticket-option.selected .radio::after {
  content: '';
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
}

.payment-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-top: 4px;
}

.success-box {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 20px;
  text-align: center;
  animation: fadeIn 0.4s ease;
}
.success-box.show { display: flex; }
.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

/* Profile */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}
.logout-btn {
  width: 100%;
  margin-top: 24px;
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-light);
}
.logout-btn:hover {
  background: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger);
}
.colorblind .profile-avatar {
  box-shadow: 0 6px 16px rgba(212, 184, 92, 0.2);
}
.profile-name h2 { margin-bottom: 2px; }
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.stat-box {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-box .num {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 2px;
}
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-switch {
  width: 52px;
  height: 32px;
  background: var(--border);
  border-radius: 16px;
  position: relative;
  cursor: pointer;
  transition: background 0.25s;
  border: none;
  padding: 0;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.toggle-switch.on { background: var(--accent); }
.toggle-switch.on::after { transform: translateX(20px); }

/* Toast */
.toast {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--fg);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* NFC Card Overlay */
.nfc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.nfc-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.nfc-card {
  width: 260px;
  height: 160px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 35%, #4c1d95 70%, #be185d 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
  transform: translateY(100vh) rotateX(20deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.nfc-overlay.show .nfc-card {
  transform: translateY(0) rotateX(0deg);
  animation: nfcFloat 2.5s ease-in-out infinite 0.6s;
}
@keyframes nfcFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.nfc-card-stripes {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.08) 0px,
    rgba(255,255,255,0.08) 10px,
    transparent 10px,
    transparent 20px
  );
  transform: rotate(15deg);
}
.nfc-card-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}
.nfc-card-chip {
  width: 40px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #FCD34D, #F59E0B);
  color: #78350F;
  display: grid;
  place-items: center;
}
.nfc-card-text h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 2px;
}
.nfc-card-text p { color: rgba(255,255,255,0.7); }
.nfc-signal {
  color: #FCD34D;
  animation: nfcSignal 1.5s ease-in-out infinite;
}
@keyframes nfcSignal {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
.nfc-card-number {
  font-family: ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.9);
  z-index: 1;
}
.nfc-card.purple {
  background: linear-gradient(135deg, #4C1D95 0%, #6D28D9 35%, #7C3AED 70%, #A78BFA 100%);
}
.nfc-card.purple .nfc-card-chip {
  background: linear-gradient(135deg, #E9D5FF, #C4B5FD);
  color: #5B21B6;
}
.nfc-card.purple .nfc-signal {
  color: #DDD6FE;
}
.nfc-hint {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
}

/* Nearby */
.nearby-location {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.location-pin {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.location-pin svg {
  width: 28px;
  height: 28px;
}
.nearby-map {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: #e5e7eb;
}
.nearby-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.nearby-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nearby-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.nearby-item .icon {
  width: 48px;
  height: 48px;
}
.nearby-item .icon svg {
  width: 24px;
  height: 24px;
}
.nearby-item h3 { font-size: 16px; }

/* Wallet */
.wallet-balance-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
}
.colorblind .wallet-balance-card {
  box-shadow: 0 10px 30px rgba(212, 184, 92, 0.25);
}
.wallet-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: grid;
  place-items: center;
}
.wallet-icon svg {
  width: 32px;
  height: 32px;
}
.wallet-balance-card .small { color: rgba(255,255,255,0.8); }
.wallet-amount {
  color: #fff;
  font-size: 30px;
  letter-spacing: -0.02em;
}
.wallet-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}
.wallet-actions .btn { flex: 1; }
.wallet-tickets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wallet-ticket-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-family: inherit;
}
.wallet-ticket-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.wallet-ticket-card:active { transform: scale(0.99); }
.wallet-ticket-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.wallet-ticket-icon svg {
  width: 28px;
  height: 28px;
}
.wallet-ticket-info { flex: 1; }
.wallet-ticket-info h3 { font-size: 16px; margin-bottom: 2px; }
.wallet-ticket-status {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
}
.wallet-ticket-card.infinit .wallet-ticket-icon {
  background: #111827;
  color: #fff;
}
.wallet-ticket-card.infinit .wallet-ticket-status {
  background: #111827;
  color: #fff;
}

/* Accessibility overrides */
.high-contrast {
  --fg: #000000;
  --muted: #262626;
  --border: #737373;
  --border-strong: #525252;
}
.high-contrast h1,
.high-contrast h2,
.high-contrast h3,
.high-contrast p,
.high-contrast .small,
.high-contrast .section-title,
.high-contrast .label,
.high-contrast .nav-item,
.high-contrast .trip-meta,
.high-contrast .route-time,
.high-contrast .route-detail .small,
.high-contrast .wallet-ticket-info p,
.high-contrast .nearby-item p {
  color: #000000;
}
.high-contrast .small,
.high-contrast .section-title,
.high-contrast .trip-meta,
.high-contrast .route-detail .small,
.high-contrast .wallet-ticket-info p,
.high-contrast .nearby-item p {
  opacity: 0.85;
}
.high-contrast .input-row input,
.high-contrast .input-row input::placeholder {
  color: #000000;
}
.high-contrast .route-price,
.high-contrast .stat-box .num,
.high-contrast .wallet-amount,
.high-contrast .nav-item.active {
  color: #000000;
}
.high-contrast .ticket-standard .ticket-preview-header,
.high-contrast .ticket-standard h3,
.high-contrast .ticket-standard .small,
.high-contrast .badge-blue,
.high-contrast .badge-green {
  color: #000000;
}
.large-icons .mode-icon,
.large-icons .icon,
.large-icons .search-icon,
.large-icons .map-pin,
.large-icons .wallet-ticket-icon,
.large-icons .nfc-card-chip,
.large-icons .location-pin {
  transform: scale(1.6);
}
.large-icons .nav-item svg {
  width: 40px;
  height: 40px;
  padding: 8px;
}
.large-icons .quick-item .icon svg,
.large-icons .search-card .search-icon svg {
  width: 36px;
  height: 36px;
}
.large-icons h1 { font-size: 44px; }
.large-icons h2 { font-size: 32px; }
.large-icons h3 { font-size: 22px; }
.large-icons p,
.large-icons .small { font-size: 18px; }
.large-icons .btn { height: 68px; font-size: 20px; }
.large-icons .input-row { height: 68px; }
.large-icons .input-row input { font-size: 20px; }
.large-icons .nav-item { font-size: 12px; }
.large-icons .section-title { font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  .screen, .toast, .toggle-switch::after, .btn {
    animation: none !important;
    transition: none !important;
  }
}
