/* ==========================================================
   TUBA — Mobilidade de Barcelos · Site Público
   Estilo visual: PDM Barcelos corporate identity
   ========================================================== */

:root {
  --brand: #00B7F2;
  --brand-dark: #009dc9;
  --brand-light: #33ccff;
  --gold: #d4a843;
  --gold-light: #faf3e0;
  --surface: #ffffff;
  --surface-alt: #f7fafa;
  --surface-warm: #f4f1eb;
  --border: #d4e4e7;
  --border-light: #e8f0f2;
  --text: #1a2b30;
  --text-secondary: #4d6269;
  --text-muted: #5e7580;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 8px 32px rgba(0, 50, 65, 0.06);
  --shadow-elevated: 0 16px 48px rgba(0, 50, 65, 0.10);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: var(--text);
  margin: 0;
  padding-top: 88px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[ng-cloak], .ng-cloak { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

[role="button"] { cursor: pointer; }
[role="button"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

button.tuba-route-card-mini,
button.tuba-stop-card-mini,
button.tuba-locality-item,
button.tuba-detail-route-tag {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
  color: inherit;
  padding: inherit;
}

/* ─── Topbar ─── */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
}

.topbar-main {
  background: var(--brand);
  height: 56px;
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 32px;
}

.topbar-crest {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.topbar-brand-sep {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.3);
  margin: 0 12px;
  flex-shrink: 0;
}

.topbar-tuba-logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

.topbar-brand-text {
  color: rgba(255,255,255,0.9);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
}

.topbar-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 12px;
  letter-spacing: 0.06em;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  cursor: pointer;
}

.topbar-link:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.topbar-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px; right: 12px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.topbar-link:hover::after,
.topbar-link.active::after {
  transform: scaleX(1);
}

/* ─── Topbar secondary ─── */

.topbar-secondary {
  background: #005f7a;
  height: 32px;
}

.topbar-secondary .topbar-inner {
  justify-content: space-between;
}

.topbar-util-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-util-link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.73rem;
  font-weight: 400;
  padding: 4px 10px;
  transition: color var(--transition);
}

.topbar-util-link:hover { color: #fff; }

.topbar-lang {
  display: flex;
  align-items: center;
  gap: 2px;
}

.topbar-lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.55);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.04em;
}

.topbar-lang-btn:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.topbar-lang-btn.active { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.4); }

/* ─── Hamburger (mobile) ─── */

.topbar-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.topbar-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.topbar-hamburger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.topbar-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.topbar-hamburger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

button.topbar-link {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.footer-nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  cursor: pointer;
  transition: color var(--transition);
}

.footer-nav-btn:hover { color: var(--brand); }

/* ─── Main ─── */

.tuba-main {
  min-height: calc(100vh - 88px);
  overflow-x: hidden;
  max-width: 100vw;
}

/* ─── Hero ─── */

.tuba-hero {
  background: linear-gradient(135deg, var(--brand) 0%, #005f7a 100%);
  color: #fff;
  padding: 72px 20px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tuba-hero::before {
  content: '';
  position: absolute;
  top: -30%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(212,168,67,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.tuba-hero::after {
  content: '';
  position: absolute;
  bottom: -20%; left: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(46,151,174,0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.tuba-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.tuba-hero-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 12px;
}

.tuba-hero-logo {
  height: 64px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}

.tuba-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin: 0 0 16px;
  line-height: 1.15;
}

.tuba-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.tuba-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.tuba-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.tuba-hero-btn-primary {
  background: var(--gold);
  color: #2b210f;
}

.tuba-hero-btn-primary:hover {
  background: #c49b38;
  color: #2b210f;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,168,67,0.35);
}

.tuba-hero-btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

.tuba-hero-btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}

/* ─── Hero Banner (image-based) ─── */

.tuba-hero-banner {
  width: 100%;
  max-width: 100vw;
  height: clamp(200px, 35vw, 460px);
  background: #00B7F2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tuba-hero-banner-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 767px) {
  .tuba-hero-banner-img {
    object-position: center 30%;
  }
}

/* ─── Home group titles ─── */

.tuba-home-group-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.tuba-home-group-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* ─── Títulos grid ─── */

.tuba-titulos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.tuba-feature-card-center { text-align: center; }
.tuba-feature-card-center .tuba-feature-icon { margin: 0 auto 10px; }

/* ─── Stats Bar ─── */

.tuba-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  max-width: 900px;
  margin: -32px auto 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.tuba-stat {
  flex: 1;
  text-align: center;
  padding: 24px 16px;
  border-right: 1px solid var(--border-light);
}

.tuba-stat:last-child { border-right: none; }

.tuba-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}

.tuba-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
}

/* ─── Section (generic) ─── */

.tuba-section {
  padding: 56px 20px;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
}

.tuba-section-alt {
  background: var(--surface-alt);
  max-width: 100%;
  padding: 56px 20px;
  overflow-x: hidden;
}

.tuba-section-alt .tuba-section-content {
  max-width: 1280px;
  margin: 0 auto;
}

.tuba-section-header {
  text-align: center;
  margin-bottom: 36px;
}

.tuba-section-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}

.tuba-section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
}

.tuba-section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 640px;
  margin: 0 auto;
}

/* ─── About Grid (Home) ─── */

.tuba-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.tuba-about-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.tuba-about-text strong { color: var(--text); }

.tuba-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tuba-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: all var(--transition);
}

.tuba-feature-card:hover {
  border-color: #d8c89a;
  box-shadow: var(--shadow-card);
}

