/* ===== CSS VARIABLES & RESET ===== */
:root {
  --tg-bg:           var(--tg-theme-bg-color, #ffffff);
  --tg-text:         var(--tg-theme-text-color, #1a1a1a);
  --tg-hint:         var(--tg-theme-hint-color, #8a8a8a);
  --tg-link:         var(--tg-theme-link-color, #2481cc);
  --tg-btn:          var(--tg-theme-button-color, #2481cc);
  --tg-btn-text:     var(--tg-theme-button-text-color, #ffffff);
  --tg-secondary-bg: var(--tg-theme-secondary-bg-color, #f1f1f1);
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 2px 12px rgba(0,0,0,0.08);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --danger:  #ff3b30;
  --success: #34c759;
  --warn:    #ff9500;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  background: var(--tg-secondary-bg);
  color: var(--tg-text);
  font-size: 15px;
  line-height: 1.4;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  background: var(--tg-bg);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 4px;
}

.header-title {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.back-btn, .bell-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tg-link);
  flex-shrink: 0;
  transition: background var(--transition);
  position: relative;
}
.back-btn:active, .bell-btn:active { background: rgba(0,0,0,0.07); }
.back-btn { display: none; }
.back-btn.visible { display: flex; }

.bell-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--tg-bg);
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  min-height: calc(100vh - 59px);
  padding: 14px;
  animation: fadeIn 0.18s ease;
}
.screen.active { display: block; }

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

/* ===== HERO ===== */
.hero { text-align: center; padding: 20px 0 16px; }
.hero-icon {
  font-size: 48px;
  margin-bottom: 6px;
  animation: float 3s ease-in-out infinite;
  display: block;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
.hero-subtitle { font-size: 13px; color: var(--tg-hint); font-weight: 500; }

/* ===== SEARCH CARD ===== */
.search-card {
  background: var(--tg-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.field-group { border-bottom: 1px solid rgba(0,0,0,0.06); }

.field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  transition: background var(--transition);
  min-height: 62px;
}
.field:active { background: var(--tg-secondary-bg); }

.field-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.from-icon { background: rgba(36,129,204,.12); color: #2481cc; }
.to-icon   { background: rgba(52,199,89,.12);  color: #34c759; }
.date-icon { background: rgba(255,149,0,.12);  color: #ff9500; }

.field-content { flex: 1; min-width: 0; }
.field-label { display: block; font-size: 11px; color: var(--tg-hint); font-weight: 500; margin-bottom: 2px; letter-spacing: .2px; }
.field-value { display: block; font-size: 15px; font-weight: 500; color: var(--tg-hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field-value.selected { color: var(--tg-text); }
.chevron { color: var(--tg-hint); flex-shrink: 0; }

.field-divider { display: flex; align-items: center; padding: 0 14px; gap: 8px; }
.divider-line { flex: 1; height: 1px; background: rgba(0,0,0,0.06); }

.swap-btn {
  width: 34px; height: 34px;
  border: 2px solid rgba(0,0,0,0.08);
  background: var(--tg-bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--tg-hint);
  flex-shrink: 0;
  transition: all var(--transition);
}
.swap-btn:active { background: var(--tg-secondary-bg); transform: rotate(180deg); }

.search-btn {
  width: 100%;
  padding: 14px;
  background: var(--tg-btn);
  color: var(--tg-btn-text);
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 7px;
  transition: opacity var(--transition);
}
.search-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.search-btn:not(:disabled):active { opacity: 0.82; }

/* ===== SEARCH HISTORY ===== */
.history-section {
  margin-top: 12px;
}
.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.history-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--tg-hint);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 2px;
  flex: 1;
  min-width: 0;
}
.history-clear-all {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--tg-link);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.history-clear-all:active { opacity: 0.75; }
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-item {
  width: 100%;
  text-align: left;
  background: var(--tg-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 11px 12px;
}
.history-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.history-delete-one {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: var(--tg-secondary-bg);
  color: var(--tg-hint);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.history-delete-one:active { opacity: 0.75; }
.history-route {
  font-size: 14px;
  font-weight: 700;
  color: var(--tg-text);
  flex: 1;
  min-width: 0;
}
.history-meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--tg-hint);
}
.history-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}
.history-action-btn {
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--tg-btn);
  color: var(--tg-btn-text);
}
.history-action-btn:active { opacity: .85; }
.history-action-secondary {
  background: var(--tg-secondary-bg);
  color: var(--tg-link);
}

/* ===== STATION PICKER ===== */
.search-box {
  display: flex; align-items: center; gap: 9px;
  background: var(--tg-bg);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.search-icon { color: var(--tg-hint); flex-shrink: 0; }
.search-box input {
  flex: 1; border: none; outline: none;
  font-size: 15px; background: transparent; color: var(--tg-text);
}
.search-box input::placeholder { color: var(--tg-hint); }

.station-list { display: flex; flex-direction: column; gap: 2px; }

.station-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px;
  background: var(--tg-bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.station-item:active { background: rgba(0,0,0,0.05); }
.station-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tg-btn); flex-shrink: 0; }
.station-name { font-size: 15px; font-weight: 500; }

/* ===== DATE PICKER ===== */
.date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.date-card {
  background: var(--tg-bg);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer; text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 2px solid transparent;
}
.date-card:active { transform: scale(0.97); }
.date-card.selected { border-color: var(--tg-btn); background: rgba(36,129,204,0.06); }

.date-card .day-name  { font-size: 11px; color: var(--tg-hint); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.date-card .day-num   { font-size: 26px; font-weight: 700; color: var(--tg-text); line-height: 1; margin-bottom: 2px; }
.date-card .month-name{ font-size: 12px; color: var(--tg-hint); }
.date-card.today .day-num { color: var(--tg-btn); }

/* ===== RESULTS ===== */
.results-header {
  background: var(--tg-bg);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.route-info {
  display: flex; align-items: center; gap: 7px;
  font-size: 16px; font-weight: 700; margin-bottom: 3px;
}
.route-arrow { color: var(--tg-hint); font-size: 13px; }
.date-info { font-size: 12px; color: var(--tg-hint); }

.trains-list { display: flex; flex-direction: column; gap: 9px; }

.train-card { background: var(--tg-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

.train-card-hint {
  font-size: 12px;
  line-height: 1.45;
  color: var(--tg-hint);
  padding: 0 14px 8px;
  margin: 0;
}

.train-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.train-times { display: flex; align-items: center; gap: 9px; }
.train-dep, .train-arr { font-size: 20px; font-weight: 700; }

.train-duration { font-size: 10px; color: var(--tg-hint); text-align: center; }
.train-duration .arrow-line { display: block; width: 36px; height: 1px; background: var(--tg-hint); margin: 3px auto; }

.train-meta { text-align: right; }
.train-type {
  font-size: 11px; font-weight: 600; color: var(--tg-btn);
  background: rgba(36,129,204,0.1);
  padding: 2px 7px; border-radius: 20px;
  margin-bottom: 3px; display: inline-block;
}
.train-num { font-size: 11px; color: var(--tg-hint); }

.seats-list { padding: 9px 14px 2px; display: flex; flex-direction: column; gap: 7px; }
.seat-row { display: flex; align-items: center; justify-content: space-between; }
.seat-type { display: flex; align-items: center; gap: 7px; }
.seat-icon { font-size: 15px; }
.seat-name { font-size: 13px; font-weight: 500; }
.seat-count { font-size: 12px; color: var(--tg-hint); margin-left: 2px; }
.seat-price { font-size: 13px; font-weight: 600; color: var(--success); }

/* ===== SUBSCRIBE BUTTON ===== */
.watch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: calc(100% - 28px);
  margin: 8px 14px 13px;
  padding: 11px;
  background: rgba(88,86,214,0.1);
  color: #5856d6;
  border: 1.5px solid rgba(88,86,214,0.25);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.watch-btn:active { opacity: 0.75; }
.watch-btn.auto-buy-btn {
  background: rgba(88,86,214,0.1);
  color: #5856d6;
  border-color: rgba(88,86,214,0.3);
}
.watch-btn.watching {
  background: rgba(52,199,89,0.1);
  color: var(--success);
  border-color: rgba(52,199,89,0.25);
}

/* "Bilet yo'q" holati — katta subscribe banner */
.no-seats-banner {
  background: var(--tg-bg);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.no-seats-banner .banner-icon { font-size: 36px; margin-bottom: 8px; }
.no-seats-banner h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.no-seats-banner p { font-size: 13px; color: var(--tg-hint); margin-bottom: 16px; }

.big-watch-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 14px;
  background: #5856d6;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
}
.big-watch-btn:active { opacity: 0.8; }
.big-watch-btn.watching {
  background: var(--success);
}
.big-watch-btn.notify {
  background: var(--tg-link);
}
.big-watch-btn.auto {
  background: #5856d6;
}

.route-watch-section {
  width: 100%;
  margin-top: 4px;
}
.route-watch-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Sold-out train: ikkita kuzatuv tugmasi */
.train-card-soldout {
  opacity: 0.98;
}
.train-card-soldout .train-header {
  border-bottom-style: dashed;
}
.soldout-note {
  text-align: center;
  font-size: 13px;
  color: var(--tg-hint);
  padding: 12px 14px 4px;
  margin: 0;
}
.train-soldout-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 14px 14px;
}
.watch-row-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
}
.watch-row-btn:active { opacity: 0.82; }
.watch-row-btn.notify {
  background: rgba(36, 129, 204, 0.12);
  color: var(--tg-link);
  border: 1.5px solid rgba(36, 129, 204, 0.28);
}
.watch-row-btn.auto {
  background: rgba(88, 86, 214, 0.12);
  color: #5856d6;
  border: 1.5px solid rgba(88, 86, 214, 0.28);
}
.watch-row-btn.watching {
  background: rgba(52, 199, 89, 0.12);
  color: var(--success);
  border: 1.5px solid rgba(52, 199, 89, 0.28);
}
.soldout-telegram-hint {
  font-size: 12px;
  color: var(--tg-hint);
  text-align: center;
  padding: 4px 8px 10px;
  margin: 0;
}

/* Joy turi filtri: boshqa turlarda joy bor */
.comfort-mismatch-route-banner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 149, 0, 0.1);
  border: 1px solid rgba(255, 149, 0, 0.35);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.comfort-mismatch-route-icon { font-size: 22px; line-height: 1; }
.comfort-mismatch-route-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--tg-text);
}
.comfort-mismatch-route-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--tg-link);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.comfort-mismatch-route-btn:active { opacity: 0.88; }

.train-card-other-comfort {
  border: 1.5px solid rgba(255, 149, 0, 0.28);
}
.comfort-filter-hint {
  font-size: 12px;
  line-height: 1.45;
  color: var(--tg-text);
  padding: 10px 14px;
  margin: 0;
  background: rgba(255, 149, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.train-card-other-comfort .buy-btn-secondary {
  margin-top: 6px;
  margin-bottom: 0;
  background: var(--tg-secondary-bg);
  color: var(--tg-link);
  border: 1.5px solid rgba(36, 129, 204, 0.35);
}

/* ===== SUBSCRIPTIONS SCREEN ===== */
.subs-empty {
  text-align: center;
  padding: 60px 24px 24px;
  color: var(--tg-hint);
}
.subs-empty-icon { font-size: 48px; margin-bottom: 12px; }
.subs-empty h3   { font-size: 17px; color: var(--tg-text); margin-bottom: 8px; font-weight: 600; }
.subs-empty p    { font-size: 13px; line-height: 1.6; }

.subs-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--tg-hint);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin: 0 2px 8px;
}

.sub-card {
  background: var(--tg-bg);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 9px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.sub-icon { font-size: 26px; flex-shrink: 0; }
.sub-info { flex: 1; min-width: 0; }
.sub-route { font-size: 15px; font-weight: 700; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-reys {
  font-size: 14px;
  color: var(--tg-text);
  margin: 6px 0 4px;
  line-height: 1.35;
}
.sub-reys-route .sub-reys-hint { font-weight: 500; color: var(--tg-hint); font-size: 12px; }
.sub-reys-time { font-weight: 600; color: var(--tg-link); }
.sub-date  { font-size: 12px; color: var(--tg-hint); line-height: 1.45; }
.sub-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255,149,0,0.1);
  color: var(--warn);
  white-space: nowrap;
  margin-top: 5px;
  display: inline-block;
}

.sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.sub-action-btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(36, 129, 204, 0.12);
  color: var(--tg-link);
}
.sub-action-btn:active { opacity: 0.85; }
.sub-action-danger {
  background: rgba(255, 59, 48, 0.1);
  color: var(--danger);
}

.subs-empty-inline {
  padding: 20px 16px 28px;
  text-align: center;
}
.subs-empty-inline h3 { font-size: 16px; margin-bottom: 6px; }
.subs-empty-inline p { font-size: 13px; line-height: 1.5; color: var(--tg-hint); }

.subs-hint {
  font-size: 12px;
  color: var(--tg-hint);
  margin: -4px 2px 10px;
  line-height: 1.45;
}

/* Chipta topshiriqlari (purchase_requests) */
.purchase-card {
  background: var(--tg-secondary-bg);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 9px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.purchase-icon { font-size: 22px; flex-shrink: 0; line-height: 1; }
.purchase-info { flex: 1; min-width: 0; }
.purchase-route {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.purchase-meta {
  font-size: 12px;
  color: var(--tg-hint);
  line-height: 1.4;
  margin-top: 2px;
}
.purchase-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.purchase-src {
  font-size: 11px;
  font-weight: 600;
  color: var(--tg-link);
}
.purchase-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.purchase-status-pending {
  background: rgba(255, 149, 0, 0.12);
  color: var(--warn);
}
.purchase-status-success {
  background: rgba(52, 199, 89, 0.14);
  color: #248a3d;
}
.purchase-status-partial {
  background: rgba(255, 149, 0, 0.14);
  color: #b35c00;
}
.purchase-status-error {
  background: rgba(255, 59, 48, 0.12);
  color: var(--danger);
}
.purchase-msg {
  font-size: 12px;
  color: var(--tg-text);
  margin-top: 8px;
  line-height: 1.45;
  word-break: break-word;
}
.purchase-time {
  font-size: 10px;
  color: var(--tg-hint);
  margin-top: 6px;
}

.sub-delete {
  width: 32px; height: 32px;
  border: none;
  background: rgba(255,59,48,0.08);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--danger);
  flex-shrink: 0;
  transition: background var(--transition);
}
.sub-delete:active { background: rgba(255,59,48,0.18); }

/* ===== BUY BUTTON ===== */
.buy-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: calc(100% - 28px);
  margin: 4px 14px 13px;
  padding: 11px;
  background: var(--tg-btn);
  color: var(--tg-btn-text);
  border: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.buy-btn-auto {
  margin-top: 8px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #5856d6 0%, #7b6cf6 100%);
  color: #fff;
}
.buy-btn-auto:active { opacity: 0.9; }

/* ===== INLINE BUY BUTTON ===== */
.inline-buy-btn {
  padding: 4px 10px;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition);
}
.inline-buy-btn:active { opacity: 0.75; }

/* ===== NEW SEARCH / NAV ===== */
.new-search-btn {
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  background: var(--tg-secondary-bg);
  color: var(--tg-link);
  border: none;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
}
.new-search-btn:active { opacity: 0.7; }

/* ===== LOADING ===== */
.loading-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(3px);
  z-index: 1000;
  align-items: center; justify-content: center;
}
.loading-overlay.active { display: flex; }

.loader {
  background: var(--tg-bg);
  border-radius: var(--radius);
  padding: 28px 36px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.train-loader {
  font-size: 36px;
  animation: trainMove 0.9s ease-in-out infinite alternate;
  display: block; margin-bottom: 10px;
}
@keyframes trainMove {
  from { transform: translateX(-8px); }
  to   { transform: translateX(8px); }
}
.loader p { font-size: 14px; font-weight: 500; color: var(--tg-hint); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30,30,30,0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px; font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  white-space: nowrap;
  z-index: 2000;
  max-width: 80vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== NO RESULTS ===== */
.no-results { text-align: center; padding: 40px 20px; color: var(--tg-hint); }
.no-results-icon { font-size: 44px; margin-bottom: 10px; }
.no-results h3 { font-size: 17px; color: var(--tg-text); margin-bottom: 6px; font-weight: 600; }
.no-results p  { font-size: 13px; line-height: 1.6; }

/* ===== PROFILE BUTTON DOT ===== */
.profile-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  border: 1.5px solid var(--tg-bg);
}

/* ===== PROFILE SCREEN ===== */
.profile-card {
  background: var(--tg-bg);
  border-radius: var(--radius);
  padding: 24px 16px 18px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.profile-avatar {
  font-size: 52px;
  margin-bottom: 8px;
  line-height: 1;
}

.profile-hint {
  font-size: 13px;
  color: var(--tg-hint);
  line-height: 1.5;
}

.form-section {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--tg-hint);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 6px;
  padding-left: 2px;
}

.form-input {
  width: 100%;
  padding: 13px 14px;
  background: var(--tg-bg);
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--tg-text);
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--tg-btn);
}

.form-input::placeholder {
  color: var(--tg-hint);
  font-weight: 400;
}

.profile-save-btn {
  width: 100%;
  padding: 14px;
  background: var(--tg-btn);
  color: var(--tg-btn-text);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity var(--transition);
}
.profile-save-btn:active { opacity: 0.8; }

.profile-saved-info {
  margin-top: 12px;
  text-align: center;
}

.saved-badge {
  display: inline-block;
  background: rgba(52,199,89,0.12);
  color: var(--success);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* ===== TIME FIELD ===== */
.time-icon { background: rgba(88,86,214,0.12); color: #5856d6; }

/* ===== TIME PICKER ===== */
.time-picker-wrap { display: flex; flex-direction: column; gap: 12px; }

.time-any-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 16px;
  background: var(--tg-bg);
  border-radius: var(--radius);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background var(--transition);
  border: 2px solid transparent;
}
.time-any-btn:active { background: var(--tg-secondary-bg); }
.time-any-btn.selected { border-color: var(--tg-btn); background: rgba(36,129,204,0.06); }

.time-picker-label {
  font-size: 12px; font-weight: 600;
  color: var(--tg-hint);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 4px 2px 0;
}

.time-range-card {
  background: var(--tg-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.time-range-row {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.time-range-row:last-child { border-bottom: none; }

.time-range-text {
  display: block;
  font-size: 11px; font-weight: 600;
  color: var(--tg-hint);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 10px;
}

.time-slots {
  display: flex; flex-wrap: wrap; gap: 8px;
}

.time-slot {
  padding: 7px 13px;
  background: var(--tg-secondary-bg);
  border-radius: 20px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  color: var(--tg-text);
}
.time-slot:active { transform: scale(0.95); }
.time-slot.selected {
  background: var(--tg-btn);
  color: var(--tg-btn-text);
  border-color: var(--tg-btn);
}

.time-confirm-btn {
  width: 100%;
  padding: 14px;
  background: var(--tg-btn);
  color: var(--tg-btn-text);
  border: none;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
}
.time-confirm-btn:active { opacity: 0.8; }

/* ===== COMFORT / JOY TURI ===== */
.comfort-icon {
  background: rgba(52,199,89,0.12);
  color: #34c759;
  display: flex;
  align-items: center;
  justify-content: center;
}
.comfort-icon-emoji { font-size: 14px; line-height: 1; }

.comfort-picker-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.comfort-picker-hint {
  font-size: 13px;
  color: var(--tg-hint);
  line-height: 1.45;
  margin: 0 2px;
}
.comfort-picker-summary {
  font-size: 14px;
  font-weight: 700;
  color: var(--tg-text);
  margin: 0 2px;
  line-height: 1.4;
  min-height: 1.4em;
}
.comfort-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comfort-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 16px;
  background: var(--tg-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-align: left;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font: inherit;
  color: inherit;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
.comfort-option:active { transform: scale(0.99); }
.comfort-option.selected {
  border-color: var(--tg-btn);
  background: rgba(36,129,204,0.06);
}
.comfort-option-icon { font-size: 26px; line-height: 1; flex-shrink: 0; pointer-events: none; }
.comfort-option-text { flex: 1; min-width: 0; pointer-events: none; }
.comfort-option-tick {
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--tg-btn);
  pointer-events: none;
  line-height: 1.4;
}
.comfort-option-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--tg-text); }
.comfort-option-desc { font-size: 12px; color: var(--tg-hint); line-height: 1.35; }

/* ===== TRAIN BRAND BADGE ===== */
.train-brand {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 20px;
  margin-bottom: 3px;
}
.brand-afrosiyob { background: rgba(0,122,255,0.12); color: #007aff; }
.brand-sharq     { background: rgba(52,199,89,0.12);  color: #34c759; }
.brand-talgo     { background: rgba(255,45,85,0.12);   color: #ff2d55; }
.brand-default   { background: rgba(36,129,204,0.1);   color: #2481cc; }
.brand-express   { background: rgba(255,149,0,0.12);   color: #ff9500; }

.train-time-filter {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500;
  color: var(--tg-hint);
  background: var(--tg-secondary-bg);
  padding: 2px 8px; border-radius: 10px;
  margin-top: 3px;
}
