/* =========================================================
   DON RUTERO — Sistema de Rutas de Transporte Mazatlán
   Diseño UI/UX Premium • Mapa Fullscreen + Paneles Flotantes
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ---------------------------------------------------------
   DESIGN TOKENS (Colores tomados del logo SVG del usuario)
   --------------------------------------------------------- */
:root {
    /* Paleta principal — anclada al logo Don Rutero (#FF4B2B coral + #1D3557 marino) */
    --primary-dark:   #1D3557;  /* Azul marino del pin y "Don" */
    --primary:        #E63E21;  /* Rojo-naranja del camión y "Rutero" */
    --primary-hover:  #CC3217;
    --primary-light:  rgba(230, 62, 33, 0.08);
    --primary-glow:   rgba(230, 62, 33, 0.16);

    --coral:          #FF4B2B;
    --coral-light:    rgba(255, 75, 43, 0.10);
    --coral-hover:    #E03A1B;

    --accent:         #E63E21;
    --accent-hover:   #CC3217;
    --accent-light:   rgba(230, 62, 33, 0.10);

    --navy:           #1D3557;
    --navy-light:     rgba(29, 53, 87, 0.08);

    --success:        #059669;
    --success-light:  rgba(5, 150, 105, 0.10);
    --danger:         #DC2626;
    --danger-hover:   #B91C1C;
    --warning:        #D97706;

    --bg-body:        #F4F6F9;
    --bg-surface:     #F8FAFC;
    --bg-white:       #FFFFFF;
    --bg-card:        #FFFFFF;
    --bg-card-hover:  #F8FAFC;
    --bg-overlay:     rgba(15, 23, 42, 0.52);

    --text-primary:   #0F172A;
    --text-dark:      #0F172A;
    --text-secondary: #475569;
    --text-muted:     #64748B;
    --text-on-primary:#FFFFFF;

    --border:         #E2E8F0;
    --border-light:   #F1F5F9;
    --border-hover:   #CBD5E1;

    --font-heading:   'Space Grotesk', sans-serif;
    --font-body:      'Plus Jakarta Sans', sans-serif;

    --shadow-sm:      0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md:      0 4px 12px rgba(15, 23, 42, 0.07);
    --shadow-lg:      0 10px 30px rgba(15, 23, 42, 0.10);
    --shadow-xl:      0 20px 48px rgba(15, 23, 42, 0.14);

    --radius-sm:      8px;
    --radius-md:      12px;
    --radius-lg:      16px;
    --radius-xl:      20px;
    --radius-full:    9999px;

    --transition:     all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------------------------------------------------------
   RESET & BASE
   --------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-body);
    color: var(--text-primary);
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }
button { cursor: pointer; font-family: var(--font-body); }
a { text-decoration: none; }

/* ---------------------------------------------------------
   LAYOUT: FULL-SCREEN MAP
   --------------------------------------------------------- */
.app-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}

.map-container, #map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ---------------------------------------------------------
   TOP NAVBAR (anclada estilo app de tránsito)
   --------------------------------------------------------- */
.top-navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.99);
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 0 16px;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
    gap: 12px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.navbar-logo {
    height: 44px;
    width: auto;
}

.navbar-city-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}
.navbar-city-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--coral);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Switcher compacto de idioma (ES / EN) */
.lang-switch-group {
    display: inline-flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 2px;
    gap: 2px;
    flex-shrink: 0;
}
.lang-switch-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 4px 7px;
    border-radius: var(--radius-full);
    cursor: pointer;
    line-height: 1.1;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.lang-switch-btn:hover {
    color: var(--primary-dark);
}
.lang-switch-btn.active {
    background: var(--primary-dark);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(29, 53, 87, 0.25);
}

/* Login/Admin buttons in navbar */
.btn-login {
    padding: 8px 15px;
    font-size: 0.82rem;
    border-radius: 8px;
    background: var(--primary);
}
.btn-login:hover { 
    background: var(--primary-hover);
    box-shadow: var(--shadow-sm);
}

.btn-admin {
    padding: 8px 13px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-svg-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

/* ---------------------------------------------------------
   DOCKED SIDEBAR (ESCRITORIO)
   --------------------------------------------------------- */
.sidebar {
    position: absolute;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 372px;
    z-index: 900;
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    border-radius: 0;
    box-shadow: 2px 0 12px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
}

.sidebar.collapsed {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-content::-webkit-scrollbar { width: 4px; }
.sidebar-content::-webkit-scrollbar-track { background: transparent; }
.sidebar-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ---------------------------------------------------------
   SECTION HEADERS, PILLS & TOGGLE
   --------------------------------------------------------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.section-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}
.section-link:hover { opacity: 0.7; }

.filter-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.filter-pills::-webkit-scrollbar {
    display: none;
}

.pill {
    padding: 6px 11px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.pill:hover { 
    border-color: var(--primary); 
    color: var(--primary); 
    background: var(--primary-light);
}
.pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
    box-shadow: var(--shadow-sm);
}
.pill-icon-svg {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-right: 4px;
    transition: var(--transition);
}
.pill.active .pill-icon-svg {
    filter: brightness(0) invert(1);
}

/* Botón Sugerir o Agregar Ruta en Sidebar */
.btn-suggest-route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1.5px dashed var(--border-hover);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 2px;
    margin-bottom: 4px;
}
.btn-suggest-route:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}
.btn-suggest-route img {
    width: 15px;
    height: 15px;
}

/* Toggle Lugares Compacto en Header */
.toggle-lugares-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-body);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    width: 34px;
    height: 18px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--border);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    padding: 0 2px;
}

.toggle-switch.active {
    background: var(--success);
}

.toggle-knob {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.toggle-switch.active .toggle-knob {
    transform: translateX(16px);
}

/* ---------------------------------------------------------
   SEARCH INPUT
   --------------------------------------------------------- */
.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: var(--bg-body);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon-svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.input-clear-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

/* ---------------------------------------------------------
   AUTOCOMPLETE SEARCH DROPDOWN
   --------------------------------------------------------- */
.search-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-white, #ffffff);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    max-height: 340px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}
.search-suggestion-item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.search-suggestion-item:last-child {
    border-bottom: none;
}
.search-suggestion-item:hover {
    background: #f8fafc;
    padding-left: 18px;
}
.suggestion-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.suggestion-icon img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}
.suggestion-content {
    flex: 1;
    min-width: 0;
}
.suggestion-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: normal;
    line-height: 1.3;
}
.suggestion-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: normal;
    line-height: 1.3;
}
.suggestion-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-block;
}