.tuba-feature-icon {
  width: 40px;
  height: 40px;
  background: rgba(0,103,127,0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.tuba-feature-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}

.tuba-feature-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ─── Route Cards (Home & Rede) ─── */

.tuba-routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}

.tuba-route-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  min-width: 0;
  overflow: hidden;
}

.tuba-route-card:hover {
  border-color: #d8c89a;
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
  color: var(--text);
}

.tuba-route-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 44px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.tuba-route-badge-urbano { background: var(--brand); }
.tuba-route-badge-municipal { background: var(--gold); color: #2b210f; }

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

.tuba-route-name {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tuba-route-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.tuba-route-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.tuba-route-card:hover .tuba-route-arrow {
  transform: translateX(4px);
  color: var(--brand);
}

/* ─── Page (inner pages) ─── */

.tuba-page {
  padding: 32px 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.tuba-page-header {
  margin-bottom: 28px;
}

.tuba-page-title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
}

.tuba-page-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ─── Tabs ─── */

.tuba-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0;
}

.tuba-tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.tuba-tab:hover {
  color: var(--text);
}

.tuba-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* ─── Schedule Table ─── */

.tuba-schedule-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
  transition: all var(--transition);
}

.tuba-schedule-card:hover {
  border-color: #d8c89a;
}

.tuba-schedule-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  background: var(--surface);
  transition: background var(--transition);
}

.tuba-schedule-header:hover {
  background: var(--surface-alt);
}

.tuba-schedule-header .tuba-route-badge {
  min-width: 44px;
  height: 36px;
  font-size: 0.88rem;
  border-radius: 8px;
}

.tuba-schedule-route-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.88rem;
}

.tuba-schedule-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tuba-schedule-toggle {
  color: var(--text-muted);
  transition: transform var(--transition);
}

.tuba-schedule-toggle.open {
  transform: rotate(180deg);
}

.tuba-schedule-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--border-light);
}

.tuba-trip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 12px;
}

.tuba-trip-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-weight: 700;
  padding: 8px 10px;
  text-align: left;
  background: var(--surface-alt);
  position: sticky;
  top: 0;
}

.tuba-trip-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-light);
}

.tuba-trip-table tr:hover td {
  background: var(--surface-alt);
}

/* ─── Linha (route detail) ─── */

.tuba-page-linha { max-width: 1200px; margin: 0 auto; }

.tuba-linha-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.tuba-linha-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 56px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
}

.tuba-linha-badge-urbano { background: var(--brand); }
.tuba-linha-badge-municipal { background: var(--gold); color: #2b210f; }

.tuba-linha-info h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.tuba-linha-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tuba-linha-type {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0,103,127,0.08);
  color: var(--brand);
}

.tuba-linha-stat {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tuba-linha-stat i { margin-right: 3px; }

.tuba-linha-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.tuba-linha-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.tuba-linha-left { display: flex; flex-direction: column; gap: 20px; }

.tuba-linha-right {
  position: sticky;
  top: 100px;
}

.tuba-dir-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin: 14px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tuba-dir-label i { color: var(--brand); font-size: 0.65rem; }
.tuba-dir-label:first-child { margin-top: 0; }

.tuba-service-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tuba-service-tab {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tuba-service-tab:last-child { border-right: none; }

.tuba-service-tab.active {
  background: var(--brand);
  color: #fff;
}

.tuba-service-tab:hover:not(.active) { background: var(--surface-alt); }

.tuba-service-tab i { font-size: 0.75rem; }

.tuba-service-tab.is-today { position: relative; }

.tuba-service-tab.is-today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #16a34a;
  border-radius: 50%;
}

.tuba-service-tab.is-today.active::after {
  background: #fff;
}

.tuba-schedule-content { min-height: 60px; }

.tuba-schedule-direction { margin-bottom: 12px; }

.tuba-time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tuba-time-chip {
  display: inline-block;
  padding: 3px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tuba-route-timeline {
  position: relative;
  padding-left: 20px;
}

.tuba-timeline-stop {
  position: relative;
  padding: 6px 0 6px 16px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: color 0.12s;
}

.tuba-timeline-stop:hover { color: var(--brand); }

.tuba-timeline-dot {
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--brand);
  z-index: 1;
}

.tuba-timeline-line {
  position: absolute;
  left: -16px;
  top: 50%;
  width: 2px;
  height: calc(100%);
  background: var(--border-light);
}

.tuba-card-map { padding: 0; overflow: hidden; position: sticky; top: 100px; }
.tuba-card-map .tuba-map-inline { height: 500px; }

.tuba-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
}

.tuba-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
}

.tuba-stop-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tuba-stop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}

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

.tuba-stop-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--brand);
}

.tuba-stop-name { flex: 1; }
.tuba-stop-id { font-size: 0.72rem; color: var(--text-muted); }

/* ─── Map Page ─── */

/* ─── A Rede (embedded in home) ─── */

.tuba-rede-section { padding-bottom: 0; overflow: visible; }
.tuba-rede-section .tuba-section-content { padding-bottom: 20px; overflow: visible; }

.tuba-rede-embed {
  display: flex;
  height: 75vh;
  min-height: 500px;
  max-height: 800px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
  overflow: visible;
}

.tuba-map-container { overflow: hidden; }

