:root {
  --tv-bg: #03130e;
  --tv-bg-2: #082016;
  --tv-card: rgba(13, 38, 28, .78);
  --tv-card-2: rgba(22, 51, 40, .68);
  --tv-border: rgba(205, 231, 219, .16);
  --tv-text: #f7fbf8;
  --tv-muted: #b8c4be;
  --tv-orange: #ff8200;
  --tv-green: #6da374;
  --tv-blue: #2c76d2;
  --tv-pink: #df3656;
}

* { letter-spacing: 0; }

body {
  min-height: 100vh;
  background: radial-gradient(circle at top right, rgba(255, 130, 0, .12), transparent 30rem), linear-gradient(135deg, #02100c, var(--tv-bg));
  color: var(--tv-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
.muted { color: var(--tv-muted); }
.text-accent { color: var(--tv-orange) !important; }

.site-shell { display: flex; min-height: 100vh; }
.site-sidebar {
  position: sticky;
  top: 0;
  width: 292px;
  height: 100vh;
  flex-direction: column;
  padding: 34px 20px;
  background: linear-gradient(180deg, rgba(0, 35, 25, .98), rgba(1, 18, 14, .98));
  border-right: 1px solid var(--tv-border);
}

.site-main { width: 100%; min-width: 0; }
.site-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 78px;
  padding: 12px clamp(18px, 4vw, 64px);
  background: rgba(3, 19, 14, .9);
  border-bottom: 1px solid var(--tv-border);
  backdrop-filter: blur(18px);
}
.site-topbar .brand-lockup {
  flex: 0 0 auto;
}
.site-topbar .brand-lockup small {
  display: block;
  font-size: .64rem;
  letter-spacing: .14em;
  margin-top: 4px;
}
.topbar-nav {
  flex: 1 1 auto;
  justify-content: center;
  gap: 4px;
}
.topbar-nav .nav-link {
  padding: 10px 12px;
  font-size: .92rem;
}
.topbar-nav .nav-link i {
  font-size: 1rem;
}
.install-topbar {
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.social-login-trigger,
.google-login {
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
}
.social-login-trigger:hover,
.google-login:hover {
  color: var(--tv-orange);
  border-color: rgba(255, 130, 0, .55);
}
.login-modal .modal-content {
  color: var(--tv-text);
  background: linear-gradient(145deg, rgba(10, 34, 25, .98), rgba(3, 19, 14, .98));
  border: 1px solid var(--tv-border);
  border-radius: 8px;
}
.login-modal .modal-header {
  border-bottom-color: var(--tv-border);
}
.login-modal .modal-title {
  font-size: 1.2rem;
  font-weight: 900;
}
.social-login-options {
  display: grid;
  gap: 10px;
}
.social-login-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  color: #fff;
  font-weight: 850;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
}
.social-login-option:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .34);
  transform: translateY(-1px);
}
.social-login-option i {
  width: 22px;
  font-size: 1.1rem;
  text-align: center;
}
.social-login-option.google i { color: #fff; }
.social-login-option.x i { color: #fff; }
.social-login-option.facebook i { color: #1877f2; }
.auth-empty {
  margin: 0;
  color: var(--tv-muted);
}
.site-user {
  align-items: center;
  gap: 10px;
  max-width: 230px;
  padding: 6px 10px 6px 6px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
}
.site-user img,
.mobile-user img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.site-user span {
  overflow: hidden;
  font-size: .88rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-alert {
  margin: 16px clamp(18px, 4vw, 64px) 0;
  padding: 12px 14px;
  color: #fff;
  background: rgba(223, 54, 86, .2);
  border: 1px solid rgba(223, 54, 86, .45);
  border-radius: 8px;
}
.site-alert.success {
  color: #14532d;
  background: #dcfce7;
  border-color: #86efac;
}
.mobile-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
}
.mobile-user span {
  display: grid;
  min-width: 0;
  font-weight: 800;
}
.mobile-user small {
  overflow: hidden;
  color: var(--tv-muted);
  font-size: .78rem;
  text-overflow: ellipsis;
}
.brand-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 42px; }
.brand-lockup strong { display: block; color: #fff; font-size: 1.7rem; line-height: 1; }
.brand-lockup strong span { color: var(--tv-orange); }
.brand-lockup small { display: block; color: var(--tv-muted); font-size: .76rem; font-weight: 700; letter-spacing: .16em; margin-top: 8px; text-transform: uppercase; }
.brand-lockup.compact { margin: 0; }
.brand-lockup.compact strong { font-size: 1.25rem; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--tv-text);
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
}
.nav-link i { color: #dce5df; font-size: 1.25rem; }
.nav-link:hover, .nav-link.active {
  color: var(--tv-orange);
  background: rgba(255, 130, 0, .1);
  border-color: rgba(255, 130, 0, .65);
}
.nav-link:hover i, .nav-link.active i { color: var(--tv-orange); }

.install-card {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  background: var(--tv-card-2);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
  padding: 14px;
}
.install-card small { display: block; color: var(--tv-muted); }

.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(3, 19, 14, .88);
  border-bottom: 1px solid var(--tv-border);
  backdrop-filter: blur(16px);
}

.hero-section {
  min-height: 500px;
  padding: 42px clamp(18px, 4vw, 64px) 34px;
  background:
    linear-gradient(90deg, rgba(3, 19, 14, .98) 0%, rgba(3, 19, 14, .76) 42%, rgba(3, 19, 14, .18) 100%),
    url("https://images.unsplash.com/photo-1522163182402-834f871fd851?auto=format&fit=crop&w=2200&q=85") center / cover;
}
.breadcrumb-line { color: #dce5df; display: flex; gap: 10px; align-items: center; margin-bottom: 52px; }
.hero-section h1, .page-header h1 {
  max-width: 760px;
  font-size: clamp(2.35rem, 5vw, 4.5rem);
  line-height: .98;
  font-weight: 900;
}
.hero-section p, .page-header p { max-width: 620px; color: #dbe3df; font-size: 1.08rem; }

.search-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 700px;
  padding: 10px 12px 10px 20px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
  backdrop-filter: blur(16px);
}
.search-panel.compact { max-width: none; flex: 1 1 360px; }
.search-panel input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: 1rem;
}
.search-panel input::placeholder { color: #b5c0bb; }
.search-panel i { color: #dce5df; font-size: 1.2rem; }
.home-search-autocomplete { position: relative; max-width: 700px; z-index: 20; }
.home-search-autocomplete .search-panel { max-width: none; }
.home-search-suggestions { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; right: 0; }
.home-search-suggestions-panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--tv-border);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(20, 42, 82, .18);
}
.home-search-suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--tv-text);
  text-decoration: none;
  border-bottom: 1px solid #edf1f7;
}
.home-search-suggestion:hover, .home-search-suggestion:focus { background: #f4f8ff; color: var(--tv-text); }
.home-search-suggestion-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; color: #1f64e5; background: #eaf1ff; border-radius: 9px; }
.home-search-suggestion-icon i { color: inherit; font-size: 1rem; }
.home-search-suggestion-copy { display: grid; min-width: 0; gap: 2px; }
.home-search-suggestion-copy strong, .home-search-suggestion-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-search-suggestion-copy small { color: #71809a; }
.home-search-suggestion-type { margin-left: auto; color: #71809a; font-size: .78rem; font-weight: 700; }
.home-search-all-results { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; color: #1f64e5; font-size: .9rem; font-weight: 800; text-decoration: none; }
.home-search-all-results:hover { color: #1856ca; background: #f4f8ff; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
}
.icon-btn i { color: #fff !important; }

.filter-pills { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.filter-pills a {
  padding: 9px 22px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--tv-border);
  border-radius: 999px;
  font-weight: 700;
}
.filter-pills a.active { background: var(--tv-orange); border-color: var(--tv-orange); color: #1f1205; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stats-grid span, .glass-card {
  background: var(--tv-card);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .16);
  backdrop-filter: blur(18px);
}
.stats-grid span { padding: 20px; color: var(--tv-muted); }
.stats-grid strong { display: block; color: #fff; font-size: 2rem; line-height: 1; }

.content-section, .quick-grid, .quick-actions, .page-content, .page-home > .row {
  padding-left: clamp(18px, 4vw, 64px);
  padding-right: clamp(18px, 4vw, 64px);
}
.content-section { padding-top: 18px; }
h2 { font-size: 1.18rem; font-weight: 900; margin-bottom: 14px; }

.home-map-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  padding: 18px;
}
.home-map-canvas {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  background: #16241f;
  border: 1px solid var(--tv-border);
  border-radius: 8px;
}
.map-loading {
  display: grid;
  min-height: 380px;
  place-items: center;
  color: rgba(238, 244, 239, .74);
}
.home-map-canvas .leaflet-container,
.home-map-canvas.leaflet-container {
  height: 100%;
  min-height: 380px;
  font: inherit;
}
.home-map-canvas .leaflet-control-attribution {
  font-size: .66rem;
}
.home-map-canvas .marker-cluster-small,
.home-map-canvas .marker-cluster-medium,
.home-map-canvas .marker-cluster-large {
  background-color: rgba(255, 130, 0, .24);
}
.home-map-canvas .marker-cluster-small div,
.home-map-canvas .marker-cluster-medium div,
.home-map-canvas .marker-cluster-large div {
  color: #1f1205;
  background-color: var(--tv-orange);
  font-weight: 900;
}
.leaflet-pico-popup {
  display: grid;
  gap: 10px;
  min-width: 250px;
  color: #14251d;
  font-family: inherit;
}
.home-map-canvas .leaflet-popup-content {
  margin: 18px 20px;
}
.home-map-canvas .leaflet-popup-content-wrapper {
  border-radius: 8px;
}
.leaflet-pico-popup strong {
  color: #15251f;
  font-size: 1.08rem;
  line-height: 1.15;
}
.leaflet-pico-popup small {
  color: #43514a;
  font-size: .9rem;
}
.leaflet-pico-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.leaflet-pico-facts span {
  padding: 5px 9px;
  color: #10231b;
  background: #e7eee8;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 800;
}
.leaflet-pico-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.leaflet-pico-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
/* Google Maps button */
.leaflet-pico-actions a[href*="google.com"] {
  color: #1f64e5;
  background: #eef5ff;
  border: 1px solid #dbe8ff;
}
.leaflet-pico-actions a[href*="google.com"]:hover {
  background: #dbe8ff;
  transform: translateY(-1px);
}
/* Waze button */
.leaflet-pico-actions a[href*="waze.com"] {
  color: #0582ca;
  background: #eef9ff;
  border: 1px solid #bce6ff;
}
.leaflet-pico-actions a[href*="waze.com"]:hover {
  background: #bce6ff;
  transform: translateY(-1px);
}
/* Abrir pico button */
.leaflet-pico-actions a:not([target="_blank"]) {
  color: #fff;
  background: #1f64e5;
  border: 1px solid #1f64e5;
  box-shadow: 0 4px 10px rgba(31, 100, 229, .15);
}
.leaflet-pico-actions a:not([target="_blank"]):hover {
  background: #1856ca;
  border-color: #1856ca;
  transform: translateY(-1px);
}
.home-map-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.home-map-list > strong {
  margin-bottom: 10px;
  color: #fff;
}
.home-map-list > div {
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
}
.home-map-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: #11231b;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(19, 37, 31, .14);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
}
.home-map-list a.active,
.home-map-list a:hover,
.home-map-list a:focus {
  color: #11231b;
  background: #fff3e8;
  border-color: rgba(255, 130, 0, .75);
}
.home-map-list span,
.home-map-list small {
  min-width: 0;
}
.home-map-list strong,
.home-map-list small {
  display: block;
}
.home-map-list a strong {
  color: #11231b;
}
.home-map-list small {
  color: #4f6688;
  font-weight: 700;
}
.home-map-list a > small {
  flex: 0 0 auto;
  color: #405879;
  font-size: .95rem;
  text-align: right;
}

.picos-grid, .picos-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.picos-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pico-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
}
.pico-card img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  opacity: .9;
}
.pico-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .82));
}
.pico-card-body {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
}
.pico-card h3 { margin: 0 0 4px; font-size: 1.18rem; font-weight: 900; }
.pico-card p { color: #dbe3df; margin-bottom: 8px; }
.pico-card span { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; color: #fff; font-size: .92rem; }
.pico-card .bi-geo-alt-fill, .route-content h3 i { color: var(--tv-orange); }

.favorite-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, .22);
  border-radius: 8px;
}
.favorite-btn.static { position: static; flex: 0 0 auto; }
.favorite-btn.active { color: var(--tv-orange); }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}
.quick-action {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 14px;
  min-height: 116px;
  padding: 18px;
}
.quick-action > span:first-child {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #fff;
  border-radius: 50%;
}
.quick-action strong,
.quick-action small {
  display: block;
  overflow-wrap: anywhere;
}
.quick-action strong {
  font-size: 1.04rem;
  line-height: 1.16;
  font-weight: 900;
}
.quick-action small {
  margin-top: 4px;
  color: var(--tv-muted);
  line-height: 1.25;
}
.quick-action > i {
  color: #fff;
  font-size: 1.25rem;
}
.quick-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr 24px;
  gap: 14px;
  align-items: center;
  padding: 18px;
}
.quick-card span, .activity-list span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #fff;
}
.quick-card strong { display: block; font-size: 1rem; }
.quick-card small { color: var(--tv-muted); }
.green { background: var(--tv-green); }
.orange { background: var(--tv-orange); }
.blue { background: var(--tv-blue); }
.pink { background: var(--tv-pink); }

.section-card { padding: 18px; }
.featured-route {
  display: grid;
  grid-template-columns: minmax(240px, 370px) 1fr;
  gap: 26px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.featured-route > img { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; }
.route-content h3 { font-weight: 900; margin-bottom: 8px; }
.route-content p { color: var(--tv-muted); }
.route-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 0;
  margin: 10px 0;
  border-top: 1px solid var(--tv-border);
  border-bottom: 1px solid var(--tv-border);
}
.route-facts small { display: block; color: var(--tv-muted); font-size: .72rem; text-transform: uppercase; }
.btn-accent {
  --bs-btn-bg: var(--tv-orange);
  --bs-btn-border-color: var(--tv-orange);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: #ff9a24;
  --bs-btn-hover-border-color: #ff9a24;
  font-weight: 800;
}

.activity-list p { display: flex; align-items: center; gap: 14px; color: var(--tv-muted); }
.activity-list span { width: 44px; height: 44px; flex: 0 0 auto; }