/* ---------------------------------------------------------
   SIDEBAR MODE SWITCHER (Rutas vs ¿Cómo Llego?)
   --------------------------------------------------------- */
.sidebar-mode-switcher {
    display: flex;
    background: var(--bg-body, #f1f5f9);
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    border: 1.5px solid var(--border-light);
}
.mode-tab-btn {
    flex: 1;
    padding: 9px 12px;
    border: none;
    background: transparent;
    border-radius: calc(var(--radius-md) - 3px);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.mode-tab-btn.active {
    background: var(--bg-white, #ffffff);
    color: var(--primary, #2563eb);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.mode-tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.5);
}

/* ---------------------------------------------------------
   ROUTE CARDS
   --------------------------------------------------------- */
.route-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-white);
    overflow: hidden;
}

.route-card {
    background: var(--bg-white);
    border: none;
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    padding: 12px 14px 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 11px;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}
.route-card:last-child {
    border-bottom: none;
}

.route-card.trip-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
}

.route-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--card-accent, var(--primary));
    opacity: 0.85;
    transition: var(--transition);
}

.route-card:hover {
    background: var(--bg-surface);
}
.route-card:hover::before,
.route-card.active::before { opacity: 1; }

.route-card.active {
    background: rgba(230, 62, 33, 0.05);
}

.route-indicator {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

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

.route-card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.route-name {
    font-family: var(--font-heading);
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.route-fare {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.route-fare-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
    flex-shrink: 0;
}
.route-fare-student {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--success);
    font-variant-numeric: tabular-nums;
}
.route-fare.student-active {
    color: var(--success);
}
.fav-route-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}
.fav-route-btn:hover {
    background: var(--bg-surface);
    color: #F59E0B;
    border-color: var(--border);
}
.fav-route-btn.is-fav {
    color: #F59E0B;
}
.fav-route-btn.is-fav svg {
    fill: #F59E0B;
    stroke: #D97706;
}
.qr-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}
.qr-action-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}
.popup-qr-btn {
    margin-top: 8px;
    width: 100%;
    padding: 6px 10px;
    border-radius: 7px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.popup-qr-btn:hover {
    background: #fff5f3;
    border-color: #E63E21;
    color: #E63E21;
}
.qr-totem-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}
.qr-totem-bar {
    height: 8px;
    width: 100%;
    background: var(--primary);
}
.qr-totem-body {
    padding: 14px 16px;
    text-align: center;
}
.qr-entity-kind {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-bottom: 6px;
}
.qr-entity-title {
    margin: 0 0 3px 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.qr-entity-meta {
    margin: 0 0 12px 0;
    font-size: 0.76rem;
    color: var(--text-secondary);
}
.qr-totem-canvas-wrap {
    display: inline-flex;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.qr-url-box {
    display: block;
    margin: 10px 0 0 0;
    padding: 5px 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.69rem;
    color: var(--text-secondary);
    text-decoration: none;
    word-break: break-all;
}
.qr-url-box:hover {
    color: var(--primary);
    border-color: var(--primary);
}
.qr-localhost-note {
    margin: 0 0 12px 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
    text-align: center;
}
.qr-modal-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ---------------------------------------------------------
   APARTADO DE DONACIONES ("APOYAR PROYECTO")
   --------------------------------------------------------- */
.btn-donate-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(230, 62, 33, 0.28);
    background: var(--primary-light);
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    flex-shrink: 0;
}
.btn-donate-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}
.menu-item-donate {
    margin-top: 4px;
    border: 1px solid rgba(230, 62, 33, 0.22);
    background: rgba(230, 62, 33, 0.04);
}
.menu-item-donate:hover {
    background: var(--primary-light);
}
.donate-icon {
    color: var(--primary);
    background: #ffffff;
}
.donate-modal-badge {
    background: var(--primary-light);
    color: var(--primary);
}
.donate-spei-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}
.donate-spei-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.donate-spei-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-primary);
}
.donate-bank-pill {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--navy);
}
.donate-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.76rem;
}
.donate-detail-label {
    font-size: 0.69rem;
    font-weight: 600;
    color: var(--text-muted);
}
.donate-detail-value {
    font-weight: 700;
    color: var(--text-primary);
}
.donate-copy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.donate-code-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.03em;
    word-break: break-all;
}
.donate-copy-btn {
    padding: 5px 11px;
    font-size: 0.72rem;
    flex-shrink: 0;
}
.donate-config-hint {
    margin: 10px 0 0 0;
    padding: 7px 9px;
    border-radius: var(--radius-sm);
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
    font-size: 0.7rem;
    line-height: 1.4;
}

/* ---------------------------------------------------------
   MODO "VOY A BORDO" (HUD INTERIOR EN RUTA)
   --------------------------------------------------------- */
.btn-onboard-start {
    margin-top: 10px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: #0F172A;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background 0.16s ease, transform 0.12s ease;
}
.btn-onboard-start:hover {
    background: #1E293B;
}
.btn-onboard-start:active {
    transform: scale(0.985);
}

.onboard-hud {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: min(390px, calc(100vw - 40px));
    background: rgba(255, 255, 255, 0.98);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    border: 1px solid var(--border);
    overflow: hidden;
    z-index: 950;
}
.onboard-route-bar {
    height: 5px;
    width: 100%;
    background: var(--primary);
}
.onboard-hud-inner {
    padding: 12px 14px 11px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.onboard-hud-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.onboard-status-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}
