/* ══════════════════════════════════════════════════════
   PANELS — Schedule, Notifications, Settings
══════════════════════════════════════════════════════ */

/* ── SCHEDULE ── */
.sch-top {
  display: flex;
  flex-direction: column;
  padding: 14px 20px 12px;
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
  gap: 10px;
}

.sch-route {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sch-badge {
  min-width: 42px;
  padding: 5px 9px;
  text-align: center;
  background: var(--primary);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--r-s);
  flex-shrink: 0;
}

.sch-rname {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sch-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sch-mode-desc {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red, #e53e3e);
  flex-shrink: 0;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.78); }
}

.mode-toggle {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  padding: 3px;
  gap: 2px;
}

.mtab {
  padding: 6px 16px;
  border: none;
  background: none;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
  transition: all .18s;
}

.mtab.on {
  background: var(--bg-card);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.tl-list {
  display: flex;
  flex-direction: column;
}

.tl-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  min-height: 58px;
}

.tl-item.past {
  opacity: .38;
}

.tl-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.tl-lt,
.tl-lb {
  flex: 1;
  width: 2px;
  background: var(--border-dark);
  min-height: 8px;
}

.tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-dark);
  background: var(--white);
  flex-shrink: 0;
}

.tl-item.cur .tl-dot {
  border-color: var(--primary-dark);
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  width: 14px;
  height: 14px;
}

.tl-item.cur .tl-lt,
.tl-item.cur .tl-lb {
  background: var(--primary-dark);
}

.tl-info {
  padding: 4px 0 16px 12px;
}

.tl-time {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.2;
}

.tl-item.cur .tl-time {
  color: var(--primary-dark);
}

.dtag {
  font-size: 11px;
  font-weight: 600;
  color: var(--red);
  background: var(--red-soft);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font);
}

.dtag.urg {
  color: var(--ink);
  background: var(--bg-subtle);
}

.dtag.appr {
  color: var(--green);
  background: var(--green-soft);
}

.tl-stop {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  margin-top: 1px;
}

/* ── STOP ARRIVALS ── */
.arr-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1.5px solid var(--border);
  cursor: pointer;
  transition: background .12s, padding-left .12s;
  border-radius: 0;
}

.arr-row:last-child {
  border-bottom: none;
}

.arr-row.past {
  opacity: .46;
}

.arr-row.cur {
  background: rgba(255, 204, 0, .12);
}

.arr-row:hover {
  background: var(--bg-subtle);
  padding-left: 8px;
  border-radius: var(--r-s);
}

.arr-badge {
  min-width: 46px;
  padding: 6px 8px;
  text-align: center;
  background: var(--primary);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--r-s);
  flex-shrink: 0;
}

.arr-info {
  flex: 1;
  min-width: 0;
}

.arr-dest {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arr-time {
  text-align: right;
  flex-shrink: 0;
}

.arr-mins {
  font-size: 15px;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--ink);
}

.arr-mins.urg {
  color: var(--ink);
}

.arr-mins.appr {
  color: var(--green);
}

.arr-hms {
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--mono);
}

/* ── BUS DETAIL PANEL ── */
.bus-panel {
  padding: 16px 20px 18px;
  display: grid;
  gap: 12px;
}

.bus-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.bus-badge {
  min-width: 42px;
  padding: 5px 9px;
  text-align: center;
  background: var(--primary);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--r-s);
  flex-shrink: 0;
}

.bus-line-wrap {
  min-width: 0;
}

.bus-line-name {
  font-size: 15px;
  font-weight: 750;
  color: var(--ink);
  line-height: 1.25;
}

.bus-line-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-3);
}

.bus-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.bus-id {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: var(--mono);
}

.bus-state {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.bus-state.is-delay {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(220, 38, 38, .2);
}

.bus-state.is-ontime {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(22, 163, 74, .2);
}

.bus-state.is-early,
.bus-state.is-unknown {
  color: var(--orange);
  background: rgba(234, 88, 12, .12);
  border-color: rgba(234, 88, 12, .2);
}

.bus-card {
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  border-radius: var(--r-m);
  padding: 10px 12px;
}

.bus-card-k {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  margin-bottom: 3px;
}

.bus-card-v {
  font-size: 14px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
}

.bus-actions {
  display: grid;
  gap: 8px;
}

.bus-action {
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  background: var(--bg-subtle);
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-radius: var(--r-m);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, transform .15s, border-color .15s;
}

.bus-action:hover {
  background: var(--bg-hover);
  border-color: var(--border-dark);
  transform: translateY(-1px);
}

.bus-action-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--ink);
}