.page-content { padding-top: 42px; padding-bottom: 56px; }
.page-header { margin-bottom: 22px; }
.eyebrow { color: var(--tv-orange); font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  margin-bottom: 22px;
}
.filters-bar .form-select {
  max-width: 260px;
  color: #fff;
  background-color: rgba(255, 255, 255, .1);
  border-color: var(--tv-border);
}

.routes-list { display: grid; gap: 14px; }
.route-card { padding: 16px; }
.route-card .route-facts { grid-template-columns: repeat(4, minmax(120px, 1fr)); overflow-x: auto; }

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 46%) 1fr;
  gap: 28px;
  padding: 18px;
  margin-bottom: 18px;
}
.detail-hero > img {
  width: 100%;
  min-height: 360px;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.detail-hero h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); font-weight: 900; }
.back-link { display: inline-flex; gap: 8px; color: var(--tv-muted); margin-bottom: 20px; }
.detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--tv-muted);
  font-size: .98rem;
  font-weight: 700;
}
.detail-breadcrumb a { color: #48658f; text-decoration: none; }
.detail-breadcrumb a:hover { color: #1f64e5; text-decoration: underline; }
.detail-breadcrumb i { color: #91a4c2; font-size: .78rem; }
.detail-breadcrumb [aria-current="page"] { color: var(--tv-text); }
.detail-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.detail-pills span {
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--tv-border);
  border-radius: 999px;
}
.route-number {
  display: inline-grid;
  place-items: center;
  min-width: 72px;
  height: 72px;
  margin-bottom: 14px;
  color: var(--tv-orange);
  border: 1px solid var(--tv-orange);
  border-radius: 8px;
  font-size: 2rem;
  font-weight: 900;
}
.detail-tabs {
  gap: 8px;
  margin-bottom: 18px;
}
.detail-tabs .nav-link { background: rgba(255,255,255,.06); border-color: var(--tv-border); }
.detail-tabs .nav-link.active { background: var(--tv-orange); color: #fff; }

.setores-grid, .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.setor-card, .info-card, .table-card, .media-card, .empty-card { padding: 18px; }
.info-card i { color: var(--tv-orange); font-size: 1.5rem; }
.info-card h3, .setor-card h3 { font-size: 1.05rem; font-weight: 900; margin-top: 8px; }
.info-card p, .setor-card p { color: var(--tv-muted); }
.info-card.wide { grid-column: 1 / -1; }
.media-card img { width: 100%; max-height: 720px; object-fit: contain; border-radius: 8px; }
.table-dark { --bs-table-bg: transparent; --bs-table-border-color: var(--tv-border); }
.favorites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

.offline-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;
  padding: 12px 16px;
  color: #fff;
  background: #24170b;
  border: 1px solid rgba(255, 130, 0, .4);
  border-radius: 8px;
}

@media (max-width: 1199.98px) {
  .picos-grid, .quick-grid, .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-route, .detail-hero { grid-template-columns: 1fr; }
  .home-map-shell { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
  .hero-section { min-height: auto; padding-top: 34px; }
  .breadcrumb-line { margin-bottom: 28px; }
  .picos-grid, .quick-grid, .quick-actions, .stats-grid { grid-template-columns: 1fr; }
  .quick-card { grid-template-columns: 54px 1fr 20px; }
  .quick-action { min-height: 96px; }
  .route-facts, .route-card .route-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-hero > img { min-height: 250px; }
  .filters-bar .form-select { max-width: none; flex: 1 1 100%; }
  .home-map-shell { padding: 12px; }
  .home-map-canvas { min-height: 320px; }
  .home-map-list > div { max-height: 260px; }
}

.btn-outline-accent {
  --bs-btn-color: var(--tv-orange);
  --bs-btn-border-color: rgba(255, 130, 0, .7);
  --bs-btn-hover-bg: var(--tv-orange);
  --bs-btn-hover-border-color: var(--tv-orange);
  --bs-btn-hover-color: #fff;
  font-weight: 800;
}

.detail-page { padding-top: 34px; }
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 34px;
  align-items: start;
}
.detail-layout.no-summary {
  display: block;
}
.detail-layout.no-summary .detail-main {
  width: 100%;
}
.detail-main { min-width: 0; }
.area-hero {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(360px, 1fr);
  gap: 34px;
  align-items: center;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--tv-border);
}
.area-hero.no-media {
  grid-template-columns: minmax(0, 900px);
}
.area-hero img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 8px;
}
.via-hero img {
  object-fit: contain;
  object-position: right center;
  background: transparent;
  width: auto;
  max-width: 100%;
  justify-self: end;
}
.area-copy h1 {
  font-size: clamp(3.2rem, 7vw, 5.6rem);
  line-height: .9;
  font-weight: 950;
  margin-bottom: 18px;
}
.via-detail-page .area-copy h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1;
}
.via-detail-page .area-copy > .filters-bar {
  padding: 0;
  margin: 18px 0 22px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.detail-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
}
.lead-copy, .section-text {
  max-width: 760px;
  color: #e6eee9;
  font-size: 1.08rem;
  line-height: 1.55;
}
.guide-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.detail-section { margin-top: 26px; }
.via-grade-opinion-card {
  display: grid;
  gap: 20px;
  padding: 22px;
}
.via-grade-opinion-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.via-grade-opinion-result > i {
  color: #1f64e5;
  font-size: 1.2rem;
  margin-top: 3px;
}
.via-grade-opinion-result small,
.via-grade-opinion-result span {
  display: block;
}
.via-grade-opinion-result small {
  color: #526789;
  font-weight: 700;
}
.via-grade-opinion-result strong {
  display: block;
  margin-top: 3px;
  color: #142a52;
  font-size: 1.2rem;
}
.via-grade-opinion-result span,
.via-grade-system-hint {
  color: #526789;
  font-size: .88rem;
}
.via-grade-opinion-form {
  display: grid;
  gap: 9px;
}
.via-grade-opinion-form label {
  color: #142a52;
  font-weight: 700;
}
.ascent-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ascent-summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  min-width: 0;
}
.ascent-summary-item i {
  font-size: 18px;
  color: #1f64e5;
}
.ascent-summary-item strong {
  font-size: 18px;
}
.ascent-summary-item span {
  font-size: 13px;
  color: var(--text-muted, #8c9bb5);
}
.ai-summary-card {
  padding: 16px;
}
.ai-summary-card .section-text {
  margin-bottom: 8px;
}
.ai-summary-card small {
  display: block;
  font-size: 12px;
}
.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.compact-info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}
.compact-info-grid .info-card {
  min-height: 150px;
  background: linear-gradient(135deg, rgba(15, 67, 43, .75), rgba(9, 35, 27, .72));
}
.setores-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.setor-mini-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
}
.setor-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  color: #fff;
  background: rgba(109, 163, 116, .72);
  border-radius: 50%;
}
.setor-mini-card h3 { margin: 0; font-size: 1rem; font-weight: 900; }
.setor-mini-card p { margin: 3px 0 8px; color: #fff; }
.setor-mini-card small {
  display: inline-flex;
  padding: 4px 10px;
  color: #dce5df;
  border: 1px solid var(--tv-border);
  border-radius: 999px;
}
.detail-summary {
  position: sticky;
  top: 28px;
  padding: 22px;
}
.summary-list {
  display: grid;
  gap: 10px;
}
.summary-list > div,
.summary-favorite {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  color: #fff;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
  text-align: left;
}
.summary-list i { color: var(--tv-orange); font-size: 1.15rem; }
.summary-list strong { font-weight: 900; }
.summary-list span {
  color: #fff;
  text-align: right;
}
.summary-favorite { border-top-color: rgba(255, 130, 0, .34); }
.route-filters {
  align-items: stretch;
  margin-top: 14px;
}
.route-filters .form-select { min-width: 180px; }
.route-inline-number {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 34px;
  margin-right: 10px;
  color: var(--tv-orange);
  border: 1px solid rgba(255, 130, 0, .7);
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1;
}
.route-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.media-panel {
  padding: 20px;
  overflow: hidden;
}
.media-panel img {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  border: 1px solid var(--tv-border);
  border-radius: 8px;
}
.map-frame {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--tv-border);
  border-radius: 8px;
}
.weather-panel {
  min-height: 140px;
}
.climbercodex-weather {
  min-height: 150px;
  padding: 16px;
  color: #eef4ef;
  background: linear-gradient(135deg, #13251f, #20382f);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
}
.weather-loading,
.weather-error {
  display: grid;
  min-height: 118px;
  place-items: center;
  color: rgba(238, 244, 239, .78);
}
.weather-current {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.weather-current > i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--tv-orange);
  background: rgba(255, 255, 255, .08);
  border-radius: 8px;
  font-size: 1.6rem;
}
.weather-current strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}
.weather-current span,
.weather-current small {
  display: block;
  color: rgba(238, 244, 239, .78);
}
.weather-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.weather-days > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 6px;
  text-align: center;
  background: rgba(255, 255, 255, .07);
  border-radius: 8px;
}
.weather-days span,
.weather-days small {
  color: rgba(238, 244, 239, .72);
}
.weather-days i {
  color: var(--tv-orange);
}
.weather-source {
  display: block;
  margin-top: 12px;
  color: rgba(238, 244, 239, .58);
}
.static-map {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 32% 38%, rgba(255,130,0,.25), transparent 4rem),
    repeating-linear-gradient(145deg, rgba(255,255,255,.09) 0 1px, transparent 1px 42px),
    linear-gradient(135deg, rgba(130, 158, 91, .9), rgba(58, 86, 55, .9));
  border-radius: 8px;
}
.static-map::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: repeating-radial-gradient(ellipse at center, transparent 0 28px, rgba(89, 117, 42, .45) 29px 31px);
  opacity: .42;
}
.static-map > * { position: relative; z-index: 1; }
.map-pin {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: #fff;
  background: var(--tv-orange);
  border: 12px solid rgba(255,255,255,.55);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(255, 130, 0, .16);
}
.static-map small { color: #eef4ef; }

@media (min-width: 992px) {
  .compact-routes-list,
  .page-content > .routes-list { gap: 10px; }
  .route-card { padding: 12px 14px; }
  .route-card .route-content {
    display: grid;
    grid-template-columns: minmax(240px, 1.15fr) minmax(420px, 1.6fr) auto;
    gap: 14px;
    align-items: center;
  }
  .route-card .route-content > .d-flex { align-items: center !important; }
  .route-card .route-content h3 { margin: 0 0 3px; font-size: 1.03rem; }
  .route-card .route-content p { margin: 0; font-size: .88rem; }
  .route-card .favorite-btn.static { width: 34px; height: 34px; }
  .route-card .route-facts {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
    gap: 8px;
    padding: 0;
    margin: 0;
    border: 0;
    overflow: visible;
  }
  .route-card .route-facts span {
    min-width: 0;
    padding-left: 10px;
    border-left: 1px solid var(--tv-border);
    font-size: .9rem;
  }
  .route-card .btn-accent {
    padding: 8px 12px;
    white-space: nowrap;
  }
}

@media (max-width: 1199.98px) {
  .detail-layout,
  .area-hero,
  .route-media-grid { grid-template-columns: 1fr; }
  .detail-summary { position: static; }
  .compact-info-grid,
  .setores-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .via-hero img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    justify-self: center;
    object-position: center;
  }
}

@media (max-width: 767.98px) {
  .area-copy h1 { font-size: clamp(3rem, 18vw, 4.4rem); }
  .area-hero img { height: 260px; }
  .compact-info-grid,
  .setores-strip { grid-template-columns: 1fr; }
  .section-heading-row { align-items: flex-start; flex-direction: column; }
}

/* Clean light theme */
:root {
  --tv-bg: #f7faff;
  --tv-bg-2: #eef5ff;
  --tv-card: #ffffff;
  --tv-card-2: #f8fbff;
  --tv-border: #dce6f5;
  --tv-text: #142a52;
  --tv-muted: #5f6f8c;
  --tv-orange: #1f64e5;
  --tv-green: #eaf2ff;
  --tv-blue: #1f64e5;
  --tv-pink: #eaf2ff;
}

body {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 55%, #ffffff 100%);
  color: var(--tv-text);
}

.glass-card,
.stats-grid span {
  background: #fff;
  border: 1px solid var(--tv-border);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(20, 42, 82, .07);
  backdrop-filter: none;
}

.site-topbar {
  min-height: 82px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--tv-border);
  box-shadow: 0 6px 24px rgba(20, 42, 82, .06);
}