.onboard-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
    flex-shrink: 0;
}
.onboard-mode-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #059669;
    background: #ECFDF5;
    padding: 2px 7px;
    border-radius: 9999px;
}
.onboard-route-name {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.onboard-next-stop {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}
.onboard-next-stop.alert-near {
    color: #D97706;
}
.onboard-alight-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.onboard-close-btn {
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 5px 11px;
    font-size: 0.73rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.onboard-close-btn:hover {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #DC2626;
}
.onboard-progress-track {
    width: 100%;
    height: 6px;
    border-radius: 9999px;
    background: #E2E8F0;
    overflow: hidden;
}
.onboard-progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #10B981, #0284C7);
    transition: width 0.25s linear;
}
.onboard-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.onboard-source-pills,
.onboard-sim-controls {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.onboard-pill {
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    border-radius: 9999px;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}
.onboard-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}
.onboard-ctrl-btn {
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}
.onboard-ctrl-btn:hover {
    background: #E2E8F0;
}

@media (max-width: 768px) {
    .onboard-hud {
        left: 10px;
        right: 10px;
        top: 62px;
        bottom: auto;
        width: auto;
    }
}
.fare-toggle-group {
    display: inline-flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 9999px;
    padding: 2px;
    gap: 2px;
}
.fare-toggle-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 9999px;
    cursor: pointer;
    transition: var(--transition);
}
.fare-toggle-btn.active {
    background: var(--bg-white);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.fare-toggle-btn[data-fare-mode="student"].active {
    background: var(--success-light);
    color: var(--success);
}

.route-submeta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.concesionario-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.concesionario-dot.alianza { background: #16A34A; }
.concesionario-dot.aguilas { background: #DC2626; }

.route-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.route-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.route-meta-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-body);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.route-meta-tag .tag-icon {
    width: 14px; height: 14px;
}

.route-meta-tag.price {
    color: var(--success);
    background: var(--success-light);
    font-weight: 700;
}

/* ---------------------------------------------------------
   DETAIL PANEL
   --------------------------------------------------------- */
.detail-panel {
    display: none;
    flex-direction: column;
    gap: 16px;
}
.detail-panel.visible { display: flex; }

.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.detail-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.detail-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.stops-timeline {
    position: relative;
    padding-left: 24px;
    margin-top: 4px;
}
.stops-timeline::before {
    content: '';
    position: absolute;
    left: 7px; top: 6px; bottom: 6px;
    width: 2px;
    background: var(--border);
}

.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -22px; top: 4px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 2.5px solid var(--primary);
}

.timeline-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ---------------------------------------------------------
   BUTTONS
   --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-on-primary);
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
}
.btn:disabled,
.btn.is-loading {
    opacity: 0.78;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: currentColor;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    animation: btnSpin 0.7s linear infinite;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

.auth-resend-disabled {
    color: var(--text-muted) !important;
    pointer-events: none;
    cursor: default;
    text-decoration: none !important;
}

.btn-accent {
    background: var(--coral);
    color: var(--text-on-primary);
}
.btn-accent:hover {
    background: var(--coral-hover);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--bg-surface);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--danger);
    color: var(--text-on-primary);
}
.btn-danger:hover {
    background: var(--danger-hover);
    box-shadow: var(--shadow-sm);
}

.btn-danger-outline {
    background: var(--bg-white);
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.28);
}
.btn-danger-outline:hover {
    background: rgba(220, 38, 38, 0.06);
    border-color: var(--danger);
}

.btn-full {
    width: 100%;
}

.btn-icon {
    width: 38px; height: 38px;
    padding: 0;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.btn-icon:hover {
    background: var(--bg-body);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.close-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: var(--bg-body);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.close-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

/* ---------------------------------------------------------
   FAB GEOLOCALIZACIÓN
   --------------------------------------------------------- */
.fab-location {
    position: absolute !important;
    bottom: 20px !important;
    left: 386px !important;
    right: auto !important;
    z-index: 950;
    width: 38px; height: 38px;
    border-radius: 8px !important;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    box-shadow: var(--shadow-md) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s ease, border-color 0.15s ease;
}
.fab-location:hover {
    background: var(--bg-white);
    border-color: var(--primary) !important;
}
body:has(.sidebar.collapsed) .fab-location {
    left: 14px !important;
}

/* ---------------------------------------------------------
   BOTÓN Y LEYENDA DE TRÁFICO EN TIEMPO REAL
   --------------------------------------------------------- */
.fab-traffic {
    position: absolute !important;
    top: 74px !important;
    right: 16px !important;
    z-index: 950;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    box-shadow: var(--shadow-md) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: background 0.15s ease, border-color 0.15s ease, top 0.3s ease, box-shadow 0.15s ease;
}
.fab-traffic:hover {
    background: #ffffff;
    border-color: var(--primary) !important;
}
.fab-traffic.active {
    background: #EFF6FF;
    border-color: #2563EB !important;
    color: #1D4ED8;
}
.traffic-fab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.traffic-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.traffic-status-dot.level-fluido { background: #10B981; }
.traffic-status-dot.level-moderado { background: #F59E0B; }
.traffic-status-dot.level-lento { background: #EF4444; }

.traffic-legend {
    position: absolute;
    top: 120px;
    right: 16px;
    z-index: 945;
    min-width: 205px;
    max-width: 245px;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: var(--shadow-md);
    font-size: 0.74rem;
    color: var(--text-primary);
    transition: top 0.3s ease;
}
.traffic-legend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}
.traffic-legend-speed {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.72rem;
}
.traffic-legend-scale {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.71rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.traffic-legend-scale span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.traffic-legend-scale i {
    width: 9px;
    height: 4px;
    border-radius: 99px;
    display: inline-block;
}
.traffic-legend-source {
    margin-top: 4px;
    font-size: 0.67rem;
    color: var(--text-muted);
}

.trip-traffic-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 700;
}
.trip-traffic-pill.fluido {
    background: #ECFDF5;
    color: #047857;
}
.trip-traffic-pill.moderado {
    background: #FFFBEB;
    color: #B45309;
}
.trip-traffic-pill.lento {
    background: #FEF2F2;
    color: #B91C1C;
}

.trip-traffic-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #F8FAFC;
    border: 1px solid var(--border);
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* ---------------------------------------------------------
   MODAL OVERLAYS
   --------------------------------------------------------- */
.form-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.form-card {
    width: 420px;
    max-width: 92vw;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    animation: slideUp 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.form-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-body);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.form-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }

.form-control {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-body);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-footer { text-align: center; font-size: 0.85rem; color: var(--text-muted); }
.form-footer a { color: var(--primary); font-weight: 600; }
.form-footer a:hover { text-decoration: underline; }

/* ---------------------------------------------------------
   AUTH & MODAL CARDS
   --------------------------------------------------------- */
.auth-card-premium {
    background: var(--bg-white) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-xl) !important;
    padding: 32px 30px 28px 30px !important;
    max-height: 92vh;
    overflow-y: auto;
}

.auth-input-note {
    display: block;
    margin-top: 5px;
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.auth-field-hint {
    margin-top: 6px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    color: #92400E;
    font-size: 0.76rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-typo-btn {
    border: 1px solid #F59E0B;
    background: #ffffff;
    color: #B45309;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}
.auth-typo-btn:hover {
    background: #FEF3C7;
}

.pwd-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.pwd-rule {
    font-size: 0.71rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: #F1F5F9;
    color: #64748B;
    border: 1px solid #E2E8F0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pwd-rule.ok {
    background: #ECFDF5;
    color: #047857;
    border-color: #A7F3D0;
}

.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    margin-bottom: 4px;
}

.auth-icon-badge {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}
.auth-icon-badge img {
    width: 24px;
    height: 24px;
}
.badge-blue {
    background: var(--primary-light);
    border: 1px solid rgba(0, 92, 151, 0.18);
    color: var(--primary);
}
.badge-orange {
    background: var(--coral-light);
    border: 1px solid rgba(232, 74, 39, 0.2);
    color: var(--coral);
}
.badge-cyan {
    background: var(--primary-light);
    border: 1px solid rgba(0, 92, 151, 0.18);
    color: var(--primary);
}

.auth-header h2 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.4px;
}

.auth-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
    opacity: 0.65;
    z-index: 2;
}

.input-with-icon {
    padding-left: 42px !important;
}
.input-with-icon:focus ~ .input-icon,
.input-icon-wrapper:focus-within .input-icon {
    opacity: 1;
    transform: scale(1.1);
}

.auth-error-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1.5px solid rgba(239, 68, 68, 0.35);
    color: #DC2626;
    font-size: 0.85rem;
    font-weight: 600;
    animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
.auth-error-banner img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 600;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-success-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.12);
    border: 1.5px solid rgba(16, 185, 129, 0.35);
    color: #059669;
    font-size: 0.85rem;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}