.tuba-page-map {
  padding: 0;
  display: flex;
  height: calc(100vh - 88px);
  max-width: none;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* old sidebar styles moved to enhanced section below */

.tuba-map-container { flex: 1; position: relative; z-index: 1; }
.tuba-map { width: 100%; height: 100%; }

.tuba-map-click-overlay {
  position: absolute;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tuba-map-click-overlay:not(.hidden) {
  opacity: 1;
}

.tuba-map-click-overlay span {
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(4px);
}

.tuba-map-click-overlay.hidden {
  opacity: 0;
}

.tuba-map-loading {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.92);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  z-index: 500;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ─── Inline Map ─── */

.tuba-map-inline-wrap {
  position: sticky;
  top: calc(88px + 16px);
}

.tuba-map-inline {
  height: 480px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* ─── Forms ─── */

.tuba-form-group { margin-bottom: 14px; }

.tuba-form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.tuba-form-group select,
.tuba-form-group input[type="text"],
.tuba-form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.tuba-form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.tuba-form-group select:focus,
.tuba-form-group input:focus,
.tuba-form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(0,103,127,0.12);
}

.tuba-checkboxes { display: flex; gap: 14px; }

.tuba-checkboxes label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  cursor: pointer;
  text-transform: none;
}

/* ─── Buttons ─── */

.tuba-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  min-height: 40px;
  background: var(--brand);
  color: #fff;
}

.tuba-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,103,127,0.22);
  color: #fff;
}

.tuba-btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
  min-height: 32px;
  border-radius: 8px;
}

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

.tuba-btn-outline:hover {
  background: var(--surface-alt);
  border-color: #d5cbb5;
  color: var(--text);
  transform: none;
  box-shadow: none;
}

.tuba-btn-gold {
  background: var(--gold);
  color: #2b210f;
  border-color: var(--gold);
}

.tuba-btn-gold:hover {
  background: #c49b38;
  color: #2b210f;
}

/* ─── Contacto ─── */

.tuba-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.tuba-contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition);
}

.tuba-contact-card:hover {
  border-color: #d8c89a;
  box-shadow: var(--shadow-card);
}

.tuba-contact-icon {
  width: 48px;
  height: 48px;
  background: rgba(0,103,127,0.08);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 1.3rem;
  margin: 0 auto 14px;
}

.tuba-contact-card h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.tuba-contact-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.tuba-contact-card a {
  color: var(--brand);
  font-weight: 600;
}

/* ─── Highlight marker ─── */

.tuba-highlight-marker { background: none; border: none; }

.tuba-marker-pulse {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(220,38,38,0.6);
  animation: tuba-pulse 1.2s ease-in-out infinite;
}

@keyframes tuba-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

/* ─── Loading ─── */

.tuba-loading {
  color: var(--text-muted);
  padding: 48px 0;
  text-align: center;
  font-size: 0.9rem;
}

.tuba-text-muted { color: var(--text-muted); font-size: 0.85rem; }
.tuba-text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }

/* ─── Back link ─── */

.tuba-back {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
}

.tuba-back:hover { color: var(--brand); }

/* ─── Footer ─── */

.site-footer {
  background: #003a4a;
  color: rgba(255,255,255,0.75);
  padding: 40px 20px 28px;
  font-size: 0.82rem;
  overflow-x: hidden;
}

.site-footer .container {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}

.footer-logo-tuba {
  height: 48px;
  width: auto;
  margin-bottom: 10px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  margin: 8px 0 0;
  line-height: 1.7;
  font-size: 0.82rem;
}

.footer-links h5 {
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin: 0 0 12px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li { margin-bottom: 6px; }

.footer-links a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--gold); }

.footer-separator {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 0 0 16px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}

/* ─── Sidebar (A Rede) ─── */

.tuba-map-sidebar {
  width: 360px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 4;
  overflow: visible;
}

.tuba-sidebar-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.tuba-sidebar-toggle {
  display: none;
  position: absolute;
  top: 50%;
  right: -28px;
  transform: translateY(-50%);
  width: 28px;
  height: 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.75rem;
  z-index: 3;
}

/* Search */
.tuba-sidebar-search {
  padding: 14px 16px 0;
  flex-shrink: 0;
}

.tuba-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  transition: all var(--transition);
}

.tuba-search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,103,127,0.08);
}

.tuba-search-box i { color: var(--text-muted); font-size: 0.85rem; flex-shrink: 0; }

.tuba-search-box input {
  flex: 1;
  border: none;
  background: none;
  padding: 10px 0;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
}

.tuba-search-box input::placeholder { color: var(--text-muted); }

.tuba-search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 0.85rem;
  border-radius: 4px;
}

.tuba-search-clear:hover { color: var(--text); background: rgba(0,0,0,0.04); }

/* Search results */
.tuba-sidebar-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.tuba-sidebar-section { padding: 0 0 8px; }

.tuba-sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 16px 4px;
}

.tuba-sidebar-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Tabs */
.tuba-sidebar-tabs {
  display: flex;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-light);
  margin-top: 10px;
}

.tuba-sidebar-tab {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.tuba-sidebar-tab:hover { color: var(--text); background: var(--surface-alt); }

.tuba-sidebar-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.tuba-tab-count {
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--surface-alt);
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

.tuba-sidebar-tab.active .tuba-tab-count { background: rgba(0,103,127,0.1); color: var(--brand); }

/* Route list */
.tuba-sidebar-routes {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  min-height: 0;
}

.tuba-route-card-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.12s;
  border-left: 3px solid transparent;
  cursor: pointer;
}

.tuba-route-card-mini:hover {
  background: var(--surface-alt);
  border-left-color: var(--border);
}

.tuba-route-card-mini.active {
  background: rgba(0,103,127,0.04);
  border-left-color: var(--brand);
}

.tuba-route-card-mini.focused {
  background: rgba(0,103,127,0.10);
  border-left-color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(0,103,127,0.15);
}