.bus-action-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ── SKELETON LOADERS ── */
.skl {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #e9edf3;
}

.skl::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.72) 50%, rgba(255,255,255,0) 100%);
  animation: skeletonShimmer 1.15s ease-in-out infinite;
}

@keyframes skeletonShimmer {
  100% { transform: translateX(100%); }
}

.skl-line { height: 12px; }
.skl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skl-chip {
  height: 24px;
  min-width: 92px;
  display: inline-flex;
}

.skl-badge {
  width: 42px;
  height: 24px;
  display: inline-flex;
}

.skl-btn {
  min-height: 42px;
  border-radius: var(--r-m);
}

.w-35 { width: 35%; }
.w-40 { width: 40%; }
.w-45 { width: 45%; }
.w-60 { width: 60%; }
.w-65 { width: 65%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-85 { width: 85%; }
.w-90 { width: 90%; }

.sched-skeleton-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 20px;
  border-bottom: 1.5px solid var(--border);
}

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

.disruptions-skeleton {
  display: grid;
  gap: 10px;
}

.disruption-skeleton-card {
  border: 1.5px solid var(--border);
  border-radius: var(--r-m);
  background: var(--bg-subtle);
  padding: 12px;
}

.itn-skeleton {
  display: grid;
  gap: 10px;
}

.itn-skeleton-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.itn-skeleton-card {
  border: 1.5px solid var(--border);
  border-radius: var(--r-m);
  background: var(--bg-subtle);
  padding: 12px;
}

/* ── NOTIFICATIONS ── */
.notif-feed {
  min-height: 100%;
  padding: 14px 0 26px;
  background: linear-gradient(180deg, #fafbfc 0%, #f3f4f7 100%);
}

.notif-feed .ps {
  padding: 0 16px 14px;
  border-bottom: none;
}

.notif-feed-head {
  padding-top: 4px;
  padding-bottom: 18px;
}

.notif-feed-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: var(--r-full);
  background: rgba(14, 17, 24, .06);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.notif-feed-title {
  margin: 12px 0 6px;
  font-size: 28px;
  line-height: .98;
  letter-spacing: -.05em;
  color: var(--ink);
}

.notif-feed-summary {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.55;
}

.notif-shell {
  padding-bottom: 12px;
}

.notif-card {
  position: relative;
  border: 1px solid rgba(14, 17, 24, .08);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 24px rgba(14, 17, 24, .05);
  backdrop-filter: blur(12px);
}

.notif-card.unread {
  border-color: rgba(14, 17, 24, .14);
  box-shadow: 0 12px 28px rgba(14, 17, 24, .08);
}

.notif-card::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(14, 17, 24, .16);
  opacity: 0;
}

.notif-card.unread::before {
  opacity: 1;
  background: var(--primary-dark);
}

.notif-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #eceff3;
}

.notif-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  min-height: 0;
  max-height: none;
}

.notif-body {
  padding: 18px 18px 18px;
}

.notif-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.notif-ttl {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.03em;
  line-height: 1.12;
  text-wrap: balance;
}

.notif-date {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-3);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-family: var(--mono);
}

.notif-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 8px;
  background: rgba(14, 17, 24, .06);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.notif-chip.is-unread {
  background: rgba(255, 204, 0, .18);
  color: var(--ink);
}

.notif-meta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(14, 17, 24, .06);
}

.notif-author {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.notif-author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(14, 17, 24, .08);
  background: #fff;
}

.notif-author-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 204, 0, .2);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.notif-author-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.notif-author-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.notif-author-role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.notif-copy {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.72;
}

.notif-copy p:first-child {
  margin-top: 0;
}

.notif-copy p:last-child {
  margin-bottom: 0;
}

.notif-copy a {
  color: var(--blue);
  font-weight: 700;
}

.notif-copy b,
.notif-copy strong {
  color: var(--ink);
}

.notif-actions {
  margin-top: 16px;
}

.notif-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: color .18s var(--ease), transform .18s var(--ease);
}

.notif-link::after {
  content: '↗';
  font-size: 12px;
}