.auth-success-banner img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}

.auth-link-subtle {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.auth-link-subtle:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.verification-input {
    text-align: center;
    font-size: 1.5rem !important;
    letter-spacing: 8px !important;
    font-weight: 800 !important;
    font-family: monospace, var(--font-heading);
    color: var(--primary-dark) !important;
    padding: 14px !important;
    border: 2px solid var(--border) !important;
}
.verification-input:focus {
    border-color: #00A8CC !important;
    box-shadow: 0 0 0 4px rgba(0, 168, 204, 0.2) !important;
}

/* ---------------------------------------------------------
   ADMIN-SPECIFIC
   --------------------------------------------------------- */
.admin-header-actions { display: flex; gap: 8px; margin-top: 8px; }

.admin-tool-indicator {
    padding: 12px 14px;
    background: var(--primary-light);
    border: 1.5px solid rgba(0, 92, 151, 0.2);
    border-radius: var(--radius-md);
    color: var(--primary-dark);
    font-size: 0.82rem;
    line-height: 1.5;
    display: none;
}
.admin-tool-indicator.visible { display: block; }

.route-actions-btn {
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--bg-white);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}
.route-actions-btn:hover { background: var(--bg-body); color: var(--text-primary); border-color: var(--border-hover); }

/* ---------------------------------------------------------
   TOAST
   --------------------------------------------------------- */
.toast {
    position: fixed;
    bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(80px);
    z-index: 3000;
    background: var(--text-primary);
    color: var(--text-on-primary);
    padding: 14px 28px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl);
    font-size: 0.88rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.error { background: var(--danger); }

/* ---------------------------------------------------------
   LEAFLET CUSTOMIZATIONS
   --------------------------------------------------------- */
/* Posicionamiento flotante a la izquierda de controles Leaflet (Superior Izquierda) */
.leaflet-top.leaflet-left {
    left: 386px !important;
    top: 74px !important;
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), top 0.3s ease;
    z-index: 950;
}
body:has(.sidebar.collapsed) .leaflet-top.leaflet-left {
    left: 14px !important;
}

.leaflet-bar {
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    box-shadow: var(--shadow-md) !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    background: #ffffff !important;
}
.leaflet-bar a {
    background: transparent !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border) !important;
    transition: var(--transition);
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}
.leaflet-bar a:hover {
    background: var(--bg-body) !important;
    color: var(--primary) !important;
}

.rutero-map-label {
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid var(--border-hover) !important;
    border-radius: 6px !important;
    color: var(--text-primary) !important;
    font-family: var(--font-heading) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18) !important;
    white-space: nowrap !important;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rutero-map-label::before {
    border-top-color: rgba(255, 255, 255, 0.96) !important;
}

.leaflet-popup-content-wrapper {
    background: var(--bg-white) !important;
    border: 1px solid var(--border);
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
}
.leaflet-popup-tip { background: var(--bg-white) !important; }

/* User badge */
.user-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--navy-light);
    border: 1px solid rgba(29, 53, 87, 0.16);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-dark);
    cursor: pointer;
    transition: var(--transition);
}
.user-badge:hover { background: rgba(29, 53, 87, 0.14); }

/* =========================================================
   MENÚ PRINCIPAL (DRAWER LATERAL ESTILO FIGMA)
   ========================================================= */
.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.main-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    z-index: 2000;
    box-shadow: var(--shadow-xl);
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
.main-menu-drawer.open {
    transform: translateX(0);
}

.menu-header {
    padding: 20px 20px 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
}

.menu-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-icon-round {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-body);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}
.btn-icon-round:hover {
    background: var(--border);
    color: var(--text-primary);
}

.menu-items-list {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-item {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}
.menu-item:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.menu-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    transition: var(--transition);
}
.menu-item:hover .menu-item-icon {
    background: var(--primary-light);
}
.menu-item-icon img {
    width: 17px;
    height: 17px;
}

.menu-footer-section {
    padding: 14px 16px 18px 16px;
    border-top: 1px solid var(--border-light);
    background: transparent;
}

.menu-auth-card {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}
.menu-auth-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.menu-auth-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    flex-shrink: 0;
}

.menu-auth-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-auth-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.menu-auth-subtitle {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Badges de identificación de concesionarios */
.route-line-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.route-line-badge.alianza {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.route-line-badge.aguilas {
    background: rgba(239, 68, 68, 0.12);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.menu-footer-version {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.4px;
    line-height: 1.45;
    margin-top: 14px;
}

.sidebar-legal-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.sidebar-legal-copy {
    font-weight: 700;
    color: var(--text-secondary);
}

.sidebar-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 2px;
}

.sidebar-legal-link,
.auth-legal-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sidebar-legal-link:hover,
.auth-legal-link:hover {
    color: var(--primary-dark);
}

.auth-legal-note {
    margin: 4px 0 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* ---------------------------------------------------------
   PLANNER, NOTIFICATIONS & ADMIN CLEAN COMPONENTS
   --------------------------------------------------------- */
.planner-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.planner-title {
    margin: 0 0 6px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.planner-subtitle {
    margin: 0 0 14px 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
}
.planner-field {
    position: relative;
    margin-bottom: 12px;
}
.planner-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}
.planner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.planner-dot.origin { background: var(--success); }
.planner-dot.destination { background: var(--danger); }

/* Accesos rápidos a lugares clave turísticos en "¿Cómo Llego?" */
.tourist-spots-block {
    margin: 0 0 14px 0;
}
.tourist-spots-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.tourist-spots-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}
.tourist-spots-hint {
    font-size: 0.67rem;
    color: var(--text-muted);
    font-weight: 500;
}
.tourist-quick-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 2px 6px 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}
.tourist-quick-chips::-webkit-scrollbar {
    height: 4px;
}
.tourist-quick-chips::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-full);
}
.tourist-chip {
    flex-shrink: 0;
    white-space: nowrap;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    border-radius: var(--radius-full);
    padding: 5px 11px;
    font-size: 0.74rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.tourist-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.tourist-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(230, 62, 33, 0.25);
}