.tuba-route-badge-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 28px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.badge-urbano { background: var(--brand); }
.badge-municipal { background: var(--gold); color: #2b210f; }

.tuba-route-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}

.tuba-route-card-text-wrap { flex: 1; min-width: 0; }

.tuba-route-card-text {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tuba-route-card-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.tuba-route-toggle-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: all 0.15s;
}

.tuba-route-toggle-btn:hover { background: var(--surface-alt); color: var(--brand); border-color: var(--brand); }
.tuba-route-card-mini.active .tuba-route-toggle-btn { color: var(--brand); border-color: var(--brand); }

/* Stop cards in search */
.tuba-stop-card-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
}

.tuba-stop-card-mini:hover { background: var(--surface-alt); }
.tuba-stop-icon { color: var(--brand); font-size: 0.82rem; width: 16px; text-align: center; }
.tuba-stop-card-text { font-size: 0.82rem; }

/* Bottom bar (layers + report) */
.tuba-sidebar-bottom {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.tuba-sidebar-layers {
  display: flex;
  gap: 4px;
  flex: 1;
}

.tuba-layer-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.tuba-layer-btn:hover { background: var(--surface-alt); color: var(--text); }
.tuba-layer-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tuba-layer-reset { background: none; border-color: transparent; color: var(--text-muted); }
.tuba-layer-reset:hover { color: #dc2626; background: #fef2f2; }

.tuba-btn-report {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.tuba-btn-report:hover { background: #fee2e2; border-color: #dc2626; }

.tuba-active-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
}

/* ─── Sidebar actions (Perto de mim + Localidade) ─── */

.tuba-sidebar-actions {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  overflow: visible;
  position: relative;
  z-index: 10;
}

.tuba-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.tuba-action-btn:hover { border-color: var(--brand); color: var(--brand); }
.tuba-action-btn:disabled { opacity: 0.6; cursor: wait; }
.tuba-action-btn i:first-child { color: var(--brand); }
.tuba-action-btn span { overflow: hidden; text-overflow: ellipsis; }

.tuba-action-dropdown { position: relative; flex: 1; min-width: 0; }

.tuba-locality-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-elevated);
  margin-top: 4px;
  overflow: hidden;
  min-width: 240px;
}

.tuba-locality-search {
  padding: 8px;
  border-bottom: 1px solid var(--border-light);
}

.tuba-locality-search input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
}

.tuba-locality-search input:focus { border-color: var(--brand); }

.tuba-locality-list {
  max-height: 280px;
  overflow-y: auto;
}

.tuba-locality-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.1s;
}

.tuba-locality-item:hover { background: var(--surface-alt); }
.tuba-locality-item small { color: var(--text-muted); font-size: 0.72rem; }
.tuba-locality-clear { color: #dc2626; font-weight: 600; font-size: 0.78rem; border-bottom: 1px solid var(--border-light); }

/* ─── Nearby ─── */

.tuba-nearby-info {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  border-bottom: 1px solid var(--border-light);
}

.tuba-nearby-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0,103,127,0.04);
  font-size: 0.82rem;
  color: var(--brand);
}

.tuba-nearby-header button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  margin-left: auto;
  padding: 4px;
  border-radius: 4px;
}

.tuba-nearby-header button:hover { background: rgba(0,0,0,0.06); color: var(--text); }

.tuba-nearby-list {
  max-height: 260px;
  overflow-y: auto;
}

.tuba-nearby-stop {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.1s;
}

.tuba-nearby-stop:hover { background: var(--surface-alt); }

.tuba-nearby-dist {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--brand);
  background: rgba(0,103,127,0.08);
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  min-width: 42px;
  text-align: center;
}

.tuba-nearby-body { flex: 1; min-width: 0; }
.tuba-nearby-name { font-size: 0.82rem; font-weight: 600; }

.tuba-nearby-routes {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}

.tuba-nearby-route-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}

.tag-urbano { background: var(--brand); color: #fff; }
.tag-municipal { background: var(--gold); color: #2b210f; }

/* ─── Route toggle indicator ─── */

.tuba-route-toggle-indicator {
  width: 4px;
  height: 28px;
  border-radius: 2px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.tuba-route-toggle-icon {
  color: var(--text-muted);
  font-size: 0.82rem;
  flex-shrink: 0;
  transition: color 0.15s;
}

.tuba-route-card-mini.active .tuba-route-toggle-icon { color: var(--brand); }

/* ─── User marker ─── */

.tuba-user-marker { background: none !important; border: none !important; }

.tuba-user-pin {
  width: 16px;
  height: 16px;
  background: #2563eb;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.3), 0 2px 8px rgba(0,0,0,0.3);
  animation: tuba-pulse 2s ease-in-out infinite;
}

@keyframes tuba-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(37,99,235,0.3), 0 2px 8px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(37,99,235,0.1), 0 2px 8px rgba(0,0,0,0.3); }
}

/* ─── Group toggle ─── */

.tuba-group-toggle {
  padding: 6px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.tuba-group-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.tuba-group-toggle-btn:hover { color: var(--brand); border-color: var(--brand); }

/* ─── Detail Panel (right sidebar / mobile dialog) ─── */

.tuba-detail-panel {
  width: 380px;
  flex-shrink: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 3;
  animation: slideInRight 0.2s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.tuba-detail-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  position: relative;
}

.tuba-detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: all 0.15s;
  z-index: 1;
}

.tuba-detail-close:hover { background: var(--border-light); color: var(--text); }

.tuba-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  padding-right: 36px;
}