.brand-lockup strong { color: var(--tv-text); }
.brand-lockup strong span { color: var(--tv-orange); font-weight: 200 }
.brand-lockup small { color: #7d8ba4; }

.nav-link {
  color: var(--tv-text);
  border-radius: 0;
}
.nav-link i { color: var(--tv-text); }
.topbar-nav .nav-link {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
}
.nav-link:hover,
.nav-link.active {
  color: var(--tv-orange);
  background: transparent;
  border-color: var(--tv-orange);
}
.nav-link:hover i,
.nav-link.active i { color: var(--tv-orange); }

.btn-accent {
  --bs-btn-bg: #1f64e5;
  --bs-btn-border-color: #1f64e5;
  --bs-btn-color: #ffffff;
  --bs-btn-hover-bg: #1856ca;
  --bs-btn-hover-border-color: #1856ca;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-active-color: #ffffff;
  box-shadow: 0 10px 24px rgba(31, 100, 229, .18);
}
.site-topbar .social-login-trigger {
  color: #fff;
  background: #1f64e5;
  border-color: #1f64e5;
  box-shadow: 0 10px 24px rgba(31, 100, 229, .18);
}
.site-topbar .social-login-trigger:hover {
  color: #fff;
  background: #1856ca;
  border-color: #1856ca;
}
#notifications-dropdown-container {
  overflow: hidden;
  background: #fff !important;
}
#notifications-dropdown-container > .text-muted {
  background: #fff;
}
.site-topbar .install-topbar,
.site-topbar .social-login-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  font-size: 1rem;
}
.login-modal .modal-content {
  color: var(--tv-text);
  background: #fff;
  border: 1px solid #cfe0ff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(20, 42, 82, .22);
}
.login-modal .modal-header {
  padding: 22px 26px;
  border-bottom-color: #e1eaf8;
}
.login-modal .modal-title {
  color: var(--tv-text);
  font-size: 1.35rem;
}
.login-modal .btn-close {
  opacity: .7;
}
.login-modal .modal-body {
  padding: 26px;
}
.social-login-option {
  min-height: 56px;
  padding: 0 18px;
  color: var(--tv-text);
  background: #f7faff;
  border-color: #cfe0ff;
  border-radius: 10px;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.social-login-option:hover {
  color: var(--tv-text);
  background: #eaf2ff;
  border-color: #8fb5f5;
}
.social-login-option.google i {
  color: #4285f4;
}
.social-login-option.x i {
  color: #111827;
}
.btn-outline-accent {
  --bs-btn-color: #1f64e5;
  --bs-btn-border-color: #1f64e5;
  --bs-btn-hover-bg: #1f64e5;
  --bs-btn-hover-border-color: #1f64e5;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-active-color: #ffffff;
}

.hero-section {
  min-height: 330px;
  margin: 18px clamp(18px, 4vw, 64px);
  padding: 46px clamp(28px, 5vw, 86px);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(240, 247, 255, .98) 0%, rgba(240, 247, 255, .82) 42%, rgba(240, 247, 255, .08) 100%),
    url("https://images.unsplash.com/photo-1522163182402-834f871fd851?auto=format&fit=crop&w=2200&q=85") center / cover;
  box-shadow: 0 20px 60px rgba(20, 42, 82, .12);
}
.breadcrumb-line { display: none; }
.hero-section h1,
.page-header h1 {
  color: var(--tv-text);
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1.04;
}
.hero-section p,
.page-header p {
  color: var(--tv-text);
  font-weight: 600;
}
.search-panel {
  background: #fff;
  border-color: var(--tv-border);
  box-shadow: 0 14px 34px rgba(20, 42, 82, .08);
}
.search-panel input { color: var(--tv-text); }
.search-panel input::placeholder { color: #7d8ba4; }
.search-panel i { color: #71809a; }
.icon-btn {
  color: #fff !important;
  background: #1f64e5;
  border-color: #1f64e5;
}
.icon-btn:hover {
  background: #1856ca !important;
  border-color: #1856ca !important;
  color: #fff !important;
}
.icon-btn:hover i {
  color: #fff !important;
}
.filter-pills a {
  color: #1f64e5;
  background: #eef5ff;
  border-color: #dbe8ff;
}
.filter-pills a.active {
  color: #fff;
  background: #1f64e5;
  border-color: #1f64e5;
}

.stats-grid {
  grid-template-columns: repeat(4, 1fr);
}
.stats-grid span {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 14px;
  color: var(--tv-muted);
  border-radius: 14px;
}
.stats-grid span::before {
  content: "";
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #eaf2ff;
}
.stats-grid strong { color: var(--tv-text); }

.pico-card {
  min-height: 190px;
  border-radius: 12px;
}
.pico-card.no-card-image {
  min-height: 160px;
  background: linear-gradient(135deg, #ffffff, #eef5ff);
}
.pico-card img { min-height: 190px; opacity: 1; }
.pico-card::after {
  background: linear-gradient(180deg, transparent 28%, rgba(8, 22, 48, .78));
}
.pico-card.no-card-image::after { display: none; }
.pico-card.no-card-image .pico-card-body {
  color: var(--tv-text);
}
.pico-card.no-card-image h3,
.pico-card.no-card-image p,
.pico-card.no-card-image span { color: var(--tv-text); }
.favorite-btn {
  color: #fff;
  background: rgba(20, 42, 82, .22);
}

.quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.quick-action {
  min-height: 92px;
  border-radius: 12px;
  grid-template-columns: 56px minmax(0, 1fr) 20px;
}
.quick-action > span:first-child {
  background: #eaf2ff;
  color: #1f64e5;
}
.quick-action strong { color: var(--tv-text); }
.quick-action small { color: var(--tv-muted); }
.quick-action > i { color: var(--tv-text); }
.green, .orange, .blue, .pink { background: #eaf2ff; color: #1f64e5; }

.route-card,
.info-card,
.setor-mini-card,
.media-panel,
.table-card,
.empty-card {
  border-radius: 12px;
}
.route-content h3,
.info-card h3,
.setor-mini-card h3,
h2 { color: var(--tv-text); }
.route-content p,
.info-card p,
.setor-card p,
.section-text,
.lead-copy,
.muted { color: var(--tv-muted) !important; }
.route-facts {
  border-color: var(--tv-border);
}
.route-facts small { color: var(--tv-muted); }
.route-inline-number,
.route-number {
  color: #1f64e5;
  border-color: #cfe0ff;
  background: #eef5ff;
}
.detail-pills span {
  color: #1f64e5;
  background: #eef5ff;
  border-color: #dbe8ff;
  font-weight: 800;
}
.detail-location { color: var(--tv-text); }
.area-hero {
  border-bottom-color: var(--tv-border);
}
.area-hero img {
  box-shadow: 0 18px 48px rgba(20, 42, 82, .12);
}
.compact-info-grid .info-card {
  background: #fff;
}
.setor-icon {
  background: #eaf2ff;
  color: #1f64e5;
}
.filters-bar .form-select {
  color: var(--tv-text);
  background-color: #fff;
  border-color: var(--tv-border);
}
.table-dark {
  --bs-table-bg: #fff;
  --bs-table-color: var(--tv-text);
  --bs-table-hover-bg: #f2f7ff;
  --bs-table-hover-color: var(--tv-text);
  --bs-table-border-color: var(--tv-border);
}
.offcanvas.text-bg-dark {
  color: var(--tv-text) !important;
  background: #fff !important;
}
.btn-close-white { filter: none; }
.install-card {
  color: var(--tv-text);
  background: #eef5ff;
  border-color: #dbe8ff;
}

@media (max-width: 1199.98px) {
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767.98px) {
  .site-topbar { min-height: 70px; }
  .hero-section {
    margin: 12px;
    padding: 28px 20px;
  }
  .quick-actions,
  .stats-grid { grid-template-columns: 1fr; }
}

/* Light theme polish */
.btn-outline-light {
  --bs-btn-color: #1f64e5;
  --bs-btn-border-color: #c8d9fb;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #1f64e5;
  --bs-btn-hover-border-color: #1f64e5;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #1f64e5;
  --bs-btn-active-border-color: #1f64e5;
  background: #ffffff;
  font-weight: 700;
}

.site-alert.error {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

.site-alert.info {
  color: #1e40af;
  background: #dbeafe;
  border-color: #93c5fd;
}

.termos-de-uso-page .alert-warning-custom h5,
.termos-de-uso-page .legal-text h3 {
  color: var(--tv-text);
}

.termos-de-uso-page .legal-text,
.termos-de-uso-page .legal-text p,
.termos-de-uso-page .legal-text li {
  color: var(--tv-muted);
}

.notifications-page-list .notification-message {
  color: var(--tv-text);
}

.btn-outline-accent,
.btn-accent,
.icon-btn,
.favorite-btn,
.quick-action,
.pico-card,
.route-card,
.featured-route {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease;
}

[data-card-link] {
  cursor: pointer;
}

[data-card-link]:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(20, 42, 82, .1);
}

[data-card-link]:focus-visible {
  outline: 3px solid rgba(31, 100, 229, .24);
  outline-offset: 3px;
}

.search-panel .icon-btn {
  box-shadow: none;
}

.search-panel .icon-btn i,
.btn-outline-accent i,
.btn-outline-light i,
.btn-accent i,
.favorite-btn i,
.setor-icon i,
.system-icon i,
.stats-grid span i,
.quick-action > span:first-child i,
.activity-list span i {
  display: inline-block;
  line-height: 1;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .76) 0%, rgba(255, 255, 255, .55) 34%, rgba(255, 255, 255, .12) 100%);
  pointer-events: none;
}

.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section > * {
  position: relative;
  z-index: 1;
}

.hero-section h1,
.hero-section p {
  max-width: 780px;
}

.hero-section p {
  color: #24406f;
}

.search-panel {
  max-width: 1050px;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: stretch;
}

.stats-grid span::before {
  display: none;
}

.stats-grid span {
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 18px 20px;
}

.stats-grid span i {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #1f64e5;
  background: #eaf2ff;
  border: 1px solid #dbe8ff;
  border-radius: 50%;
  font-size: 1.35rem;
}

.stats-grid strong {
  margin-bottom: 4px;
  font-size: 2.25rem;
}

.pico-card {
  isolation: isolate;
}

.pico-card .stretched-link {
  z-index: 1;
}

.pico-card:not(.no-card-image) h3,
.pico-card:not(.no-card-image) p,
.pico-card:not(.no-card-image) span,
.pico-card:not(.no-card-image) i {
  color: #ffffff;
}

.pico-card:not(.no-card-image) p {
  text-shadow: 0 1px 1px rgba(0, 0, 0, .2);
}

.pico-card:not(.no-card-image)::after {
  background: linear-gradient(180deg, rgba(8, 22, 48, .08) 0%, rgba(8, 22, 48, .34) 48%, rgba(8, 22, 48, .86) 100%);
}

.favorite-btn {
  border: 1px solid rgba(255, 255, 255, .16);
}

.favorite-btn.active {
  color: #1f64e5;
  background: #ffffff;
  border-color: #dbe8ff;
}

.quick-actions {
  align-items: stretch;
}

.quick-action {
  grid-template-columns: 60px minmax(0, 1fr) 18px;
  min-height: 110px;
  padding: 20px 22px;
}

.quick-action > span:first-child {
  border: 1px solid #dbe8ff;
}

.quick-action > span:first-child i {
  color: #1f64e5;
  font-size: 1.35rem;
}

.quick-action > i {
  color: #355286;
}

.activity-list p {
  color: #355286;
}

.activity-list span {
  border: 1px solid #dbe8ff;
  background: #eaf2ff;
  color: #1f64e5;
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.system-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 22px;
}

.system-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #1f64e5;
  background: #eaf2ff;
  border: 1px solid #dbe8ff;
  border-radius: 50%;
  font-size: 1.45rem;
}

.system-card strong {
  display: block;
  color: var(--tv-text);
  font-size: 1.6rem;
  line-height: 1.05;
}

.system-card small {
  display: block;
  margin-top: 6px;
  color: var(--tv-muted);
  font-size: .98rem;
  line-height: 1.35;
}

.setor-mini-card p {
  color: #355286;
}

.setor-mini-card small {
  color: #48658f;
  background: #f5f9ff;
  border-color: #dbe8ff;
  font-weight: 700;
}

.filters-bar .form-select,
.filters-bar input,
.filters-bar .search-panel {
  min-height: 48px;
}

.filters-bar .form-select {
  color: #1b325c;
}

.route-facts span {
  color: #1b325c;
  font-weight: 600;
}

.route-facts small {
  margin-bottom: 2px;
}

.route-content p i,
.detail-location i,
.back-link i,
.section-heading-row .btn i {
  color: #1f64e5;
}

.back-link {
  color: #48658f;
  font-weight: 700;
}

.back-link:hover {
  color: #1f64e5;
}

.muted {
  color: #5f6f8c !important;
}

.section-text,
.lead-copy {
  color: #355286;
}

.table-card td,
.table-card th {
  color: #1b325c;
}

.table-card td.text-accent {
  color: #1f64e5 !important;
}

@media (max-width: 1199.98px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .quick-action {
    min-height: 96px;
    padding: 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Screenshot polish pass */
.pico-card .favorite-btn,
.featured-route .favorite-btn {
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(20, 42, 82, .34);
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow: 0 8px 22px rgba(8, 22, 48, .18);
}

.pico-card .favorite-btn i,
.featured-route .favorite-btn i {
  color: currentColor;
  font-size: 1.35rem;
}

.pico-card .favorite-btn.active,
.featured-route .favorite-btn.active {
  color: #1f64e5;
  background: rgba(234, 242, 255, .96);
  border-color: rgba(31, 100, 229, .28);
}

.pico-card .favorite-btn.active i,
.featured-route .favorite-btn.active i {
  color: #1f64e5;
}

.stats-grid span i,
.quick-action > span:first-child i,
.setor-icon i,
.system-icon i {
  color: #1f64e5 !important;
}

.featured-route-shell {
  padding: 28px;
}

.featured-route-shell h2 {
  margin-bottom: 22px;
}

.featured-route-shell .featured-route {
  position: relative;
  grid-template-columns: minmax(280px, 42%) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--tv-border);
  border-radius: 12px;
  box-shadow: none;
}

.featured-route-shell .featured-route > img {
  height: 100%;
  min-height: 280px;
  border-radius: 0;
}

.featured-route-shell .route-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 24px 28px 24px 0;
}

.featured-route-shell .route-content h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 52px 10px 0;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  line-height: 1.02;
}

.featured-route-shell .route-inline-number {
  min-width: 56px;
  height: 56px;
  margin: 0;
  font-size: 1.4rem;
}

.featured-route-shell .route-content p {
  margin-bottom: 20px;
  color: #5f6f8c;
  font-size: 1.08rem;
}

.featured-route-shell .route-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 0;
  margin: 0 0 18px;
}

.featured-route-shell .route-facts span {
  min-width: 0;
  font-size: 1.05rem;
}

.featured-route-shell .btn-accent {
  align-self: flex-start;
  min-width: 170px;
}

.featured-route-shell .favorite-btn.static {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  background: #eef3fb;
  border-color: #d5e1f3;
  color: #7f8aa0;
}

.featured-route-shell .favorite-btn.static.active {
  color: #1f64e5;
  background: #eaf2ff;
  border-color: #bcd3ff;
}

@media (max-width: 1199.98px) {
  .featured-route-shell .featured-route {
    grid-template-columns: 1fr;
  }

  .featured-route-shell .featured-route > img {
    height: 260px;
  }

  .featured-route-shell .route-content {
    padding: 22px;
  }
}

@media (max-width: 767.98px) {
  .featured-route-shell {
    padding: 18px;
  }

  .featured-route-shell .route-content h3 {
    align-items: flex-start;
    flex-direction: column;
    margin-right: 48px;
    font-size: 1.55rem;
  }

  .featured-route-shell .route-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Community */
.social-page {
  color: #10244f;
}

.social-layout {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr) minmax(230px, 280px);
  gap: 22px;
}

.social-sidebar,
.social-feed {
  display: grid;
  align-content: start;
  gap: 16px;
}

#feed-posts {
  display: grid;
  gap: 16px;
}

.infinite-scroll-sentinel {
  display: flex;
  justify-content: center;
  padding: 18px 0;
  color: var(--muted);
}

.social-panel,
.social-composer,
.social-card,
.via-register-card,
.profile-hero {
  background: #fff;
  border-color: #dce5f3;
  box-shadow: 0 16px 42px rgba(31, 67, 126, .08);
}