/* Preferencias de caminata y tabs de orden en "¿Cómo Llego?" */
.trip-prefs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 12px 0;
}
.trip-prefs-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}
.trip-radius-pills {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 3px;
}
.trip-radius-pill {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.71rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}
.trip-radius-pill:hover {
    color: var(--primary);
}
.trip-radius-pill.active {
    background: var(--primary-dark);
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(29, 53, 87, 0.22);
}

.trip-sort-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 10px;
}
.trip-sort-tab {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.73rem;
    font-weight: 700;
    padding: 7px 6px;
    border-radius: calc(var(--radius-md) - 2px);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.trip-sort-tab.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.nearby-radius-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}
.nearby-radius-chip {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.15s ease;
}
.nearby-radius-chip.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
}

/* Botón y barra de comparación multi-ruta + insignia verificada */
.section-header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.compare-mode-btn {
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: var(--radius-full);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.16s ease;
}
.compare-mode-btn:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}
.compare-mode-btn.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(29, 53, 87, 0.22);
}

.compare-routes-bar {
    background: rgba(29, 53, 87, 0.05);
    border: 1px solid rgba(29, 53, 87, 0.16);
    border-radius: var(--radius-md);
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.compare-bar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.compare-bar-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--primary-dark);
}
.compare-mini-btn {
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.69rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    cursor: pointer;
}
.compare-mini-btn.is-exit {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
}
.compare-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.compare-chip-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 3px 8px;
    font-size: 0.71rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
}
.compare-card-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-size: 0.66rem;
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
}
.route-card.is-compared {
    background: rgba(29, 53, 87, 0.04);
    box-shadow: 0 0 0 1.5px var(--primary-dark) inset;
}
.route-card.is-compared .compare-card-pill {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
}

.route-meta-tag.verified-badge {
    background: #F0FDF4;
    color: #166534;
    border-color: #BBF7D0;
    font-weight: 700;
}

.notice-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.notice-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notice-icon img { width: 15px; height: 15px; }
.notice-icon.success { background: var(--success-light); }
.notice-icon.danger { background: rgba(220, 38, 38, 0.1); }
.notice-icon.info { background: var(--primary-light); }
.notice-title {
    margin: 0 0 3px 0;
    font-size: 0.88rem;
    color: var(--text-primary);
    font-weight: 700;
}
.notice-body {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.notice-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 5px;
    display: block;
}

.admin-sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.admin-brand-icon img { width: 16px; height: 16px; }
.admin-brand-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}
.admin-studio-box {
    background: var(--bg-surface);
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-size: 0.82rem;
}
.admin-studio-counter {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}
.admin-studio-hint {
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.4;
}
.admin-sequence-box {
    margin-top: 6px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 12px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.admin-stat-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}
.admin-stat-btn {
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
.admin-stat-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.admin-stat-btn.has-warning {
    border-color: rgba(217, 119, 6, 0.35);
    background: rgba(245, 158, 11, 0.08);
}
.admin-stat-btn.has-warning .admin-stat-val {
    color: #b45309;
}
.admin-stat-val {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}
.admin-stat-lbl {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.admin-filter-input {
    padding: 8px 11px !important;
    font-size: 0.82rem !important;
}
.admin-filter-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.admin-chip {
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 9999px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
.admin-chip:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}
.admin-chip.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.admin-status-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.admin-status-badge.active {
    background: #dcfce7;
    color: #15803d;
}
.admin-status-badge.inactive {
    background: #f1f5f9;
    color: #64748b;
}
.admin-meta-line {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.admin-meta-warn {
    color: #b45309;
    font-weight: 600;
}
.route-card.is-inactive {
    opacity: 0.76;
    border-style: dashed;
}
.route-card.is-inactive:hover,
.route-card.is-inactive.active {
    opacity: 1;
}

.stop-mode-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    background: var(--primary-light);
    border: 1.5px solid rgba(0, 92, 151, 0.28);
    border-radius: var(--radius-sm);
}
#map.stop-placement-cursor {
    cursor: crosshair !important;
}

.admin-stop-card {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
}
.admin-stop-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-surface);
}
.admin-stop-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

/* Clustering personalizado de paradas (L.markercluster) */
.rutero-cluster-wrapper {
    background: transparent !important;
    border: none !important;
    will-change: transform;
    contain: layout style;
}
.physical-stop-marker {
    will-change: transform;
    contain: layout style;
}
.rutero-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
    transition: transform 0.15s ease;
}
.rutero-cluster:hover {
    transform: scale(1.08);
}
.rutero-cluster-sm {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
    background: #1D3557;
}
.rutero-cluster-md {
    width: 36px;
    height: 36px;
    font-size: 0.84rem;
    background: #E63E21;
}
.rutero-cluster-lg {
    width: 42px;
    height: 42px;
    font-size: 0.9rem;
    background: #B91C1C;
}

/* Banner de cercanía y badges de distancia en búsqueda de lugares */
.location-status-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--navy-light);
    border: 1px solid rgba(29, 53, 87, 0.2);
    color: var(--text-primary);
    font-size: 0.8rem;
    line-height: 1.4;
}
.location-status-banner.warning {
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.35);
    color: #92400E;
}
.location-status-clear {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 3px 9px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}
.location-status-clear:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: var(--bg-surface);
}
.distance-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.distance-badge.close {
    background: var(--success-light);
    color: var(--success);
}
.distance-badge.medium {
    background: var(--primary-light);
    color: var(--primary);
}
.distance-badge.far {
    background: rgba(217, 119, 6, 0.12);
    color: #B45309;
}

.route-list .location-status-banner {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
}

/* ---------------------------------------------------------
   AJUSTES ESPECÍFICOS PARA EL PANEL DE ADMINISTRACIÓN (ESCRITORIO)
   --------------------------------------------------------- */
.admin-body .sidebar {
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
}
.admin-body .leaflet-top.leaflet-left {
    top: 14px !important;
    left: 386px !important;
}