.notif-link:hover {
  transform: translateY(-1px);
  color: var(--blue);
}

.notif-empty {
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(14, 17, 24, .08);
  box-shadow: 0 8px 24px rgba(14, 17, 24, .04);
}

.notif-empty-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 8px;
  background: rgba(14, 17, 24, .06);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.notif-empty h3 {
  margin: 14px 0 8px;
  font-size: 24px;
  line-height: 1.02;
  letter-spacing: -.04em;
}

.notif-empty p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
}

@media (max-width: 640px) {
  .notif-feed {
    padding-top: 10px;
  }

  .notif-feed .ps {
    padding: 0 14px 12px;
  }

  .notif-feed-title {
    font-size: 24px;
  }

  .notif-card {
    border-radius: 18px;
  }

  .notif-body {
    padding: 16px;
  }

  .notif-cover {
    aspect-ratio: 1.75 / 1;
  }

  .notif-ttl {
    font-size: 18px;
  }

  .notif-empty {
    padding: 20px;
  }
}

/* ── SETTINGS ── */
.scard {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--r-l);
  overflow: hidden;
  margin-bottom: 10px;
}

.scard-h {
  padding: 13px 16px;
  border-bottom: 1.5px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .07em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scard-b {
  padding: 4px 0;
}

.chk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background .12s;
}

.chk-row:hover {
  background: var(--bg-hover);
}

.chk-row input {
  display: none;
}

.chkb {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--border-dark);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}

.chkb::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2.5px solid var(--white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) scale(0);
  transition: transform .15s;
  margin-top: -2px;
}

.chk-row input:checked ~ .chkb {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.chk-row input:checked ~ .chkb::after {
  transform: rotate(45deg) scale(1);
}

.chklbl {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
}

.seg-wrap {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
}

.seg-opt {
  flex: 1;
  padding: 9px 6px;
  text-align: center;
  background: var(--white);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--r-s);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  transition: all .15s;
}

.seg-opt:hover {
  border-color: var(--primary-dark);
  color: var(--ink);
}

.seg-opt.on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--ink);
}

/* Help Accordion */
.help-accordion {
  background: linear-gradient(135deg, var(--primary-soft) 0%, #fffde7 100%);
  border: 1.5px solid rgba(255,204,0,.35);
  border-radius: var(--r-l);
  overflow: hidden;
  margin-bottom: 10px;
}

.help-accordion-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color .2s;
}

.help-accordion-hd.open {
  border-bottom-color: rgba(255,204,0,.35);
}

.help-accordion-hd span {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.help-accordion-chevron {
  width: 18px;
  height: 18px;
  color: var(--ink-3);
  flex-shrink: 0;
  transition: transform .25s var(--ease-spring);
}

.help-accordion-chevron.open {
  transform: rotate(180deg);
}

.help-accordion-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height .32s var(--ease);
}

.help-accordion-body.open {
  max-height: 400px;
}

.help-b {
  padding: 4px 16px 18px;
}

.help-b h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}

.help-b p {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 14px;
  line-height: 1.5;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.chip {
  background: var(--white);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--r-full);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  transition: all .15s;
}

.chip:hover {
  border-color: var(--primary-dark);
  color: var(--ink);
  background: var(--primary-soft);
}

.pb {
  background: var(--primary);
  border: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  padding: 11px 18px;
  border-radius: var(--r-m);
  transition: all .15s;
  width: 100%;
}

.pb:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.fav-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1.5px solid var(--border);
}

.fav-row:last-child {
  border-bottom: none;
}

.frm-btn {
  background: none;
  border: 1.5px solid var(--border-dark);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  transition: all .15s;
}

.frm-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}

.fsearch-inp {
  width: calc(100% - 32px);
  margin: 8px 16px 0;
  padding: 10px 13px;
  background: var(--white);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--r-m);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  display: block;
  transition: border-color .18s;
}

.fsearch-inp::placeholder {
  color: var(--ink-4);
  font-weight: 500;
}

.fsearch-inp:focus {
  border-color: var(--primary-dark);
}

.fsug-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: color .12s, background .12s;
}

.fsug-btn:last-child {
  border-bottom: none;
}

.fsug-btn:hover {
  color: var(--ink);
  background: var(--primary-soft);
}

.fsug-btn[disabled] {
  opacity: .35;
  pointer-events: none;
}