.social-panel h2,
.social-composer h1,
.profile-hero h1 {
  color: #0e285f;
}

.social-panel h2,
.section-heading-row h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 1.05rem;
}

.social-search {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.social-list {
  display: grid;
  gap: 12px;
}

.social-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.social-person.compact {
  grid-template-columns: auto minmax(0, 1fr);
}

.social-person span {
  display: grid;
  min-width: 0;
}

.social-person strong,
.social-card strong {
  color: #10244f;
}

.social-person small,
.social-card-header span,
.profile-identity p,
.profile-identity span {
  overflow: hidden;
  color: #647492;
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
}

.social-avatar-fallback {
  color: #1f64e5;
  background: #eaf2ff;
}

.social-composer h1 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.social-composer form,
.via-register-card form {
  display: grid;
  gap: 12px;
}

.via-register-card .form-label {
  margin-bottom: -6px;
  color: #173263;
  font-weight: 700;
}

.tiptap-editor {
  overflow: hidden;
  background: #fff;
  border: 1px solid #d5dfec;
  border-radius: 8px;
}

.tiptap-editor textarea.form-control {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: 152px;
  resize: none;
}

.tiptap-ready .tiptap-source {
  display: none;
}

.tiptap-surface {
  display: none;
}

.tiptap-ready .tiptap-surface {
  display: block;
}

.tiptap-fallback .tiptap-toolbar,
.tiptap-fallback .tiptap-surface {
  display: none;
}

.tiptap-prosemirror {
  min-height: 128px;
  padding: 12px;
  color: #173263;
  outline: none;
}

.tiptap-prosemirror > * {
  margin: 0 0 10px;
}

.tiptap-prosemirror > :last-child {
  margin-bottom: 0;
}

.tiptap-prosemirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  height: 0;
  color: #8796ad;
  pointer-events: none;
}

.tiptap-prosemirror blockquote {
  padding: 8px 12px;
  background: #f6f9fe;
  border-left: 3px solid #1f64e5;
  border-radius: 8px;
}

.tiptap-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 7px;
  background: #f6f9fe;
  border-bottom: 1px solid #e0e8f7;
}

.tiptap-toolbar button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #31527f;
  background: #fff;
  border: 1px solid #dce5f3;
  border-radius: 8px;
}

.tiptap-toolbar button:hover,
.tiptap-toolbar button.active {
  color: #1f64e5;
  border-color: #bcd3ff;
  background: #eaf2ff;
}

.social-composer-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.route-filters > .btn {
  align-self: center;
}

.social-composer-tools > .btn,
.social-composer-tools > label.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.social-composer-tools .form-control {
  flex: 1 1 220px;
}

.contact-page .contact-channel-label,
.contact-page .form-label {
  color: var(--tv-muted);
}

.contact-page .contact-channel-value {
  color: var(--tv-text);
}

.contact-page .form-control {
  color: var(--tv-text);
  background: #fff;
  border-color: var(--tv-border);
}

.image-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.image-preview-list:empty {
  display: none;
}

.image-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.image-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.image-preview-remove:hover {
  background: rgba(220,53,69,.85);
}

.social-panel,
.social-composer,
.social-card,
.via-register-card {
  padding: 18px;
}

.social-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-card-header > div {
  display: grid;
  min-width: 0;
}

.social-card-route {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: auto;
  color: #1f64e5;
  background: #eaf2ff;
  border-radius: 8px;
}

.social-manage {
  position: relative;
  margin-left: 6px;
}

.social-card-header > .social-manage:first-of-type {
  margin-left: auto;
}

.social-manage summary {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #48658f;
  list-style: none;
  cursor: pointer;
  background: #f6f9fe;
  border: 1px solid #e0e8f7;
  border-radius: 8px;
}

.social-manage summary::-webkit-details-marker {
  display: none;
}

.social-manage-panel {
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 6;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  padding: 14px;
  background: #fff;
  border: 1px solid #dce5f3;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(31, 67, 126, .18);
}

.social-manage-panel h3 {
  margin: 0;
  color: #10244f;
  font-size: .95rem;
}

.social-manage-panel form {
  display: grid;
  gap: 9px;
}

.social-manage-panel textarea {
  min-height: 92px;
}

.social-route-context {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px;
  background: #f6f9fe;
  border: 1px solid #e0e8f7;
  border-radius: 8px;
}

.social-route-context span {
  color: #647492;
}

.social-route-context small,
.social-route-tags span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  margin-right: 6px;
  padding: 3px 9px;
  color: #175829;
  font-weight: 800;
  background: #e8f8ee;
  border: 1px solid #bce8ca;
  border-radius: 999px;
}

.social-text {
  margin: 14px 0 0;
  color: #173263;
}

.rich-text-body {
  display: grid;
  gap: 10px;
}

.rich-text-body > * {
  margin: 0;
}

.rich-text-body h1,
.rich-text-body h2,
.rich-text-body h3,
.rich-text-body h4 {
  color: #10244f;
  font-weight: 900;
}

.rich-text-body h1 { font-size: 1.35rem; }
.rich-text-body h2 { font-size: 1.2rem; }
.rich-text-body h3 { font-size: 1.1rem; }
.rich-text-body h4 { font-size: 1rem; }

.rich-text-body ul,
.rich-text-body ol {
  padding-left: 1.25rem;
}

.rich-text-body blockquote {
  padding: 10px 12px;
  color: #31527f;
  background: #f6f9fe;
  border-left: 3px solid #1f64e5;
  border-radius: 8px;
}

.rich-text-body code {
  padding: 2px 5px;
  color: #0f5132;
  background: #e8f8ee;
  border-radius: 6px;
}

.rich-text-body pre {
  overflow: auto;
  padding: 12px;
  background: #0f1e33;
  border-radius: 8px;
}

.rich-text-body pre code {
  padding: 0;
  color: #eef5ff;
  background: transparent;
}

.rich-text-body a {
  color: #1f64e5;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.social-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.social-media-grid > img,
.social-media-grid > a,
.social-youtube img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
}

.social-media-grid > a {
  overflow: hidden;
}

.social-media-grid > a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.social-youtube {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.social-youtube span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  color: #fff;
  font-weight: 900;
  background: rgba(0, 0, 0, .64);
  border-radius: 8px;
}

.social-youtube i {
  color: #ff2d2d;
}

.social-link-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px;
  color: #14315f;
  background: #f6f9fe;
  border: 1px solid #e0e8f7;
  border-radius: 8px;
}

.social-link-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-reactions,
.reaction-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.social-reactions form {
  min-width: 0;
}

.social-reactions button,
.reaction-legend span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  font-weight: 850;
  background: #fff;
  border: 1px solid currentColor;
  border-radius: 8px;
}

.social-reactions button:disabled {
  opacity: .7;
}

.social-reactions button.active {
  background: #f4f8ff;
  box-shadow: inset 0 0 0 1px currentColor;
}

.social-reactions small {
  opacity: .75;
}