/* Guía flotante de controles en modo trazado (Admin) */
.studio-controls-hud {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 950;
    width: 280px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: none;
}
.studio-controls-hud.visible {
    display: block;
}
.studio-hud-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
}
.studio-hud-toggle {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}
.studio-hud-toggle:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}
.studio-hud-body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.studio-controls-hud.minimized .studio-hud-body {
    display: none;
}
.studio-controls-hud.minimized {
    width: auto;
}
.studio-hud-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}
.kbd-chip {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--bg-surface);
    border: 1px solid var(--border-hover);
    font-family: var(--font-heading);
    font-size: 0.69rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.admin-panel-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}
.admin-panel-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.admin-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    margin-left: 4px;
    border-radius: 9999px;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
}

.admin-report-card {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 12px 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.admin-report-card:last-child {
    border-bottom: none;
}
.admin-report-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.admin-report-type {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-dark);
    background: var(--primary-light);
    padding: 2px 7px;
    border-radius: 9999px;
}
.admin-report-status {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 9999px;
}
.admin-report-status.status-pendiente { background: #fef3c7; color: #b45309; }
.admin-report-status.status-revision { background: #dbeafe; color: #1d4ed8; }
.admin-report-status.status-resuelto { background: #dcfce7; color: #15803d; }
.admin-report-status.status-descartado { background: #f1f5f9; color: #64748b; }
.admin-report-title {
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--text-primary);
}
.admin-report-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.admin-report-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.admin-report-note {
    font-size: 0.74rem;
    background: var(--bg-surface);
    border-left: 3px solid var(--primary);
    padding: 6px 8px;
    border-radius: 4px;
    color: var(--text-primary);
}
.admin-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}
.admin-report-actions .route-actions-btn {
    font-size: 0.71rem;
    padding: 4px 8px;
}

/* Handle móvil para Bottom Sheet (oculto en escritorio) */
.mobile-sheet-handle {
    display: none;
}

/* ---------------------------------------------------------
   RESPONSIVE & PANTALLAS DIVIDIDAS (SPLIT-SCREEN WINDOWS)
   --------------------------------------------------------- */
@media (max-width: 1024px) {
    .top-navbar { left: 0; right: 0; top: 0; padding: 0 12px; height: 56px; }
    .navbar-city-tag { display: none; }
    body:not(.admin-body) .sidebar { width: 340px; left: 0; right: auto; top: 56px; bottom: 0; max-height: none; border: none; border-right: 1px solid var(--border); border-radius: 0; }
    
    /* Panel Admin compacto y colapsable en pantallas pequeñas o divididas */
    .admin-body .sidebar { 
        top: 10px !important;
        bottom: auto !important;
        left: 10px !important;
        right: 10px !important;
        width: calc(100vw - 20px);
        max-height: min(54dvh, 470px) !important;
    }
    .admin-body .sidebar.admin-collapsed {
        max-height: none !important;
        height: auto !important;
    }
    .admin-body .sidebar.admin-collapsed .sidebar-content {
        display: none;
    }
    .admin-body .admin-panel-toggle {
        display: inline-flex;
    }
    .admin-body .admin-sidebar-header {
        padding: 10px 12px;
        gap: 8px;
    }
    .admin-body .admin-brand-icon {
        width: 28px;
        height: 28px;
    }
    .admin-body .admin-brand-title {
        font-size: 0.92rem;
    }
    .admin-body .sidebar-content {
        padding: 10px 12px 14px;
        gap: 10px;
    }
    .admin-body #user-view-btn {
        padding: 7px 10px;
        font-size: 0.78rem;
    }
    .admin-body .admin-stats-grid {
        gap: 5px;
    }
    .admin-body .admin-stat-pill {
        padding: 6px 4px;
    }
    .admin-body .admin-stat-val {
        font-size: 0.92rem;
    }
    .admin-body .admin-tool-indicator {
        padding: 7px 10px;
        font-size: 0.76rem;
    }
    .admin-body .admin-tool-details {
        display: none !important;
    }
    .admin-body #stop-sequence-list {
        max-height: 140px !important;
    }
    .admin-body .form-card {
        max-width: calc(100vw - 24px);
        max-height: 90dvh;
        overflow-y: auto;
        padding: 18px 16px;
    }
    
    .navbar-logo { height: 36px; }
    .main-menu-drawer { width: calc(100vw - 30px); max-width: 360px; }
    
    .leaflet-top.leaflet-left {
        left: auto !important;
        right: 16px !important;
        top: auto !important;
        bottom: 76px !important;
    }
    .admin-body .leaflet-top.leaflet-left {
        top: auto !important;
        left: auto !important;
        right: 12px !important;
        bottom: 36px !important;
    }
    body:has(.sidebar.collapsed) .leaflet-top.leaflet-left {
        bottom: 76px !important;
    }
    .fab-location {
        left: auto !important;
        right: 16px !important;
        bottom: 20px !important;
    }
    .studio-controls-hud {
        top: auto;
        bottom: 14px;
        left: 12px;
        right: auto;
        width: min(230px, calc(100vw - 74px));
    }
    .studio-controls-hud .studio-hud-row {
        font-size: 0.7rem;
    }
}

/* ---------------------------------------------------------
   MÓVIL (<= 768px): MAPA ARRIBA + BOTTOM SHEET ABAJO
   --------------------------------------------------------- */