.tuba-detail-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}

.tuba-detail-icon.stop { background: var(--brand); }
.tuba-detail-icon.route { font-size: 0.85rem; }

.tuba-detail-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.3;
}

.tuba-detail-section {
  margin-bottom: 20px;
}

.tuba-detail-section h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.tuba-detail-section h5 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin: 10px 0 4px;
}

.tuba-detail-route-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tuba-detail-route-tag {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.12s;
}

.tuba-detail-route-tag.tag-urbano { background: var(--brand); color: #fff; }
.tuba-detail-route-tag.tag-municipal { background: var(--gold); color: #2b210f; }
.tuba-detail-route-tag:hover { opacity: 0.85; transform: scale(1.05); }

.tuba-detail-loading {
  padding: 16px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.tuba-detail-dep-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.tuba-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.tuba-detail-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
  padding: 6px 8px;
  text-align: left;
  border-bottom: 2px solid var(--border-light);
}

.tuba-detail-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-light);
}

.tuba-dep-time { font-weight: 700; white-space: nowrap; }

.tuba-dep-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
}

.dep-urbano { background: var(--brand); color: #fff; }
.dep-municipal { background: var(--gold); color: #2b210f; }

.tuba-detail-stop-list {
  max-height: 240px;
  overflow-y: auto;
}

.tuba-detail-stop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 0.12s;
}

.tuba-detail-stop-item:hover { color: var(--brand); }

.tuba-detail-stop-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tuba-detail-trips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tuba-detail-trip-chip {
  display: inline-block;
  padding: 2px 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
}

.tuba-detail-dir-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin: 10px 0 6px;
}

.tuba-detail-dir-label i { color: var(--brand); margin-right: 4px; font-size: 0.65rem; }

.tuba-detail-service-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tuba-detail-svc-tab {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}

.tuba-detail-svc-tab:last-child { border-right: none; }

.tuba-detail-svc-tab.active {
  background: var(--brand);
  color: #fff;
}

.tuba-detail-svc-tab:hover:not(.active) { background: var(--surface-alt); }

.tuba-detail-direction-block { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border-light); }
.tuba-detail-direction-block:last-child { border-bottom: none; padding-bottom: 0; }

.tuba-detail-dir-stops {
  margin-top: 8px;
  padding-left: 2px;
  max-height: 180px;
  overflow-y: auto;
}

.tuba-detail-stop-item-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s;
}

.tuba-detail-stop-item-mini:hover { color: var(--brand); }

.tuba-dep-service {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.tuba-dep-section { display: flex; flex-direction: column; min-height: 0; }

.tuba-dep-scroll-wrap {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  scroll-behavior: smooth;
}

.tuba-dep-scroll-wrap .tuba-detail-table { margin: 0; }

.tuba-dep-scroll-wrap .tuba-detail-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}

.tuba-dep-next td {
  background: rgba(0, 103, 127, 0.1) !important;
  font-weight: 700 !important;
  position: relative;
}

.tuba-dep-next td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
  border-radius: 0 2px 2px 0;
}

.tuba-dep-past td {
  opacity: 0.35;
}

.tuba-dep-all-passed {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid rgba(212, 168, 67, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: #8b6914;
}

.tuba-dep-all-passed i { font-size: 0.85rem; }

.tuba-today-badge {
  display: inline-block;
  padding: 1px 6px;
  background: #16a34a;
  color: #fff;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
  margin-left: 4px;
}

.tuba-detail-svc-tab.is-today {
  position: relative;
}

.tuba-detail-svc-tab.is-today::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: #16a34a;
  border-radius: 50%;
}

.tuba-detail-svc-tab.is-today.active::after {
  background: #fff;
}

.tuba-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ─── Report Panel (overlay on map) ─── */

.tuba-report-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 380px;
  max-height: calc(100% - 24px);
  z-index: 1000;
  overflow-y: auto;
}

.tuba-report-panel-inner {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  border: 1px solid var(--border);
  padding: 20px;
}

.tuba-report-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tuba-report-panel-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.tuba-report-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  transition: all var(--transition);
}

.tuba-report-close:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.tuba-report-context {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 0.88rem;
}

.tuba-report-context-badge {
  width: 36px;
  height: 36px;
  background: rgba(0,103,127,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 1rem;
  flex-shrink: 0;
}

.tuba-report-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-top: 8px;
}

.tuba-report-success {
  text-align: center;
  padding: 20px 0;
}

.tuba-report-success-icon {
  font-size: 2.5rem;
  color: #16a34a;
  margin-bottom: 12px;
}

.tuba-report-success h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.tuba-report-success p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ─── Report markers ─── */

.tuba-report-marker { background: none !important; border: none !important; }

.tuba-report-click-marker { background: none !important; border: none !important; }

.tuba-report-click-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.15);
  border: 2px solid #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc2626;
  font-size: 14px;
  animation: tuba-pulse 1.5s ease-in-out infinite;
}

/* ─── Alerts ─── */