.social-reaction-love { color: #e42545; }
.social-reaction-congrats { color: #f07818; }
.social-reaction-machine { color: #7c35d8; }
.social-reaction-kamon { color: #188757; }

.social-stats {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.social-stats div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.social-stats dt {
  color: #647492;
  font-weight: 700;
}

.social-stats dd {
  margin: 0;
  color: #10244f;
  font-weight: 900;
}

.via-register-type {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.via-register-type label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #173263;
  font-weight: 800;
  background: #f6f9fe;
  border: 1px solid #e0e8f7;
  border-radius: 8px;
}

.via-records-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
  padding: 28px;
}

.profile-identity,
.profile-stats {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-identity h1 {
  margin: 0;
}

.profile-stats {
  flex-wrap: wrap;
}

.profile-stats div {
  display: grid;
  justify-items: center;
  min-width: 96px;
  color: #647492;
}

.profile-stats i {
  color: #1f64e5;
  font-size: 1.25rem;
}

.profile-stats strong {
  color: #10244f;
  font-size: 1.55rem;
}

.profile-achievements {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
  gap: 22px;
  margin-bottom: 22px;
}
.profile-highest-grade { display: flex; align-items: center; gap: 15px; padding: 22px; }
.profile-highest-grade > i { color: #1f64e5; font-size: 2rem; }
.profile-highest-grade span, .profile-highest-grade strong { display: block; }
.profile-highest-grade span { color: #647492; }
.profile-highest-grade strong { color: #10244f; font-size: 2rem; }
.profile-grade-chart { position: relative; padding: 22px; }
.profile-grade-chart .section-heading-row { margin-bottom: 18px; }
.profile-chart-plot {
  display: flex; align-items: stretch; gap: 8px; height: 230px; padding: 10px 8px 38px 42px;
  border-bottom: 1px solid #cdd8eb;
  background: repeating-linear-gradient(to top, transparent 0 44px, #e7edf7 45px);
}
.profile-chart-bar { position: relative; display: flex; flex: 1 1 0; min-width: 30px; height: 100%; align-items: flex-end; justify-content: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.profile-chart-column { width: min(34px, 72%); height: calc((var(--bar-value) / var(--chart-max)) * 100%); min-height: 4px; border-radius: 6px 6px 0 0; background: var(--bar-color, #1f64e5); transition: filter .18s, transform .18s; }
.profile-chart-bar:hover .profile-chart-column, .profile-chart-bar:focus-visible .profile-chart-column { filter: brightness(1.2); transform: scaleY(1.03); }
.profile-chart-value { opacity: 0; position: absolute; bottom: calc((var(--bar-value) / var(--chart-max)) * 100% + 5px); color: #10244f; font-weight: 700; }
.profile-chart-bar:hover .profile-chart-value, .profile-chart-bar:focus-visible .profile-chart-value { opacity: 1; }
.profile-chart-label { position: absolute; bottom: -29px; left: 50%; transform: translateX(-50%); color: #647492; font-size: .75rem; white-space: nowrap; }
.profile-chart-axis-y { position: absolute; top: calc(50% + 20px); left: 8px; color: #647492; font-size: .72rem; transform: translateY(-50%) rotate(-90deg); transform-origin: center; white-space: nowrap; }
.profile-chart-axis-x { margin: 0 8px 0 42px; color: #647492; font-size: .72rem; text-align: center; }

.profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
  gap: 22px;
}

.profile-grid .social-card {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.profile-grid .social-card + .social-card {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e0e8f7;
  border-radius: 0;
}

.profile-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  margin-bottom: 16px;
}

.profile-route-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid #e0e8f7;
}

.profile-route-row h3 {
  margin: 2px 0 4px;
  color: #10244f;
  font-size: 1rem;
}

.profile-route-row p,
.profile-route-row small {
  color: #647492;
}

.profile-route-row img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  border-radius: 8px;
}

@media (max-width: 1199.98px) {
  .social-layout,
  .profile-grid,
  .profile-achievements {
    grid-template-columns: 1fr;
  }

  .social-layout .social-sidebar:first-child {
    order: 2;
  }

  .social-layout .social-sidebar:last-child {
    order: 3;
  }

  .social-feed {
    order: 1;
  }

  .profile-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .social-media-grid,
  .social-reactions,
  .reaction-legend,
  .profile-filters,
  .profile-route-row {
    grid-template-columns: 1fr;
  }

  .profile-hero,
  .profile-identity,
  .profile-stats {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-person {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .social-person form {
    grid-column: 1 / -1;
  }
}

.contribution-form {
  display: grid;
  gap: 12px;
}

.contribution-workspace {
  display: grid;
  gap: 18px;
}

.contribution-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border: 1px solid #dce6f5;
  border-radius: 12px;
  background: #eef5ff;
}

@media (max-width: 760px) {
  .contribution-tabs {
    grid-template-columns: 1fr;
  }
}

.contribution-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 16px;
  border: 1px solid #cfe0ff;
  border-radius: 9px;
  background: #ffffff;
  color: #42577a;
  font-weight: 800;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.contribution-tabs button:hover {
  color: #1f64e5;
  border-color: #8fb5f5;
  background: #f7faff;
  transform: translateY(-1px);
}

.contribution-tabs button.active {
  color: #ffffff;
  background: #1f64e5;
  border-color: #1f64e5;
  box-shadow: 0 8px 20px rgba(31, 100, 229, .2);
}

.contribution-tabs button:focus-visible {
  outline: 3px solid rgba(31, 100, 229, .24);
  outline-offset: 2px;
}

.contribute-scope {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dce6f5;
  border-radius: 8px;
  background: rgba(255, 255, 255, .62);
}

.contribute-scope-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.contribute-scope-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #dce6f5;
  border-radius: 8px;
  background: #fff;
  color: #42577a;
  font-weight: 800;
  cursor: pointer;
}

.contribute-scope-options input {
  margin: 0;
}

.contribution-grid,
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.contribution-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.contribution-field > span {
  color: #50617c;
  font-size: .82rem;
  font-weight: 800;
}

.submission-list {
  display: grid;
  gap: 10px;
}

.contribution-routes {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  font-size: .8rem;
}

.contribution-routes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contribution-route-row {
  display: grid;
  grid-template-columns: 46px minmax(90px, 1fr) minmax(90px, 1fr) minmax(85px, 0.8fr) 90px 90px 90px 90px 100px 60px 100px 85px 32px;
  gap: 5px;
  min-width: 1020px;
  margin-bottom: 8px;
}

.contribution-route-labels {
  margin-bottom: 2px;
  color: #647492;
  font-size: .78rem;
  font-weight: 700;
}

.contribution-route-row .btn {
  min-height: 32px;
  padding: 5px 8px;
}

.contribution-route-row .form-control,
.contribution-route-row .form-select {
  min-height: 32px;
  padding: 5px 7px;
  font-size: .8rem;
}

.contribution-routes-actions {
  display: flex;
  justify-content: flex-start;
}

.route-extra-fields {
  position: relative;
}

.route-extra-fields summary {
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #ced8e8;
  border-radius: 6px;
  background: #fff;
  color: #42577a;
  cursor: pointer;
  list-style: none;
}

.route-extra-fields[open] {
  z-index: 2;
}

.route-extra-fields[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.route-extra-fields[open]::after {
  content: "";
  position: absolute;
  inset: 31px 0 auto;
  height: 1px;
  background: #ffffff;
}

.route-extra-fields > :not(summary) {
  position: relative;
  z-index: 1;
  display: block;
  width: 220px;
  margin-top: -1px;
  border-radius: 0;
}

.route-extra-fields > :last-child {
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.submission-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dce6f5;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.badge-soft {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef4ff;
  color: #24416d;
  font-size: .78rem;
  font-weight: 700;
}

.badge-soft.aprovada { background: #e8f7ef; color: #16643c; }
.badge-soft.rejeitada { background: #ffecec; color: #9c2c2c; }
.badge-soft.pendente { background: #fff4e5; color: #8a4a08; }

.import-log {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #647492;
}

@media (max-width: 767.98px) {
  .contribution-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .contribution-route-row {
    min-width: 1020px;
  }
}

.sector-topo-section {
  margin: 32px auto 0;
  max-width: 980px;
}
.peak-topo-section {
  max-width: none;
}
.sector-topo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  height: min(72vh, 760px);
  min-height: 540px;
  overflow: hidden;
  padding: 0;
}
.sector-topo-view {
  position: relative;
  min-height: 0;
  height: 100%;
  cursor: pointer;
  touch-action: none;
  background: radial-gradient(circle at 50% 15%, rgba(255,255,255,.65), rgba(255,255,255,0) 42%), linear-gradient(180deg, rgba(248,250,252,.94), rgba(226,232,240,.88));
}
.sector-topo-view.wheel-armed { cursor: grab; }
.sector-topo-view.dragging { cursor: grabbing; }
.peak-topo-google-map-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  background: #e5e7eb;
  pointer-events: none;
}
.peak-topo-google-map-bg.is-visible { display: block; }
.peak-topo-google-map-bg iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(.85) contrast(.95);
}
.sector-topo-view svg {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}
.topo-route-marker { cursor: pointer; filter: drop-shadow(0 10px 16px rgba(15,23,42,.22)); }
.topo-route-marker.active circle { stroke: #facc15; stroke-width: 7; }
.topo-route-marker.current-page-route:not(.active) circle {
  stroke: #22d3ee;
  stroke-width: 8;
  filter: drop-shadow(0 0 10px rgba(34,211,238,.85));
}
.topo-route-marker.current-page-route:not(.active) text { font-size: 18px; }
.topo-route-tooltip {
  display: none;
  position: absolute;
  z-index: 1050;
  pointer-events: none;
  background-color: #1e293b;
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: inherit;
}
.topo-route-tooltip .tooltip-title {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 2px;
  white-space: nowrap;
}
.topo-route-tooltip .tooltip-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
  white-space: nowrap;
}
.sector-route-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 12px;
  border-radius: 8px;
  padding: 8px 11px;
  background: rgba(37,99,235,.95);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.sector-route-link:hover {
  color: #fff;
  background: rgba(29,78,216,1);
}
.sector-topo-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 16px;
  border-left: 1px solid rgba(255,255,255,.14);
  background: rgba(10, 20, 34, .92);
}
.sector-topo-info {
  display: none;
}
.sector-route-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  font-weight: 900;
}
.sector-topo-info h3 { margin: 0 0 8px; color: #fff; font-size: 1.1rem; font-weight: 900; }
.sector-topo-info p { color: rgba(255,255,255,.78); margin-bottom: 12px; }
.sector-route-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.sector-route-meta-item {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: .82rem;
}
.sector-route-meta-item span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255,255,255,.62);
  font-size: .72rem;
  font-weight: 700;
}
.sector-route-meta-item strong {
  display: block;
  color: #fff;
  font-weight: 900;
}
.sector-topo-routes {
  display: grid;
  align-content: start;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
}
.sector-topo-routes::-webkit-scrollbar { width: 8px; }
.sector-topo-routes::-webkit-scrollbar-thumb { background: rgba(255,255,255,.24); border-radius: 999px; }
.sector-topo-routes button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 9px;
  background: rgba(255,255,255,.09);
  color: #fff;
  text-align: left;
}
.sector-topo-routes button.active,
.sector-topo-routes button:hover { border-color: rgba(250,204,21,.7); background: rgba(250,204,21,.12); }
.sector-topo-routes button.current-page-route {
  border-color: rgba(34,211,238,.75);
  box-shadow: inset 3px 0 0 #22d3ee;
}
.peak-sidebar-sector-group {
  display: grid;
  gap: 8px;
}
.peak-sidebar-sector-group:not(:last-child) {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.peak-sidebar-sector-group h4 {
  margin: 0;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 900;
}
.peak-sidebar-empty {
  color: rgba(255,255,255,.58);
  font-size: .82rem;
  font-weight: 700;
}
.sector-topo-routes span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border-radius: 999px;
  background: rgba(56,189,248,.22);
  font-weight: 900;
}
.sector-topo-routes strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sector-topo-routes small { color: var(--tv-muted); white-space: nowrap; }
.sector-topo-error {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 24px;
  color: #0f172a;
  font-weight: 800;
}
.sector-route-offcanvas {
  width: min(420px, 92vw);
  background: #111827;
  color: #fff;
}
.sector-route-offcanvas .offcanvas-header {
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.sector-route-offcanvas .offcanvas-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}
.sector-route-offcanvas .offcanvas-body {
  padding: 22px;
}
.sector-route-offcanvas h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 900;
}
.sector-route-offcanvas p {
  color: rgba(255,255,255,.78);
  font-size: 1rem;
  line-height: 1.55;
}
.sector-route-detail-section {
  margin-top: 18px;
}
.sector-route-detail-section h4 {
  margin: 0 0 6px;
  color: rgba(255,255,255,.66);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.sector-route-detail-section p {
  margin: 0;
}

@media (max-width: 767.98px) {
  .sector-topo-section { max-width: none; }
  .sector-topo-layout { grid-template-columns: 1fr; }
  .sector-topo-view { min-height: 360px; }
  .sector-topo-sidebar { display: none; }
}

/* ==========================================================================
   PUBLIC FOOTER STYLES
   ========================================================================== */
.site-footer {
  margin-top: 60px;
  background: var(--tv-bg-2);
  border-top: 1px solid var(--tv-border);
  padding: 60px clamp(18px, 4vw, 64px) 30px;
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 10;
}

.footer-container {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 40px;
  margin-bottom: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-brand .brand-lockup {
  margin-bottom: 0;
}

.footer-desc {
  font-size: 0.92rem;
  color: var(--tv-text);
  opacity: 0.8;
  line-height: 1.6;
  max-width: 320px;
}

.footer-links-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.footer-column h4 {
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tv-text);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 24px;
  height: 2px;
  background-color: var(--tv-orange);
  border-radius: 2px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-column ul li a {
  font-size: 0.92rem;
  color: var(--tv-text);
  opacity: 0.75;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-column ul li a i {
  font-size: 1rem;
  color: var(--tv-text);
  opacity: 0.6;
  transition: all 0.25s ease;
}

.footer-column ul li a:hover {
  color: var(--tv-orange);
  opacity: 1;
  transform: translateX(4px);
}

.footer-column ul li a:hover i {
  color: var(--tv-orange);
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid var(--tv-border);
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.84rem;
  color: var(--tv-text);
  opacity: 0.8;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-credits i {
  color: var(--tv-orange);
  animation: heartPulse 1.8s infinite;
  display: inline-block;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  14% { transform: scale(1.12); }
  28% { transform: scale(1); }
  42% { transform: scale(1.12); }
  70% { transform: scale(1); }
}

@media (max-width: 991.98px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-desc {
    max-width: 100%;
  }
}

@media (max-width: 575.98px) {
  .footer-links-group {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* ==========================================================================
   HOMEPAGE HERO PREMIUM STYLES
   ========================================================================== */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(31, 100, 229, 0.08);
  color: #1f64e5;
  border: 1px solid rgba(31, 100, 229, 0.16);
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.08rem;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 620px;
  opacity: 0.88;
}

.hero-actions .btn {
  font-weight: 800;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(20, 42, 82, 0.08);
}
.hero-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(20, 42, 82, 0.14);
}

.stats-grid-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card-custom {
  background: var(--tv-card);
  border: 1px solid var(--tv-border);
  border-radius: 16px;
  padding: 24px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(20, 42, 82, .06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 190px;
}

.stat-card-custom:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(20, 42, 82, .12);
  border-color: rgba(31, 100, 229, 0.3);
}

.stat-icon-custom {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(20, 42, 82, 0.04);
}

.stat-icon-custom.picos { background: rgba(31, 100, 229, 0.1); color: #1f64e5; }
.stat-icon-custom.vias { background: rgba(255, 130, 0, 0.1); color: var(--tv-orange); }
.stat-icon-custom.setores { background: rgba(109, 163, 116, 0.1); color: #6da374; }

.stat-info-custom {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number-custom {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--tv-text);
}

.stat-label-custom {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--tv-text);
}

.stat-desc-custom {
  font-size: 0.8rem;
  color: var(--tv-muted);
  line-height: 1.3;
}

.stat-indicator-custom {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
}
.stat-indicator-custom.bg-blue { background-color: #1f64e5; }
.stat-indicator-custom.bg-orange { background-color: var(--tv-orange); }
.stat-indicator-custom.bg-green { background-color: #6da374; }

@media (max-width: 1399.98px) {
  .stats-grid-wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1199.98px) {
  .stats-grid-wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991.98px) {
  .stats-grid-wrapper {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 20px;
  }
}

@media (max-width: 767.98px) {
  .stats-grid-wrapper {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
  }
  .stat-card-custom {
    min-height: auto;
    padding: 20px;
    flex-direction: row;
    align-items: center;
  }
  .stat-indicator-custom {
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
  }
}

/* --- Notification System & Replies System CSS --- */
.social-card-replies {
  background: rgba(255, 255, 255, 0.01);
}

.reply-item {
  transition: background-color 0.2s;
}

.reply-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

.notification-item {
  transition: background-color 0.2s;
  color: var(--tv-text);
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
  background: rgba(255, 130, 0, 0.08);
  border-left: 3px solid var(--tv-orange);
}

.notification-item.unread:hover {
  background: rgba(255, 130, 0, 0.12);
}

.notifications-card {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.notification-row {
  border-bottom: 1px solid #f1f5f9;
}

.notification-row:hover {
  background-color: #f8fafc;
}

.notifications-list-container::-webkit-scrollbar {
  width: 6px;
}

.notifications-list-container::-webkit-scrollbar-track {
  background: transparent;
}

.notifications-list-container::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

@media (max-width: 991.98px) {
  .mobile-notifications .badge {
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
  }
}

/* ==========================================================================
   MODERN WEB ANIMATIONS & MICRO-INTERACTIONS
   ========================================================================== */

/* Keyframe Animations */
@keyframes page-fade-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes react-bounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  55% { transform: scale(0.85); }
  75% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes alert-slide-in {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dropdown-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-zoom-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse-accent {
  0% { box-shadow: 0 0 0 0 rgba(255, 130, 0, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 130, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 130, 0, 0); }
}

/* Page entrance animations */
.page-content,
main,
.social-composer,
.social-feed,
.profile-grid,
.explore-layout {
  animation: page-fade-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Stagger delays for list/grid items */
.social-feed > *:nth-child(1) { animation-delay: 0.05s; }
.social-feed > *:nth-child(2) { animation-delay: 0.1s; }
.social-feed > *:nth-child(3) { animation-delay: 0.15s; }
.social-feed > *:nth-child(4) { animation-delay: 0.2s; }
.social-feed > *:nth-child(5) { animation-delay: 0.25s; }

.pico-card,
.route-card,
.sidebar-bonde-item,
.profile-route-row {
  transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), 
              box-shadow 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), 
              background-color 0.2s, 
              border-color 0.2s;
}

/* Hover Elevations */
.pico-card:hover,
.route-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(255, 130, 0, 0.15);
}

.sidebar-bonde-item:hover {
  transform: translateX(4px);
}

.active-bondes-sidebar small i,
.bonde-info-grid > div > i {
  margin-right: 5px;
}

/* Active Reaction & Bookmarks Pop */
.favorite-btn.active i,
.favorite-btn.active,
.social-reactions button.active i,
.social-reactions button.active {
  animation: react-bounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* Toast alert entry animation */
.site-alert {
  animation: alert-slide-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* Bootstrap Dropdowns animation */
.dropdown-menu.show {
  animation: dropdown-fade-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Bootstrap Modals zoom animation */
.modal.show .modal-content {
  animation: modal-zoom-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Installer button attention grabber */
.install-topbar:hover,
.install-card:hover {
  animation: pulse-accent 1.5s infinite;
}

/* Smooth entry animation for newly created/prepended social feed posts */
#feed-posts > .social-card:first-of-type,
.social-card.htmx-swapping {
  animation: post-entry 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes post-entry {
  from {
    opacity: 0;
    transform: translateY(-24px) scale(0.96);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: -16px;
    overflow: hidden;
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 1500px;
    padding-top: 18px;
    padding-bottom: 18px;
    margin-top: 0;
  }
}

/* Smooth entry animation for replies */
.social-replies-list > .reply-item:last-child {
  animation: reply-entry 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes reply-entry {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    overflow: hidden;
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 250px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* Rich Text Mentions */
.mention {
  background: rgba(99, 176, 255, 0.15);
  color: var(--color-accent, #4a9eff) !important;
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.15s;
}
.mention:hover {
  background: rgba(99, 176, 255, 0.25);
}

.mention-suggestions-dropdown .dropdown-item {
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background-color 0.15s;
}

.mention-suggestions-dropdown .dropdown-item:hover,
.mention-suggestions-dropdown .dropdown-item.active {
  background-color: rgba(255, 255, 255, 0.07) !important;
}

/* Grade comparison visualisation */
.grades-visual-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 28px 2px 18px;
}
.grades-visual-intro h2 {
  margin: 5px 0 7px;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  letter-spacing: -.04em;
}
.grades-visual-intro p {
  max-width: 650px;
  margin: 0;
  color: var(--tv-muted);
  line-height: 1.55;
}
.grades-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 9px 14px;
  color: var(--tv-muted);
  font-size: .76rem;
  white-space: nowrap;
}
.grades-legend span { display: inline-flex; align-items: center; gap: 6px; }
.grade-dot { width: 9px; height: 9px; display: inline-block; border-radius: 50%; }
.grade-dot-1 { background: #3bbf77; box-shadow: 0 0 12px rgba(59,191,119,.4); }
.grade-dot-3 { background: #f5bc3a; box-shadow: 0 0 12px rgba(245,188,58,.4); }
.grade-dot-5 { background: #ed5a55; box-shadow: 0 0 12px rgba(237,90,85,.4); }
.grades-comparison-stack { display: grid; min-width: 0; gap: 22px; }
.grades-comparison-card {
  min-width: 0;
  overflow: visible;
  isolation: isolate;
  padding: 0;
  border: 1px solid rgba(205,231,219,.2);
  background: linear-gradient(145deg, rgba(20,57,43,.9), rgba(7,27,20,.88));
  box-shadow: 0 22px 65px rgba(0,0,0,.18);
}
.grades-comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(220,244,231,.28);
  border-radius: 8px 8px 0 0;
  background: linear-gradient(135deg, rgba(8,35,26,.96), rgba(18,61,44,.9));
}
.grades-kicker {
  display: block;
  color: #a8e8ba;
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.grades-kicker i { margin-right: 5px; }
.grades-comparison-header h3 { margin: 5px 0 0; color: #f7fff9 !important; font-size: 1.5rem; letter-spacing: -.035em; text-shadow: 0 1px 12px rgba(0,0,0,.25); }
.grades-count {
  padding: 8px 12px;
  color: #e1f2e8;
  font-size: .76rem;
  border: 1px solid var(--tv-border);
  border-radius: 999px;
  background: rgba(0,0,0,.2);
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
.grades-count b { color: #ffb15e; padding: 0 4px; }
.grades-matrix-scroll {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}
.grades-matrix {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.grades-matrix th, .grades-matrix td { border-right: 1px solid rgba(205,231,219,.1); border-bottom: 1px solid rgba(205,231,219,.1); }
.grades-matrix tr > :last-child { border-right: 0; }
.grades-matrix tbody tr:last-child > * { border-bottom: 0; }
.grades-matrix thead th {
  position: sticky;
  top: 78px;
  z-index: 4;
  height: 68px;
  padding: 11px 12px;
  color: #f5fbf7;
  text-align: left;
  color: #f1fff5;
  background: rgba(3,22,16,.76);
}
.grades-matrix thead .grades-row-label { z-index: 5; }
.grades-matrix thead th:not(.grades-row-label) { border-top: 2px solid rgba(255,130,0,.65); }
.grades-matrix thead th span { display: block; color: #ffb15e; font-size: .98rem; font-weight: 900; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.grades-matrix thead th small { display: block; margin-top: 3px; color: #d2e6d9; font-size: .68rem; font-weight: 600; line-height: 1.15; }
.grades-row-label { width: 72px; color: #c6ded0 !important; font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-align: center !important; }
.grades-matrix tbody .grades-row-label { background: rgba(0,0,0,.3); }
.grades-row-label span { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; border: 1px solid rgba(205,231,219,.17); border-radius: 50%; }
.grade-cell { height: 42px; padding: 5px 11px; vertical-align: middle; cursor: pointer; transition: filter .18s ease, transform .18s ease, box-shadow .18s ease; }
.grade-cell:hover { position: relative; z-index: 1; filter: brightness(1.18) saturate(1.12); transform: scale(1.035); }
.grades-matrix tbody tr.grade-row-selected > th,
.grades-matrix tbody tr.grade-row-selected > td {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.54), inset 0 -1px 0 rgba(255,255,255,.54);
  filter: brightness(1.16) saturate(1.08);
}
.grades-matrix tbody tr.grade-row-selected > .grades-row-label {
  color: #fff !important;
  background: rgba(255,130,0,.44);
}
.grade-cell.grade-cell-selected {
  position: relative;
  z-index: 2;
  outline: 2px solid #fff;
  outline-offset: -2px;
  box-shadow: inset 0 0 0 2px rgba(255,130,0,.95), 0 0 0 3px rgba(255,130,0,.2);
}
.grade-cell strong { display: block; color: #fff; font-size: .88rem; font-weight: 850; }
.grade-cell small { display: block; overflow: hidden; color: rgba(255,255,255,.72); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.grade-cell-empty { background: rgba(255,255,255,.018) !important; }
.grade-cell-empty span { color: rgba(219,238,227,.18); }
.grade-heat-1 { background: linear-gradient(135deg, rgba(28,119,77,.85), rgba(47,160,97,.56)); }
.grade-heat-2 { background: linear-gradient(135deg, rgba(59,137,73,.86), rgba(133,174,46,.56)); }
.grade-heat-3 { background: linear-gradient(135deg, rgba(164,155,34,.9), rgba(226,177,32,.65)); }
.grade-heat-4 { background: linear-gradient(135deg, rgba(216,128,26,.9), rgba(224,83,36,.72)); }
.grade-heat-5 { background: linear-gradient(135deg, rgba(185,51,49,.92), rgba(114,31,55,.78)); }
.grades-comparison-footer { padding: 13px 24px 16px; color: #bad3c5; font-size: .72rem; }
.grades-comparison-footer i { margin-right: 5px; color: #ffb15e; }
.grades-empty-state { display: grid; justify-items: center; gap: 7px; padding: 54px 20px; color: var(--tv-muted); text-align: center; }
.grades-empty-state i { color: var(--tv-orange); font-size: 2rem; }
.grades-empty-state strong { color: var(--tv-text); }
.grades-seo-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(290px, .8fr);
  gap: 22px;
  margin-top: 32px;
  padding: 26px;
  border: 1px solid var(--tv-border);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
}
.grades-seo-content h2 { margin: 6px 0 13px; color: var(--tv-text); font-size: 1.22rem; }
.grades-seo-content p { color: var(--tv-muted); line-height: 1.65; }
.grades-seo-copy p:last-child { margin-bottom: 0; }
.grades-seo-copy strong { color: var(--tv-orange); }
.grades-seo-faq h2 { margin-top: 0; }
.grades-seo-faq details { border-top: 1px solid var(--tv-border); }
.grades-seo-faq details:last-child { border-bottom: 1px solid var(--tv-border); }
.grades-seo-faq summary { padding: 13px 24px 13px 0; color: var(--tv-text); cursor: pointer; font-weight: 800; }
.grades-seo-faq summary::marker { color: var(--tv-orange); }
.grades-seo-faq details p { margin: -2px 0 15px; font-size: .91rem; }
.grades-systems-filter {
  min-width: 220px;
}
.grades-filter-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.grades-system-filter-row { min-width: 0; }
.grades-system-filter-row label {
  display: block;
  margin: 0 0 7px 2px;
  color: var(--tv-text);
  font-size: .78rem;
  font-weight: 800;
}
.grades-filter-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.grades-filter-actions .form-select { width: min(340px, 100%); }
.grades-filter-actions .btn { min-height: 42px; }
.grades-filter-form .ts-wrapper.grades-systems-control {
  width: min(680px, 100%);
  min-width: 0;
}
.grades-filter-form .ts-wrapper.grades-systems-control .ts-control {
  min-height: 42px;
  padding: 5px 36px 5px 8px;
  color: var(--tv-text);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.grades-filter-form .ts-wrapper.grades-systems-control .ts-control > input { color: var(--tv-text); }
.grades-filter-form .ts-wrapper.grades-systems-control .ts-control > input::placeholder { color: var(--tv-muted); }
.grades-filter-form .ts-wrapper.multi.grades-systems-control .ts-control > div {
  margin: 2px;
  padding: 3px 6px;
  color: #1f64e5;
  font-size: .78rem;
  font-weight: 800;
  border: 1px solid #cfe0ff;
  border-radius: 5px;
  background: #eef5ff;
}
.grades-filter-form .ts-wrapper.grades-systems-control .ts-control .item .remove {
  margin-left: 5px;
  color: #1f64e5;
  border-left: 0;
}
.grades-filter-form .ts-wrapper.grades-systems-control .ts-dropdown {
  overflow: hidden;
  color: var(--tv-text);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20,42,82,.16);
}
.grades-filter-form .ts-wrapper.grades-systems-control .ts-dropdown .option { padding: 9px 11px; }
.grades-filter-form .ts-wrapper.grades-systems-control .ts-dropdown .active { color: #1f64e5; background: #eef5ff; }
.grades-filter-form .ts-wrapper.grades-systems-control .clear-button { color: #1f64e5; }
@media (max-width: 991.98px) {
  .grades-matrix-scroll {
    overflow-x: auto !important;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: rgba(255,130,0,.65) rgba(255,255,255,.06);
  }
}
@media (max-width: 700px) {
  .grades-filter-form { padding: 14px; }
  .grades-filter-actions { align-items: stretch; }
  .grades-filter-actions .form-select,
  .grades-filter-actions .btn { width: 100%; }
  .grades-filter-form .ts-wrapper.grades-systems-control { width: 100%; min-width: 0; }
  .grades-seo-content { grid-template-columns: 1fr; padding: 20px; }
  .grades-visual-intro { display: block; }
  .grades-legend { justify-content: start; margin-top: 15px; white-space: normal; }
  .grades-comparison-header { align-items: start; flex-direction: column; padding: 18px; }
  .grades-comparison-footer { padding: 12px 18px 15px; }
}

/* Theme selector: the light presentation above remains the default. */
.theme-toggle {
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  color: #1f64e5;
  background: #eef5ff;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  font-weight: 800;
}
.theme-toggle:hover { color: #1856ca; background: #dbe8ff; border-color: #8fb5f5; }
.theme-toggle-mobile { display: inline-flex; }
.site-topbar .theme-toggle {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
}
.site-topbar .theme-toggle [data-theme-toggle-label] { display: none; }
.site-topbar .theme-toggle i { font-size: 1.15rem; }

/* Keep the desktop header compact: app installation remains in the mobile menu. */
.site-topbar { gap: 12px; min-width: 0; }
.topbar-nav { min-width: 0; }
.topbar-nav .nav-link { white-space: nowrap; }
.favorites-nav-link { width: 42px; min-width: 42px; justify-content: center; padding-left: 8px !important; padding-right: 8px !important; }
.favorites-nav-link .favorites-nav-label { display: none; }

html[data-theme="dark"] {
  color-scheme: dark;
  --tv-bg: #050b14;
  --tv-bg-2: #091523;
  --tv-card: #0d1a29;
  --tv-card-2: #111f30;
  --tv-border: #29394d;
  --tv-text: #f2f7ff;
  --tv-muted: #aebfd5;
  --tv-orange: #ff8b18;
  --tv-green: #72c98a;
  --tv-blue: #286cff;
  --tv-pink: #d66be8;
}
html[data-theme="dark"] body {
  background: radial-gradient(circle at 75% 15%, rgba(35, 91, 187, .16), transparent 34rem), linear-gradient(145deg, #030810, var(--tv-bg));
  color: var(--tv-text);
}
html[data-theme="dark"] .site-topbar,
html[data-theme="dark"] .offcanvas.text-bg-dark {
  background: rgba(7, 15, 25, .94) !important;
  color: var(--tv-text) !important;
  border-color: var(--tv-border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
}
html[data-theme="dark"] .brand-lockup strong,
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .nav-link i,
html[data-theme="dark"] h2,
html[data-theme="dark"] .route-content h3,
html[data-theme="dark"] .info-card h3,
html[data-theme="dark"] .setor-mini-card h3,
html[data-theme="dark"] .stats-grid strong { color: var(--tv-text); }
html[data-theme="dark"] .brand-lockup strong span,
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.active,
html[data-theme="dark"] .nav-link:hover i,
html[data-theme="dark"] .nav-link.active i { color: var(--tv-orange); }
html[data-theme="dark"] .glass-card,
html[data-theme="dark"] .stats-grid span,
html[data-theme="dark"] .compact-info-grid .info-card,
html[data-theme="dark"] .search-panel,
html[data-theme="dark"] .login-modal .modal-content,
html[data-theme="dark"] .social-login-option,
html[data-theme="dark"] .filters-bar .form-select,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .table-dark,
html[data-theme="dark"] .grades-filter-form .ts-wrapper.grades-systems-control .ts-control,
html[data-theme="dark"] .grades-filter-form .ts-wrapper.grades-systems-control .ts-dropdown {
  color: var(--tv-text);
  background: var(--tv-card) !important;
  border-color: var(--tv-border) !important;
}
html[data-theme="dark"] .hero-section {
  min-height: 570px;
  margin: 28px clamp(18px, 3vw, 54px) 34px;
  padding: 60px clamp(32px, 5vw, 92px);
  border: 1px solid rgba(74, 102, 138, .34);
  border-left-color: transparent;
  border-radius: 20px;
  clip-path: inset(0 0 0 2px round 20px);
  background: linear-gradient(90deg, rgba(4, 13, 23, .96) 0%, rgba(6, 18, 31, .84) 45%, rgba(9, 19, 33, .42) 100%), url("https://images.unsplash.com/photo-1522163182402-834f871fd851?auto=format&fit=crop&w=2200&q=85") center / cover;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .26);
}
html[data-theme="dark"] .hero-section::before {
  background: radial-gradient(circle at 90% 45%, rgba(43, 102, 218, .17), transparent 32%), linear-gradient(90deg, rgba(1, 8, 16, .32), transparent 70%);
}
html[data-theme="dark"] .hero-badge {
  color: #79a8ff;
  background: rgba(29, 99, 255, .12);
  border-color: rgba(50, 115, 255, .38);
}
html[data-theme="dark"] .hero-section h1 {
  max-width: 760px;
  font-size: clamp(2.7rem, 5vw, 4.7rem);
  letter-spacing: -.045em;
  text-shadow: 0 3px 14px rgba(0, 0, 0, .35);
}
html[data-theme="dark"] .hero-section h1,
html[data-theme="dark"] .page-header h1,
html[data-theme="dark"] .hero-section p,
html[data-theme="dark"] .page-header p,
html[data-theme="dark"] .search-panel input,
html[data-theme="dark"] .search-panel i { color: #fff; }
html[data-theme="dark"] .muted,
html[data-theme="dark"] .route-content p,
html[data-theme="dark"] .info-card p,
html[data-theme="dark"] .setor-card p,
html[data-theme="dark"] .section-text,
html[data-theme="dark"] .lead-copy { color: var(--tv-muted) !important; }
html[data-theme="dark"] .btn-accent,
html[data-theme="dark"] .site-topbar .social-login-trigger,
html[data-theme="dark"] .icon-btn {
  --bs-btn-bg: #286cff;
  --bs-btn-border-color: #286cff;
  background: #286cff !important;
  border-color: #286cff !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(31, 98, 255, .22);
}
html[data-theme="dark"] .icon-btn i { color: #fff !important; }
html[data-theme="dark"] .btn-outline-light {
  --bs-btn-color: var(--tv-text);
  --bs-btn-border-color: var(--tv-border);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #286cff;
  --bs-btn-hover-border-color: #286cff;
  color: var(--tv-text);
  background: transparent;
  border-color: var(--tv-border);
}
html[data-theme="dark"] .theme-toggle {
  color: #aecaFF;
  background: linear-gradient(145deg, #172638, #101d2b);
  border-color: #30445d;
  box-shadow: inset 0 1px rgba(255, 255, 255, .04);
}
html[data-theme="dark"] .theme-toggle:hover { color: #fff; background: #1b3048; border-color: #426383; }
html[data-theme="dark"] .install-card { color: var(--tv-text); background: var(--tv-card-2); border-color: var(--tv-border); }
html[data-theme="dark"] .btn-close-white { filter: invert(1) grayscale(100%) brightness(200%); }
html[data-theme="dark"] .topbar-nav .nav-link { border-bottom-color: transparent; }
html[data-theme="dark"] .topbar-nav .nav-link:hover,
html[data-theme="dark"] .topbar-nav .nav-link.active {
  color: #78a6ff;
  border-bottom-color: #286cff;
}
html[data-theme="dark"] .filter-pills a {
  color: #7faaff;
  background: rgba(6, 17, 31, .6);
  border-color: #244a88;
}
html[data-theme="dark"] .filter-pills a.active {
  color: #fff;
  background: #286cff;
  border-color: #286cff;
  box-shadow: 0 8px 18px rgba(40, 108, 255, .25);
}
html[data-theme="dark"] .search-panel {
  background: rgba(6, 16, 28, .78) !important;
  border-color: #34465d !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .04), 0 12px 24px rgba(0, 0, 0, .16);
}
html[data-theme="dark"] .search-panel input::placeholder { color: #90a7c7; }
html[data-theme="dark"] .stat-card-custom {
  background: linear-gradient(150deg, #102031, #0b1725);
  border-color: #293d53;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .22);
}
html[data-theme="dark"] .stat-card-custom:hover { border-color: #3d6dba; }
html[data-theme="dark"] .stat-icon-custom.picos { color: #4e89ff; background: rgba(40, 108, 255, .14); }
html[data-theme="dark"] .stat-icon-custom.vias { color: #ff9a36; background: rgba(255, 139, 24, .13); }
html[data-theme="dark"] .stat-icon-custom.setores { color: #78cf91; background: rgba(114, 201, 138, .13); }
html[data-theme="dark"] .stat-indicator-custom.bg-blue { background: #286cff; }
html[data-theme="dark"] .stat-indicator-custom.bg-orange { background: #ff8b18; }
html[data-theme="dark"] .stat-indicator-custom.bg-green { background: #72c98a; }
html[data-theme="dark"] .site-footer { background: #07101b; border-color: var(--tv-border); }

@media (max-width: 767.98px) {
  html[data-theme="dark"] .hero-section {
    min-height: 0;
    margin: 12px;
    padding: 34px 22px;
    border-radius: 14px;
  }
}

/* Community: compact midnight panels inspired by the dark application shell. */
html[data-theme="dark"] .social-page { color: var(--tv-text); }
html[data-theme="dark"] .social-panel,
html[data-theme="dark"] .social-composer,
html[data-theme="dark"] .social-card,
html[data-theme="dark"] .via-register-card,
html[data-theme="dark"] .profile-hero {
  background: linear-gradient(145deg, rgba(14, 30, 47, .98), rgba(8, 20, 33, .98)) !important;
  border-color: #243a52 !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .18);
}
html[data-theme="dark"] .social-panel h2,
html[data-theme="dark"] .social-composer h1,
html[data-theme="dark"] .profile-hero h1,
html[data-theme="dark"] .social-card h3,
html[data-theme="dark"] .social-person strong,
html[data-theme="dark"] .social-card strong,
html[data-theme="dark"] .social-text,
html[data-theme="dark"] .rich-text-body h1,
html[data-theme="dark"] .rich-text-body h2,
html[data-theme="dark"] .rich-text-body h3,
html[data-theme="dark"] .rich-text-body h4,
html[data-theme="dark"] .social-stats dd { color: var(--tv-text); }
html[data-theme="dark"] .social-person small,
html[data-theme="dark"] .social-card-header span,
html[data-theme="dark"] .social-stats dt,
html[data-theme="dark"] .social-route-context span { color: #9cafc6; }
html[data-theme="dark"] .social-search .form-control,
html[data-theme="dark"] .social-composer-tools .form-control,
html[data-theme="dark"] .social-search-posts input,
html[data-theme="dark"] .social-search-posts select,
html[data-theme="dark"] .social-search-posts .input-group-text {
  color: #e6efff !important;
  background: #0a1726 !important;
  border-color: #263d56 !important;
}
html[data-theme="dark"] .social-search-posts input::placeholder,
html[data-theme="dark"] .social-composer-tools .form-control::placeholder,
html[data-theme="dark"] .social-search .form-control::placeholder {
  color: #91a8c5;
  opacity: 1;
}
html[data-theme="dark"] .tiptap-editor {
  background: #0b1827;
  border-color: #30455e;
  border-radius: 12px;
}
html[data-theme="dark"] .tiptap-toolbar {
  background: linear-gradient(180deg, #122237, #0d1a2a);
  border-bottom-color: #293e56;
}
html[data-theme="dark"] .tiptap-toolbar button {
  color: #b8c9e1;
  background: #101f31;
  border-color: #2a4059;
}
html[data-theme="dark"] .tiptap-toolbar button:hover,
html[data-theme="dark"] .tiptap-toolbar button.active {
  color: #b9d0ff;
  background: #172f4d;
  border-color: #356bd0;
}
html[data-theme="dark"] .tiptap-prosemirror,
html[data-theme="dark"] .tiptap-editor textarea.form-control { color: #dce9fb; background: #0b1827; }
html[data-theme="dark"] .tiptap-prosemirror p.is-editor-empty:first-child::before { color: #9aacc4; }
html[data-theme="dark"] .social-card-route,
html[data-theme="dark"] .social-manage summary {
  color: #a9c5f5;
  background: #11243a;
  border-color: #2c435c;
}
html[data-theme="dark"] .social-route-context,
html[data-theme="dark"] .social-link-preview,
html[data-theme="dark"] .sidebar-bonde-item,
html[data-theme="dark"] .bonde-info-grid,
html[data-theme="dark"] .bonde-details-box {
  color: #c6d6ed;
  background: linear-gradient(145deg, #102034, #0b1827);
  border-color: #243b55;
}
html[data-theme="dark"] .sidebar-bonde-item:hover { color: #aecdff; background: #142a44; border-color: #356bd0; }
html[data-theme="dark"] .social-route-context small,
html[data-theme="dark"] .social-route-tags span {
  color: #9bf0b0;
  background: rgba(42, 142, 91, .18);
  border-color: rgba(85, 202, 126, .32);
}
html[data-theme="dark"] .social-manage-panel {
  color: var(--tv-text);
  background: #102034;
  border-color: #2c435c;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .42);
}
html[data-theme="dark"] .social-manage-panel h3 { color: var(--tv-text); }
html[data-theme="dark"] .social-reactions button,
html[data-theme="dark"] .reaction-legend span {
  background: #0d1c2c;
  border-color: currentColor;
}
html[data-theme="dark"] .social-reactions button.active { background: #142a45; }
html[data-theme="dark"] .social-avatar-fallback { color: #9dc0ff; background: #153765; }
html[data-theme="dark"] .social-search-posts .select2-container--default .select2-selection--single {
  background: #0a1726 !important;
  border-color: #263d56 !important;
}
html[data-theme="dark"] .social-search-posts .select2-container--default .select2-selection--single .select2-selection__rendered,
html[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field { color: #e6efff !important; }
html[data-theme="dark"] .social-search-posts .select2-container--default .select2-selection--single .select2-selection__placeholder { color: #8095af !important; }
html[data-theme="dark"] .bonde-card { border-left-color: #ff8b18 !important; }
html[data-theme="dark"] .social-panel .btn-accent { background: linear-gradient(135deg, #1f72ff, #1553d7) !important; }
html[data-theme="dark"] .social-sidebar .social-panel:first-child .btn-accent { box-shadow: 0 12px 26px rgba(27, 98, 237, .25); }
html[data-theme="dark"] .social-card-replies { background: transparent; border-color: #243a52 !important; }
html[data-theme="dark"] .bonde-content { color: #c6d6ed; }
html[data-theme="dark"] .social-card .rich-text-body blockquote,
html[data-theme="dark"] .social-card .social-text blockquote {
  margin: 14px 0;
  padding: 16px 18px;
  color: #c8d8ef;
  background: linear-gradient(90deg, rgba(29, 86, 170, .2), rgba(12, 29, 47, .78));
  border: 1px solid #29486d;
  border-left: 4px solid #2d73ff;
  border-radius: 10px;
}

/* Contribution workspace */
html[data-theme="dark"] .profile-page .profile-hero {
  padding: 42px 48px;
  background: linear-gradient(115deg, #10243a, #0a1726 64%, #0d1c2e) !important;
  border-color: #273e58 !important;
}
html[data-theme="dark"] .profile-page .social-avatar-fallback {
  width: 104px !important;
  height: 104px !important;
  color: #eaf2ff;
  background: radial-gradient(circle at 50% 50%, #236eff, #102e65 62%, transparent 63%);
  border: 1px dashed #286cff;
  box-shadow: inset 0 0 0 14px rgba(6, 17, 32, .62);
  font-size: 2rem;
}
html[data-theme="dark"] .profile-page .profile-identity h1 { font-size: clamp(2rem, 3vw, 2.7rem); }
html[data-theme="dark"] .profile-page .profile-identity p,
html[data-theme="dark"] .profile-page .profile-identity span,
html[data-theme="dark"] .profile-page .profile-stats div { color: #aebfd5; }
html[data-theme="dark"] .profile-page .profile-identity span {
  display: inline-flex;
  gap: 6px;
  margin-top: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(79, 111, 149, .15);
}
html[data-theme="dark"] .profile-page .profile-stats div + div { border-left: 1px solid #294159; }
html[data-theme="dark"] .profile-page .profile-stats strong { color: #3578ff; }
html[data-theme="dark"] .contribution-workspace {
  padding: 20px !important;
  background: linear-gradient(145deg, #0f2033, #091726) !important;
  border-color: #263e58 !important;
}
html[data-theme="dark"] .contribution-tabs {
  gap: 16px;
  padding: 0;
  background: transparent;
  border: 0;
}
html[data-theme="dark"] .contribution-tabs button {
  min-height: 86px;
  color: #eef5ff;
  background: linear-gradient(145deg, #102034, #0c1928);
  border-color: #2a415b;
  border-radius: 12px;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}
html[data-theme="dark"] .contribution-tabs button > i { font-size: 1.2rem; }
html[data-theme="dark"] .contribution-tabs button > span { display: grid; gap: 5px; text-align: left; }
html[data-theme="dark"] .contribution-tabs button small { color: #9eafc5; font-size: .78rem; font-weight: 500; }
html[data-theme="dark"] .contribution-tabs button:hover { color: #fff; background: #152c47; border-color: #3874da; }
html[data-theme="dark"] .contribution-tabs button.active {
  background: linear-gradient(135deg, #236dff, #1148ba);
  border-color: #377cff;
  box-shadow: 0 12px 26px rgba(22, 91, 243, .28), inset 0 1px rgba(255, 255, 255, .16);
}
html[data-theme="dark"] .contribution-tabs button.active small { color: #dce9ff; }
html[data-theme="dark"] .contribution-workspace [data-contribution-panel="manual"] {
  padding: 4px 20px 0;
}
html[data-theme="dark"] .contribution-workspace .section-heading-row h2 { color: #f2f7ff; }
html[data-theme="dark"] .contribution-workspace .form-control,
html[data-theme="dark"] .contribution-workspace .form-select,
html[data-theme="dark"] .contribution-route-row .form-control,
html[data-theme="dark"] .contribution-route-row .form-select {
  color: #e5efff;
  background: #0d1b2b !important;
  border-color: #2a405a !important;
}
html[data-theme="dark"] .contribution-workspace .form-control::placeholder { color: #7187a1; opacity: 1; }
html[data-theme="dark"] .contribution-field > span,
html[data-theme="dark"] .contribution-route-labels { color: #aebfd5; }
html[data-theme="dark"] .contribute-scope,
html[data-theme="dark"] .contribute-scope-options label,
html[data-theme="dark"] .submission-item {
  color: #dce8f8;
  background: #0d1b2b;
  border-color: #2a405a;
}
html[data-theme="dark"] .route-extra-fields summary { color: #c9d9ef; background: #0d1b2b; border-color: #2a405a; }
html[data-theme="dark"] .profile-page .social-panel { background: linear-gradient(145deg, #0e1f32, #091726) !important; }
@media (max-width: 767.98px) {
  html[data-theme="dark"] .profile-page .profile-hero { padding: 28px 22px; }
  html[data-theme="dark"] .contribution-workspace [data-contribution-panel="manual"] { padding: 4px 0 0; }
}

/* Contribution workspace — light theme */
html[data-theme="light"] .contribution-workspace {
  padding: 20px !important;
  background: linear-gradient(145deg, #ffffff, #f6f9ff) !important;
  border-color: #d7e3f4 !important;
  box-shadow: 0 18px 44px rgba(34, 73, 130, .09);
}
html[data-theme="light"] .contribution-tabs {
  gap: 14px;
  padding: 0;
  background: transparent;
  border: 0;
}
html[data-theme="light"] .contribution-tabs button {
  min-height: 88px;
  justify-content: flex-start;
  padding: 18px 22px;
  color: #173769;
  background: #fff;
  border-color: #cfddf1;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(42, 82, 140, .04);
}
html[data-theme="light"] .contribution-tabs button > i {
  flex: 0 0 auto;
  color: #2768e9;
  font-size: 1.25rem;
}
html[data-theme="light"] .contribution-tabs button > span {
  display: grid;
  gap: 5px;
  min-width: 0;
  text-align: left;
  line-height: 1.12;
}
html[data-theme="light"] .contribution-tabs button small {
  color: #6c7f9d;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.25;
}
html[data-theme="light"] .contribution-tabs button:hover {
  color: #1658d5;
  background: #f4f8ff;
  border-color: #8eb6ff;
}
html[data-theme="light"] .contribution-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #2e70ee, #1c5bd8);
  border-color: #2a68e4;
  box-shadow: 0 12px 24px rgba(32, 94, 219, .2);
}
html[data-theme="light"] .contribution-tabs button.active > i,
html[data-theme="light"] .contribution-tabs button.active small { color: #e8f0ff; }
html[data-theme="light"] .contribution-workspace [data-contribution-panel="manual"] { padding: 4px 20px 0; }
html[data-theme="light"] .profile-page .profile-hero {
  background: linear-gradient(110deg, #fff, #f4f8ff) !important;
  border-color: #dbe6f5 !important;
}
html[data-theme="light"] .profile-page .social-avatar-fallback {
  color: #2768e9;
  background: #e9f1ff;
  border: 1px solid #d3e2fd;
}
@media (max-width: 767.98px) {
  html[data-theme="light"] .contribution-workspace [data-contribution-panel="manual"] { padding: 4px 0 0; }
}

/* Route details: semantic colors keep climbing information easy to scan. */
html[data-theme="dark"] .via-detail-page .detail-breadcrumb { color: #8ca3c0; }
html[data-theme="dark"] .via-detail-page .detail-breadcrumb a { color: #78aaff; }
html[data-theme="dark"] .via-detail-page .area-copy h1 { color: #f5f8ff; }
html[data-theme="dark"] .via-detail-page .detail-location { color: #e1e9f6; }
html[data-theme="dark"] .via-detail-page .detail-location i { color: #367aff; }
html[data-theme="dark"] .via-detail-page .route-number {
  color: #69a0ff;
  background: linear-gradient(145deg, #153f80, #112846);
  border-color: #2c62af;
}
html[data-theme="dark"] .via-detail-page .detail-pills { gap: 12px; }
html[data-theme="dark"] .via-detail-page .detail-pills .via-pill {
  color: #b9d1fb;
  background: #0e2136;
  border: 1px solid #29486d;
  box-shadow: none;
}
html[data-theme="dark"] .via-detail-page .detail-pills .via-pill-grade {
  color: #6ea7ff;
  border-color: #2361be;
  background: rgba(21, 80, 171, .16);
}
html[data-theme="dark"] .via-detail-page .detail-pills .via-pill-system {
  color: #d48cff;
  border-color: #7034a0;
  background: rgba(106, 39, 147, .16);
}
html[data-theme="dark"] .via-detail-page .detail-pills .via-pill-modality {
  color: #73e6a0;
  border-color: #218457;
  background: rgba(20, 116, 72, .16);
}
html[data-theme="dark"] .via-detail-page .detail-pills .via-pill-protection,
html[data-theme="dark"] .via-detail-page .detail-pills .via-pill-exposure {
  color: #ffab4b;
  border-color: #9d5a0b;
  background: rgba(155, 83, 3, .16);
}
html[data-theme="dark"] .via-detail-page .filters-bar .form-select,
html[data-theme="dark"] .via-detail-page .via-grade-opinion-form .form-select {
  color: #e7effb;
  background: #0d1d2d;
  border-color: #2c425c;
}
html[data-theme="dark"] .via-detail-page .via-grade-opinion-card,
html[data-theme="dark"] .via-detail-page .info-card,
html[data-theme="dark"] .via-detail-page .media-panel,
html[data-theme="dark"] .via-detail-page .via-register-card {
  background: linear-gradient(145deg, #112338, #0b1928) !important;
  border-color: #273f59 !important;
}
html[data-theme="dark"] .via-detail-page .via-grade-opinion-result > i,
html[data-theme="dark"] .via-detail-page .info-card > i { color: #4d89ff; }
html[data-theme="dark"] .via-detail-page .via-grade-opinion-result strong,
html[data-theme="dark"] .via-detail-page .via-grade-opinion-form label { color: #eaf2ff; }
html[data-theme="dark"] .via-detail-page .via-grade-opinion-result small,
html[data-theme="dark"] .via-detail-page .via-grade-opinion-result span,
html[data-theme="dark"] .via-detail-page .via-grade-system-hint { color: #9eb1c9; }

/* Peak and sector details share the route page's semantic dark palette. */
html[data-theme="dark"] .pico-detail-page .detail-breadcrumb,
html[data-theme="dark"] .sector-detail-page .detail-breadcrumb { color: #8ca3c0; }
html[data-theme="dark"] .pico-detail-page .detail-breadcrumb a,
html[data-theme="dark"] .sector-detail-page .detail-breadcrumb a { color: #78aaff; }
html[data-theme="dark"] .pico-detail-page .area-copy h1,
html[data-theme="dark"] .sector-detail-page .area-copy h1 { color: #f5f8ff; }
html[data-theme="dark"] .pico-detail-page .detail-location,
html[data-theme="dark"] .sector-detail-page .detail-location { color: #e1e9f6; }
html[data-theme="dark"] .pico-detail-page .detail-location i,
html[data-theme="dark"] .sector-detail-page .detail-location i { color: #367aff; }
html[data-theme="dark"] .pico-detail-page .detail-pills .peak-pill,
html[data-theme="dark"] .sector-detail-page .detail-pills .sector-pill {
  color: #b9d1fb;
  background: #0e2136;
  border: 1px solid #29486d;
}
html[data-theme="dark"] .pico-detail-page .peak-pill-routes,
html[data-theme="dark"] .sector-detail-page .sector-pill-routes {
  color: #6ea7ff;
  background: rgba(21, 80, 171, .16);
  border-color: #2361be;
}
html[data-theme="dark"] .pico-detail-page .peak-pill-sectors,
html[data-theme="dark"] .pico-detail-page .peak-pill-sectors {
  color: #d48cff;
  background: rgba(106, 39, 147, .16);
  border-color: #7034a0;
}
html[data-theme="dark"] .pico-detail-page .peak-pill-altitude {
  color: #ffab4b;
  background: rgba(155, 83, 3, .16);
  border-color: #9d5a0b;
}
html[data-theme="dark"] .pico-detail-page .peak-pill-modality {
  color: #73e6a0;
  background: rgba(20, 116, 72, .16);
  border-color: #218457;
}
html[data-theme="dark"] .pico-detail-page .info-card,
html[data-theme="dark"] .sector-detail-page .info-card,
html[data-theme="dark"] .pico-detail-page .media-panel,
html[data-theme="dark"] .sector-detail-page .sector-topo-layout,
html[data-theme="dark"] .pico-detail-page .sector-topo-layout {
  background: linear-gradient(145deg, #112338, #0b1928) !important;
  border-color: #273f59 !important;
}
html[data-theme="dark"] .pico-detail-page .info-card > i,
html[data-theme="dark"] .sector-detail-page .info-card > i,
html[data-theme="dark"] .pico-detail-page .setor-icon { color: #4d89ff; }
html[data-theme="dark"] .pico-detail-page .setor-mini-card {
  background: linear-gradient(145deg, #102136, #0b1827) !important;
  border-color: #273f59 !important;
}
html[data-theme="dark"] .pico-detail-page .setores-strip { gap: 16px; }
html[data-theme="dark"] .pico-detail-page .setor-mini-card {
  align-items: center;
  min-height: 148px;
  padding: 20px;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
html[data-theme="dark"] .pico-detail-page .setor-mini-card:hover {
  transform: translateY(-3px);
  border-color: #386ec5 !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .22);
}
html[data-theme="dark"] .pico-detail-page .setor-icon {
  width: 62px;
  height: 62px;
  color: #fff;
  background: linear-gradient(145deg, #2c76ff, #154dc7);
  border: 1px solid #3c82ff;
  box-shadow: 0 9px 18px rgba(26, 94, 229, .26);
}
html[data-theme="dark"] .pico-detail-page .setor-icon i { color: #fff; font-size: 1.55rem; }
html[data-theme="dark"] .pico-detail-page .setor-mini-card h3 { color: #f2f7ff; font-size: 1.18rem; }
html[data-theme="dark"] .pico-detail-page .setor-mini-card p { color: #4d89ff !important; font-weight: 800; }
html[data-theme="dark"] .pico-detail-page .setor-mini-card small {
  color: #dbe8fb;
  background: #14263a;
  border-color: #304963;
  font-weight: 800;
}
html[data-theme="dark"] .pico-detail-page .filters-bar .form-select,
html[data-theme="dark"] .pico-detail-page .filters-bar .search-panel {
  color: #e7effb;
  background: #0d1d2d !important;
  border-color: #2c425c !important;
}
html[data-theme="dark"] .sector-detail-page .route-number {
  color: #fff;
  background: linear-gradient(145deg, #1265e8, #0845ad);
  border-color: #2879f5;
  box-shadow: 0 12px 24px rgba(18, 100, 232, .24);
}
html[data-theme="dark"] .sector-detail-page .area-copy > .detail-location:first-of-type {
  color: #f2f7ff !important;
}
html[data-theme="dark"] .sector-detail-page .area-copy > .detail-location:first-of-type a {
  color: #f2f7ff !important;
}
html[data-theme="dark"] .sector-detail-page .detail-pills .sector-pill {
  color: #e5edf9;
  background: linear-gradient(145deg, #142538, #0d1a2a);
  border-color: #2b425b;
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
html[data-theme="dark"] .sector-detail-page .detail-pills .sector-pill-routes,
html[data-theme="dark"] .sector-detail-page .detail-pills .sector-pill-sectors {
  color: #e5edf9;
  background: linear-gradient(145deg, #142538, #0d1a2a);
  border-color: #2b425b;
}
html[data-theme="dark"] .sector-detail-page .btn-outline-accent,
html[data-theme="dark"] .sector-detail-page [data-offline-sector-btn] {
  color: #4e8cff;
  border-color: #2464bf;
  background: rgba(11, 35, 67, .34);
}
html[data-theme="dark"] .sector-detail-page .btn-outline-accent:hover,
html[data-theme="dark"] .sector-detail-page [data-offline-sector-btn]:hover {
  color: #fff;
  background: #1d62d8;
  border-color: #3f7ff1;
}

/* Route lists on peak and sector pages */
html[data-theme="dark"] .pico-detail-page .route-card,
html[data-theme="dark"] .sector-detail-page .route-card {
  padding: 18px 20px;
  background: linear-gradient(100deg, #102238, #0b1929) !important;
  border-color: #273f59 !important;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}
html[data-theme="dark"] .pico-detail-page .route-card:hover,
html[data-theme="dark"] .sector-detail-page .route-card:hover {
  border-color: #356dc2 !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .23);
}
html[data-theme="dark"] .pico-detail-page .route-card .route-content,
html[data-theme="dark"] .sector-detail-page .route-card .route-content {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) 48px minmax(300px, .9fr) auto;
  align-items: center;
  gap: 18px;
}
html[data-theme="dark"] .pico-detail-page .route-card .route-content > .d-flex,
html[data-theme="dark"] .sector-detail-page .route-card .route-content > .d-flex { display: contents !important; }
html[data-theme="dark"] .pico-detail-page .route-card .route-content > .d-flex > div,
html[data-theme="dark"] .sector-detail-page .route-card .route-content > .d-flex > div { min-width: 0; }
html[data-theme="dark"] .pico-detail-page .route-card .route-content h3,
html[data-theme="dark"] .sector-detail-page .route-card .route-content h3 {
  margin: 0 0 5px;
  color: #f3f7ff;
  font-size: 1.2rem;
}
html[data-theme="dark"] .pico-detail-page .route-card .route-content p,
html[data-theme="dark"] .sector-detail-page .route-card .route-content p { margin: 0; color: #a8bad1; }
html[data-theme="dark"] .pico-detail-page .route-inline-number,
html[data-theme="dark"] .sector-detail-page .route-inline-number {
  color: #61a0ff;
  background: #122e5d;
  border-color: #234f9b;
}
html[data-theme="dark"] .pico-detail-page .route-card .favorite-btn.static,
html[data-theme="dark"] .sector-detail-page .route-card .favorite-btn.static {
  position: static;
  width: 48px;
  height: 48px;
  color: #e4eefb;
  background: #0e2033;
  border: 1px solid #2a425c;
  border-radius: 10px;
}
html[data-theme="dark"] .pico-detail-page .route-card .route-facts,
html[data-theme="dark"] .sector-detail-page .route-card .route-facts {
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 0;
  padding: 0;
  margin: 0;
  overflow: visible;
  border: 0;
}
html[data-theme="dark"] .pico-detail-page .route-card .route-facts span,
html[data-theme="dark"] .sector-detail-page .route-card .route-facts span {
  min-width: 0;
  padding: 0 14px;
  color: #4d89ff;
  font-size: 1.02rem;
  font-weight: 850;
  border-left: 1px solid #29415c;
}
html[data-theme="dark"] .pico-detail-page .route-card .route-facts small,
html[data-theme="dark"] .sector-detail-page .route-card .route-facts small {
  margin-bottom: 5px;
  color: #9cafc8;
  font-size: .7rem;
  font-weight: 800;
}
html[data-theme="dark"] .pico-detail-page .route-card .btn-accent,
html[data-theme="dark"] .sector-detail-page .route-card .btn-accent {
  white-space: nowrap;
  padding: 12px 18px;
  background: linear-gradient(135deg, #236dff, #174fca) !important;
  border-color: #2d70f2 !important;
}
@media (max-width: 991.98px) {
  html[data-theme="dark"] .pico-detail-page .route-card .route-content,
  html[data-theme="dark"] .sector-detail-page .route-card .route-content {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  html[data-theme="dark"] .pico-detail-page .route-card .route-facts,
  html[data-theme="dark"] .sector-detail-page .route-card .route-facts,
  html[data-theme="dark"] .pico-detail-page .route-card .btn-accent,
  html[data-theme="dark"] .sector-detail-page .route-card .btn-accent { grid-column: 1 / -1; }
}

/* Keep peak-sector cards compact and legible. */
html[data-theme="dark"] .pico-detail-page .setores-strip .setor-mini-card {
  box-sizing: border-box;
  min-height: 0;
  height: 148px;
  padding: 18px;
  gap: 16px;
}
html[data-theme="dark"] .pico-detail-page .setores-strip .setor-icon {
  width: 58px;
  height: 58px;
  background: linear-gradient(145deg, #2c76ff, #154dc7) !important;
}
html[data-theme="dark"] .pico-detail-page .setores-strip .setor-icon i {
  color: #fff !important;
  opacity: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .22);
}
html[data-theme="dark"] .pico-detail-page .setores-strip .setor-mini-card > div {
  align-self: center;
}
@media (max-width: 767.98px) {
  html[data-theme="dark"] .pico-detail-page .setores-strip .setor-mini-card { height: auto; min-height: 132px; }
}
 .language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  font-size: .85rem;
}
.language-switcher select {
  border: 1px solid rgba(127, 143, 164, .35);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  padding: 6px 8px;
  font-size: .8rem;
}
.language-switcher option { color: #172033; }
.language-switcher-mobile { justify-content: space-between; width: 100%; }