@media (max-width: 768px) {
    .top-navbar {
        height: 54px;
        padding: 0 10px;
        gap: 6px;
    }
    .navbar-logo {
        height: 32px;
    }
    .navbar-actions {
        gap: 5px;
    }
    .user-badge {
        max-width: 96px;
        padding: 5px 8px;
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .btn-admin {
        padding: 6px 9px;
        font-size: 0.75rem;
    }
    .btn-login {
        padding: 6px 10px;
        font-size: 0.76rem;
    }
    .btn-icon {
        width: 34px;
        height: 34px;
    }
    .btn-donate-nav {
        width: auto;
        height: 34px;
        padding: 0 10px;
        gap: 5px;
        font-size: 0.75rem;
        justify-content: center;
    }
    .donate-nav-label {
        display: inline;
        white-space: nowrap;
    }

    /* Bottom sheet nativo en vista pública */
    body:not(.admin-body) .sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 41dvh;
        max-height: 86dvh;
        border: none;
        border-top: 1px solid var(--border);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.14);
        transition: height 0.28s cubic-bezier(0.32, 0.72, 0, 1), transform 0.28s ease, opacity 0.22s ease;
    }
    body:not(.admin-body) .sidebar.dragging {
        transition: none !important;
    }
    body:not(.admin-body) .sidebar.sheet-peek {
        height: 132px;
    }
    body:not(.admin-body) .sidebar.sheet-full {
        height: 78dvh;
    }
    body:not(.admin-body) .sidebar.collapsed {
        transform: translateY(105%);
        opacity: 0;
    }

    body:not(.admin-body) .mobile-sheet-handle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        width: 100%;
        padding: 12px 14px 10px;
        cursor: grab;
        flex-shrink: 0;
        touch-action: none;
        user-select: none;
    }
    body:not(.admin-body) .sidebar.dragging .mobile-sheet-handle {
        cursor: grabbing;
    }
    .mobile-sheet-grip {
        width: 44px;
        height: 5px;
        border-radius: 9999px;
        background: var(--border-hover);
    }
    .mobile-sheet-label {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--primary);
        background: var(--primary-light);
        padding: 2px 8px;
        border-radius: 9999px;
    }

    body:not(.admin-body) .sidebar-content {
        padding: 4px 12px 18px;
        gap: 10px;
    }
    body:not(.admin-body) .sidebar-mode-switcher {
        margin-bottom: 8px;
    }
    body:not(.admin-body) .mode-tab-btn {
        padding: 8px 8px;
        font-size: 0.82rem;
    }
    body:not(.admin-body) #main-list-section .section-header {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 0;
    }
    body:not(.admin-body) .section-header-controls {
        margin-left: auto;
        gap: 5px;
    }
    body:not(.admin-body) .compare-mode-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    body:not(.admin-body) .fare-toggle-btn {
        padding: 4px 9px;
        font-size: 0.71rem;
    }
    body:not(.admin-body) .trip-prefs-row {
        flex-wrap: wrap;
        gap: 6px;
    }
    body:not(.admin-body) .detail-pulse-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
    body:not(.admin-body) .search-input {
        padding: 10px 12px 10px 38px;
        font-size: 0.88rem;
    }
    body:not(.admin-body) .search-suggestions-dropdown {
        max-height: 220px;
    }
    body:not(.admin-body) .route-card {
        padding: 10px 12px 10px 14px;
        gap: 9px;
    }
    body:not(.admin-body) .route-name {
        font-size: 0.9rem;
    }
    body:not(.admin-body) .route-desc {
        -webkit-line-clamp: 1;
        font-size: 0.76rem;
    }
    body:not(.admin-body) .planner-card {
        padding: 12px;
    }
    body:not(.admin-body) .planner-subtitle {
        font-size: 0.76rem;
        margin-bottom: 10px;
    }

    /* Controles del mapa fijos arriba a la derecha para no chocar jamás con el Bottom Sheet */
    body:not(.admin-body) .leaflet-top.leaflet-left {
        top: 66px !important;
        right: 12px !important;
        left: auto !important;
        bottom: auto !important;
    }
    body:not(.admin-body) .fab-location {
        top: 158px !important;
        right: 12px !important;
        left: auto !important;
        bottom: auto !important;
        width: 40px;
        height: 40px;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }
    body:not(.admin-body) .fab-traffic {
        top: 206px !important;
        right: 12px !important;
        left: auto !important;
        bottom: auto !important;
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 8px !important;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }
    body.mobile-sheet-full:not(.admin-body) .fab-location,
    body.mobile-sheet-full:not(.admin-body) .fab-traffic,
    body.mobile-sheet-full:not(.admin-body) .traffic-legend {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-6px) scale(0.94);
    }
    body:not(.admin-body) .fab-traffic-label {
        display: none;
    }
    body:not(.admin-body) .fab-traffic .traffic-status-dot {
        position: absolute;
        top: 5px;
        right: 5px;
        width: 7px;
        height: 7px;
    }
    body:not(.admin-body) .traffic-legend {
        top: 66px;
        left: 12px;
        right: auto;
        min-width: 175px;
        max-width: calc(100vw - 74px);
    }
    body:not(.admin-body) .toast {
        top: 64px;
        bottom: auto;
        transform: translateX(-50%) translateY(-20px);
        padding: 10px 16px;
        font-size: 0.82rem;
        border-radius: 12px;
        width: calc(100vw - 24px);
        max-width: 380px;
        text-align: center;
    }
    body:not(.admin-body) .toast.show {
        transform: translateX(-50%) translateY(0);
    }
    /* En modo "Voy a bordo", desplazar zoom, ubicación y avisos debajo de la tarjeta para no empalmarse */
    body.onboard-active:not(.admin-body) .leaflet-top.leaflet-left {
        top: calc(var(--onboard-hud-bottom, 174px) + 6px) !important;
    }
    body.onboard-active:not(.admin-body) .fab-location {
        top: calc(var(--onboard-hud-bottom, 174px) + 100px) !important;
    }
    body.onboard-active:not(.admin-body) .fab-traffic {
        top: calc(var(--onboard-hud-bottom, 174px) + 148px) !important;
    }
    body.onboard-active:not(.admin-body) .traffic-legend {
        top: calc(var(--onboard-hud-bottom, 174px) + 10px) !important;
        left: 12px !important;
    }
    body.onboard-active:not(.admin-body) .toast {
        top: auto;
        bottom: 144px;
        transform: translateX(-50%) translateY(20px);
    }
    body.onboard-active:not(.admin-body) .toast.show {
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 540px) {
    .btn-donate-nav {
        width: 34px;
        padding: 0;
    }
    .donate-nav-label {
        display: none;
    }
}

@media (max-width: 440px) {
    .top-navbar {
        padding: 0 8px;
        gap: 4px;
    }
    .navbar-logo {
        height: 26px;
    }
    .navbar-actions {
        gap: 4px;
    }
    .lang-switch-btn {
        padding: 3px 6px;
        font-size: 0.66rem;
    }
    .btn-login {
        padding: 6px 8px;
        font-size: 0.71rem;
        gap: 4px;
    }
    .btn-login .btn-svg-icon {
        width: 14px;
        height: 14px;
    }
    .user-badge {
        max-width: 72px;
        padding: 5px 7px;
        font-size: 0.72rem;
    }
    .btn-admin {
        padding: 5px 7px;
        font-size: 0.7rem;
    }
    .trip-sort-tab {
        font-size: 0.69rem;
        padding: 6px 4px;
    }
    .trip-radius-pill {
        padding: 4px 8px;
        font-size: 0.69rem;
    }
}

/* =========================================================
   BLOQUE 4: PULSO COMUNITARIO, AVISOS, GUÍAS Y CÁPSULA
   ========================================================= */
.notif-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 9999px;
    background: #EF4444;
    color: #FFFFFF;
    font-size: 0.64rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.45);
    pointer-events: none;
}