.tuba-alerts-list { display: flex; flex-direction: column; gap: 12px; }
.tuba-alert-card {
  display: flex; gap: 14px; padding: 16px 18px;
  background: var(--surface); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card); border-left: 4px solid var(--brand);
  transition: var(--transition);
}
.tuba-alert-card:hover { box-shadow: var(--shadow-elevated); }
.tuba-alert-info { border-left-color: var(--brand); }
.tuba-alert-warning { border-left-color: #eab308; }
.tuba-alert-critical { border-left-color: #dc2626; }
.tuba-alert-badge {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.tuba-alert-info .tuba-alert-badge { background: rgba(0,183,242,0.1); color: var(--brand); }
.tuba-alert-warning .tuba-alert-badge { background: rgba(234,179,8,0.1); color: #eab308; }
.tuba-alert-critical .tuba-alert-badge { background: rgba(220,38,38,0.1); color: #dc2626; }
.tuba-alert-body { flex: 1; min-width: 0; }
.tuba-alert-title { font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 4px; }
.tuba-alert-summary { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; }
.tuba-alert-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.75rem; color: var(--text-muted); }
.tuba-alert-tag {
  background: var(--surface-alt); padding: 2px 8px; border-radius: 6px;
  font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.02em;
}

/* ─── Mobility summary cards ─── */

.tuba-mobility-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; max-width: 900px; margin: 0 auto;
}
.tuba-mobility-card {
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 20px; text-align: center; box-shadow: var(--shadow-card);
  transition: var(--transition); border: 2px solid transparent;
}
.tuba-mobility-card:hover { box-shadow: var(--shadow-elevated); }
.tuba-card-active { border-color: var(--brand); }
.tuba-mobility-card-icon { font-size: 1.6rem; color: var(--brand); margin-bottom: 8px; }
.tuba-mobility-card-value { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.tuba-mobility-card-label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; margin-top: 2px; }
.tuba-mobility-card-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ─── Mobility tabs ─── */

.tuba-mobility-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px;
  border-bottom: 2px solid var(--border); padding-bottom: 8px;
}
.tuba-mob-tab {
  background: none; border: none; padding: 8px 16px; font-size: 0.85rem;
  font-weight: 500; color: var(--text-secondary); border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer; transition: var(--transition);
}
.tuba-mob-tab:hover { background: var(--surface-alt); color: var(--text); }
.tuba-mob-tab.active { background: var(--brand); color: #fff; }

/* ─── Resource cards ─── */

.tuba-resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tuba-resource-card {
  display: flex; gap: 14px; padding: 16px;
  background: var(--surface); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card); transition: var(--transition);
}
.tuba-resource-card:hover { box-shadow: var(--shadow-elevated); }
.tuba-resource-icon { font-size: 1.4rem; flex-shrink: 0; padding-top: 2px; }
.tuba-resource-body { flex: 1; min-width: 0; }
.tuba-resource-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.tuba-resource-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.tuba-resource-stats { font-size: 0.78rem; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }

/* ─── Mobilidade map ─── */

.tuba-mob-map-section {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--surface);
}

.tuba-mob-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.tuba-mob-map-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tuba-mob-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.tuba-mob-filter:hover {
  border-color: var(--brand);
  color: var(--text);
}

.tuba-mob-filter.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.tuba-mob-filter-count {
  background: rgba(0,0,0,0.08);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.tuba-mob-filter.active .tuba-mob-filter-count {
  background: rgba(255,255,255,0.25);
}

.tuba-mob-map-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.tuba-mob-map-wrap {
  position: relative;
}

.tuba-mobilidade-map {
  width: 100%; height: 450px;
}

.tuba-mob-resource-block {
  margin-bottom: 24px;
}

.tuba-mob-resource-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tuba-mob-resource-title i {
  font-size: 0.95rem;
}

.tuba-mob-resource-count {
  background: var(--surface-alt);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ─── POI markers ─── */

.tuba-poi-marker { background: transparent !important; border: none !important; }

/* ─── Rede teaser (home) ─── */

.tuba-rede-teaser {
  text-align: center;
  margin-top: 8px;
}

.tuba-rede-teaser-features {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tuba-rede-teaser-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
}

.tuba-rede-teaser-item i {
  color: var(--brand);
  font-size: 1rem;
}

/* ─── Rede page (full-viewport map) ─── */

.tuba-rede-page {
  display: flex;
  height: calc(100vh - 88px);
  overflow: hidden;
}

.tuba-rede-page-sidebar {
  width: 380px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

.tuba-rede-page-sidebar .tuba-sidebar-body {
  overflow-y: auto;
}

.tuba-rede-page-map {
  flex: 1;
  position: relative;
  z-index: 1;
}

.tuba-rede-page-map .tuba-map {
  width: 100%;
  height: 100%;
}

.tuba-rede-page .tuba-detail-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 380px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 20;
  animation: slideInRight 0.25s ease;
  overflow: hidden;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.tuba-drawer-handle {
  display: none;
}

.tuba-map-fab {
  display: none;
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 15;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.tuba-map-fab:hover { background: var(--brand); color: #fff; }

.tuba-sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

/* ─── Sidebar mode toggle ─── */

.tuba-sidebar-mode-toggle {
  display: flex;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.tuba-sidebar-mode-toggle button {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tuba-sidebar-mode-toggle button.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.tuba-sidebar-mode-toggle button:hover:not(.active) {
  color: var(--text);
}

/* ─── Planner panel ─── */

.tuba-planner-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.tuba-planner-form {
  padding: 16px;
  flex-shrink: 0;
}

.tuba-planner-field {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 4px;
}

.tuba-planner-field-icon {
  flex-shrink: 0;
  width: 20px;
  padding-top: 28px;
  text-align: center;
  font-size: 0.55rem;
}

.tuba-planner-field-input {
  flex: 1;
  position: relative;
}

.tuba-planner-field-input label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.tuba-planner-field-input input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  background: var(--surface);
  transition: border-color var(--transition);
}

.tuba-planner-field-input input:focus {
  outline: none;
  border-color: var(--brand);
}

.tuba-planner-swap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 0 0 4px 4px;
  flex-shrink: 0;
  transition: all var(--transition);
  align-self: center;
}

.tuba-planner-swap:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.tuba-planner-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow-card);
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
}

.tuba-planner-ac-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}

.tuba-planner-ac-item:hover { background: var(--surface-alt); }
.tuba-planner-ac-item i { font-size: 0.75rem; flex-shrink: 0; }

.tuba-planner-ac-group { }

.tuba-planner-ac-label {
  padding: 6px 12px 2px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.tuba-planner-ac-label i { font-size: 0.65rem; }

.tuba-planner-nearest {
  font-size: 0.75rem;
  color: var(--brand);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tuba-planner-nearest i { font-size: 0.65rem; }

.tuba-planner-input-row {
  display: flex;
  gap: 4px;
}

.tuba-planner-input-row input { flex: 1; min-width: 0; }

.tuba-planner-gps-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: all var(--transition);
}

.tuba-planner-gps-btn:hover { border-color: var(--brand); color: var(--brand); }
.tuba-planner-gps-btn:disabled { opacity: 0.5; cursor: default; }

.tuba-planner-resolving {
  position: absolute;
  right: 46px;
  top: 30px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tuba-planner-options {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.tuba-planner-option {
  flex: 1;
}

.tuba-planner-option label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.tuba-planner-option label i { margin-right: 2px; }

.tuba-planner-option input[type="date"],
.tuba-planner-option input[type="time"] {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: inherit;
}

.tuba-planner-now-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}

.tuba-planner-now-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ─── Planner results ─── */

.tuba-planner-results {
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid var(--border-light);
}

.tuba-planner-hint {
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gold);
  background: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tuba-planner-results-header {
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-alt);
}

.tuba-planner-itin {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}

.tuba-planner-itin:hover { background: var(--surface-alt); }
.tuba-planner-itin.is-active { background: var(--surface-alt); border-left: 3px solid var(--brand); }

.tuba-planner-itin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tuba-planner-itin-time {
  font-size: 1rem;
  font-weight: 700;
}

.tuba-planner-itin-time i { font-size: 0.65rem; margin: 0 4px; color: var(--text-muted); }

.tuba-planner-itin-dur {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tuba-planner-itin-meta {
  margin-bottom: 8px;
}

.tuba-planner-badge-direct {
  font-size: 0.75rem;
  font-weight: 700;
  color: #16a34a;
}

.tuba-planner-badge-transfer {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
}

.tuba-planner-legs { display: flex; flex-direction: column; gap: 0; }

.tuba-planner-leg {
  position: relative;
  padding-left: 20px;
}

.tuba-planner-leg-color {
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 2px;
}

.tuba-planner-leg-bus {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  font-size: 0.82rem;
}

.tuba-planner-leg-badge {
  flex-shrink: 0;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 1px;
}

.tuba-planner-leg-info { flex: 1; min-width: 0; }

.tuba-planner-leg-times {
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.tuba-planner-leg-detail {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tuba-planner-leg-stops {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.tuba-planner-leg-transfer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 6px 0;
  padding-left: 0;
}

.tuba-planner-marker { background: transparent !important; border: none !important; }

/* Inline results: always hidden on desktop (results go to right panel) */
.tuba-planner-inline-results { display: none; }

.tuba-planner-inline-results-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.tuba-planner-back-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}

.tuba-planner-back-btn:hover { border-color: var(--brand); color: var(--brand); }

.tuba-planner-inline-results-list {
  flex: 1;
  overflow-y: auto;
}

.tuba-planner-results-panel {
  position: fixed;
  top: 88px;
  right: 0;
  bottom: 0;
  width: 380px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 20;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.25s ease;
  box-shadow: -4px 0 16px rgba(0,0,0,0.06);
}

.tuba-planner-results-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.tuba-planner-results-panel-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tuba-planner-results-panel-scroll {
  flex: 1;
  overflow-y: auto;
}

/* ─── Horarios page ─── */

.tuba-horarios-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.tuba-horarios-stat {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.tuba-horarios-stat strong {
  color: var(--brand);
  font-weight: 800;
  font-size: 1.1rem;
}

.tuba-horarios-search {
  margin-bottom: 28px;
  max-width: 480px;
}

.footer-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-nav-link:hover { color: var(--brand); }

/* ─── News ─── */

.tuba-news-list { display: flex; flex-direction: column; gap: 16px; }

.tuba-news-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: box-shadow var(--transition);
}

.tuba-news-card:hover { box-shadow: var(--shadow-card); }

.tuba-news-date {
  flex-shrink: 0;
  width: 52px;
  text-align: center;
  padding: 8px 0;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
}

.tuba-news-day { font-size: 1.3rem; font-weight: 800; color: var(--brand); line-height: 1; }
.tuba-news-month { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }
.tuba-news-body { flex: 1; min-width: 0; }
.tuba-news-title { font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.tuba-news-excerpt { font-size: 0.88rem; color: var(--text-secondary); margin: 0 0 8px; }
.tuba-news-meta { font-size: 0.78rem; }

.tuba-poi-count {
  text-align: center;
  padding: 8px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── Skeleton loading ─── */

.tuba-skeleton {
  background: linear-gradient(90deg, var(--surface-alt) 25%, #e8f0f2 50%, var(--surface-alt) 75%);
  background-size: 200% 100%;
  animation: tubaShimmer 1.5s ease infinite;
  border-radius: var(--radius-sm);
}

.tuba-skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 6px;
}

.tuba-skeleton-text.short { width: 40%; }
.tuba-skeleton-text.medium { width: 65%; }

.tuba-skeleton-card {
  height: 72px;
  margin-bottom: 12px;
}

.tuba-skeleton-stat {
  height: 64px;
  border-radius: var(--radius-sm);
}

@keyframes tubaShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ─── Error block ─── */

.tuba-error-block {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.tuba-error-block i {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: #dc2626;
}

.tuba-error-block button {
  margin-top: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--brand);
  transition: all var(--transition);
}

.tuba-error-block button:hover {
  background: var(--surface-alt);
  border-color: var(--brand);
}

/* ─── Toast / inline feedback ─── */

.tuba-toast {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: tubaFadeIn 0.25s ease;
}

.tuba-toast-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.tuba-toast-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.tuba-toast-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

@keyframes tubaFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─── */

@media (max-width: 991px) {
  .tuba-about-grid { grid-template-columns: 1fr; }
  .tuba-linha-grid { grid-template-columns: 1fr; }
  .tuba-contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  body { padding-top: 56px; }
  .topbar-secondary { display: none; }
  .topbar-brand-sep, .topbar-crest { display: none; }
  .topbar-tuba-logo { height: 24px; margin-left: 0; }
  .topbar-brand { margin-right: 0; }

  .topbar-nav {
    display: flex;
    position: absolute;
    top: 56px;
    left: 0; right: 0;
    background: var(--brand);
    flex-direction: column;
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 1100;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
    pointer-events: none;
  }

  .topbar-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .topbar-link { padding: 12px 24px; font-size: 0.9rem; }
  .topbar-hamburger { display: flex; }

  .tuba-main { min-height: calc(100vh - 56px); }

  .tuba-hero-banner { min-height: 180px; }

  .tuba-hero { padding: 48px 16px 52px; }
  .tuba-hero h1 { font-size: 1.6rem; }
  .tuba-stats { flex-direction: row; border-radius: var(--radius-sm); margin-left: 12px; margin-right: 12px; max-width: calc(100% - 24px); }
  .tuba-stat { padding: 12px 6px; border-right: 1px solid var(--border-light); }
  .tuba-stat:last-child { border-right: none; }
  .tuba-stat-value { font-size: 1.2rem; }
  .tuba-stat-label { font-size: 0.75rem; }
  .tuba-section { padding: 36px 16px; max-width: 100vw; overflow-x: hidden; }
  .tuba-section-alt { padding: 36px 16px; max-width: 100vw; overflow-x: hidden; }
  .tuba-page { padding: 20px 16px; }

  .tuba-titulos-grid { grid-template-columns: 1fr; }

  .tuba-rede-section { padding-left: 0; padding-right: 0; overflow: visible; }
  .tuba-rede-section .tuba-section-content { padding: 0 16px 12px; overflow: visible; }
  .tuba-rede-embed { height: auto; min-height: 0; max-height: none; flex-direction: column; overflow: visible; }
  .tuba-rede-embed .tuba-map-sidebar { width: 100%; height: auto; max-height: 55vh; border-right: none; border-bottom: 1px solid var(--border); position: relative; z-index: 10; overflow: visible; }
  .tuba-rede-embed .tuba-map-container { flex: none; height: 50vh; min-height: 280px; }

  .tuba-page-map { height: calc(100vh - 56px); flex-direction: column; }
  .tuba-map-sidebar { width: 100%; height: auto; max-height: 40vh; border-right: none; border-bottom: 1px solid var(--border); }

  .tuba-rede-page {
    height: calc(100vh - 56px);
    flex-direction: column-reverse;
    position: relative;
  }

  .tuba-rede-page-map {
    flex: 1;
    min-height: 0;
  }

  .tuba-rede-page-sidebar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    max-height: 70vh;
    height: auto;
    border-right: none;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
    z-index: 30;
    transform: translateY(calc(100% - 64px));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
  }

  .tuba-rede-page-sidebar.is-open {
    transform: translateY(0);
    overflow-y: auto;
  }

  .tuba-drawer-handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 6px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .tuba-drawer-bar {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
  }

  .tuba-map-fab {
    display: flex;
  }

  .tuba-rede-page .tuba-detail-panel {
    position: fixed;
    top: auto; bottom: 0; left: 0; right: 0;
    width: 100%; height: auto; max-height: 70vh;
    border-left: none; border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
    animation: slideUpMobile 0.25s ease;
  }

  .tuba-planner-results-panel { display: none !important; }

  .tuba-planner-inline-results.has-results {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
  }

  .tuba-planner-form.mobile-hidden { display: none; }

  .tuba-report-panel { width: calc(100% - 24px); right: 12px; top: 12px; }

  .tuba-detail-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
    z-index: 1100;
    animation: slideUpMobile 0.25s ease;
  }

  @keyframes slideUpMobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .tuba-dep-scroll-wrap { max-height: 200px; }

  .tuba-routes-grid { grid-template-columns: 1fr; }
  .tuba-features { grid-template-columns: 1fr; }
  .tuba-map-inline { height: 350px; }
  .tuba-contact-grid { grid-template-columns: 1fr; }
  .tuba-mobility-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .tuba-resource-grid { grid-template-columns: 1fr; }
  .tuba-mobilidade-map { height: 300px; }
  .tuba-mob-map-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .tuba-mob-map-filters { justify-content: center; }
  .tuba-mob-filter-label { display: none; }
  .tuba-mob-map-info { text-align: center; }
  .tuba-mobility-tabs { gap: 4px; }
  .tuba-mob-tab { font-size: 0.78rem; padding: 6px 10px; }

  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 4px; text-align: center; }
}