.city-live-banner {
    position: absolute;
    top: 74px;
    left: 446px;
    right: 268px;
    z-index: 940;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #FDBA74;
    border-left: 4px solid #F59E0B;
    border-radius: 12px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    max-width: 620px;
}
.city-live-banner.sev-danger {
    border-color: #FCA5A5;
    border-left-color: #DC2626;
    background: #FEF2F2;
}
.city-live-banner.sev-info {
    border-color: #BFDBFE;
    border-left-color: #2563EB;
}
.city-live-badge {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 999px;
    background: #F59E0B;
    color: #ffffff;
    flex-shrink: 0;
}
.city-live-banner.sev-danger .city-live-badge { background: #DC2626; }
.city-live-banner.sev-info .city-live-badge { background: #2563EB; }
.city-live-text {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.city-live-action,
.city-live-link {
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 7px;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.city-live-link {
    background: #EFF6FF;
    border-color: #93C5FD;
    color: #1D4ED8;
}
.city-live-close {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
}
body:has(.sidebar.collapsed) .city-live-banner {
    left: 62px;
}

.route-pulse-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 9999px;
    background: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
    font-size: 0.66rem;
    font-weight: 700;
    margin-left: 6px;
}

.detail-pulse-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    margin: 6px 0 12px 0;
}
.detail-sighting-status {
    font-size: 0.76rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.pulse-live-dot-inline {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
.detail-pulse-actions {
    display: flex;
    gap: 8px;
}
.btn-pulse-sighting {
    flex: 1;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #10B981;
    background: #ECFDF5;
    color: #047857;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}
.btn-pulse-sighting:hover { background: #D1FAE5; }
.btn-pulse-share, .btn-trip-share {
    padding: 7px 11px;
    border-radius: 8px;
    border: 1px solid #BFDBFE;
    background: #EFF6FF;
    color: #1D4ED8;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}
.btn-pulse-share:hover, .btn-trip-share:hover { background: #DBEAFE; }

.trip-action-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 10px;
}
.trip-savings-pill {
    margin-top: 7px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #047857;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    padding: 4px 8px;
    border-radius: 7px;
}

.planner-shortcuts-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.shortcut-chip-wrap {
    display: inline-flex;
    align-items: center;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 9999px;
    padding-right: 4px;
}
.shortcut-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px dashed var(--border-strong);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}
.shortcut-chip.is-saved {
    border: none;
    background: transparent;
    color: #1D4ED8;
    padding-right: 4px;
}
.shortcut-clear-btn {
    border: none;
    background: transparent;
    color: #64748B;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.onboard-extra-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.onboard-mini-btn {
    flex: 1;
    padding: 5px 8px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.71rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.onboard-mini-btn.active {
    border-color: #10B981;
    background: #ECFDF5;
    color: #047857;
}

.guides-intro-banner {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.76rem;
    color: #1E3A8A;
}
.guide-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.guide-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.guide-fare-pill {
    font-size: 0.7rem;
    font-weight: 800;
    background: #0F172A;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 999px;
}
.guide-save-pill {
    font-size: 0.68rem;
    font-weight: 700;
    color: #047857;
    background: #ECFDF5;
    padding: 2px 7px;
    border-radius: 999px;
}
.guide-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-primary);
}
.guide-tip {
    margin: 0;
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.btn-guide-launch {
    border: none;
    background: var(--primary);
    color: #ffffff;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.live-notice-card {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.live-notice-card.sev-danger { background: #FEF2F2; border-color: #FCA5A5; }
.live-notice-card.sev-warning { background: #FFFBEB; border-color: #FCD34D; }
.live-notice-card.sev-info { background: #EFF6FF; border-color: #BFDBFE; }
.live-notice-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
}
.live-notice-title { margin: 0; font-size: 0.84rem; font-weight: 800; color: var(--text-primary); }
.live-notice-body { margin: 0; font-size: 0.76rem; color: var(--text-secondary); line-height: 1.38; overflow-wrap: anywhere; }
.live-notice-inline-link { color: #1D4ED8; font-weight: 600; text-decoration: underline; word-break: break-word; }
.live-notice-actions { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.btn-notice-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 8px;
    border: 1px solid #93C5FD;
    background: #EFF6FF;
    color: #1D4ED8;
    font-size: 0.73rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn-notice-link:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-notice-link.kind-facebook { background: #1877F2; border-color: #1877F2; color: #FFFFFF; }
.btn-notice-link.kind-instagram { background: #E1306C; border-color: #E1306C; color: #FFFFFF; }
.btn-notice-link.kind-youtube { background: #DC2626; border-color: #DC2626; color: #FFFFFF; }
.btn-notice-link.kind-whatsapp { background: #16A34A; border-color: #16A34A; color: #FFFFFF; }
.btn-notice-link.kind-tiktok { background: #111827; border-color: #111827; color: #FFFFFF; }
.btn-notice-link.kind-maps { background: #0F766E; border-color: #0F766E; color: #FFFFFF; }
.btn-notice-link.kind-donate { background: #D97706; border-color: #D97706; color: #FFFFFF; }
.btn-pulse-clear {
    padding: 4px 10px;
    border-radius: 7px;
    border: 1px solid #10B981;
    background: #ECFDF5;
    color: #047857;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.pulse-report-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
}
.pulse-report-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
}
.pulse-mini-link {
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}
.pulse-pending-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.73rem;
    color: var(--text-secondary);
    padding-top: 5px;
    border-top: 1px dashed var(--border);
}
.pulse-progress-pill {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 800;
    background: #FEF3C7;
    color: #92400E;
    padding: 1px 6px;
    border-radius: 999px;
    margin-left: 4px;
}
.pulse-empty-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 4px 2px;
}

.pulse-pin-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid var(--pin-color, #DC2626);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.pulse-pin-badge.is-confirmed {
    background: var(--pin-color, #DC2626);
}
.pulse-sighting-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #FFFFFF;
    color: #065F46;
    border: 2px solid #059669;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
    transform: translate(-50%, -50%);
}
.pulse-sighting-pill.is-focused {
    background: #059669;
    color: #FFFFFF;
    border-color: #FFFFFF;
}
.pulse-locate-link {
    background: none;
    border: none;
    padding: 0 0 0 6px;
    color: #047857;
    font-size: 0.73rem;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 768px) {
    .city-live-banner {
        top: 66px;
        left: 12px;
        right: 60px;
        padding: 6px 8px;
    }
    body:not(.admin-body):has(.city-live-banner[style*="flex"]) .traffic-legend {
        top: 111px;
    }
    body.onboard-active .city-live-banner {
        display: none !important;
    }
}

.service-schedule-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 8px;
}
.service-schedule-banner.is-closing {
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    color: #92400E;
}
.service-schedule-banner.is-closed {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
}
