/* ==========================================================================
   RUTACUN · MOBI-INSPIRED BLUE THEME
   Capa visual unificada para todas las páginas (landing, legales y mapa).
   Se carga después de styles.css / rutacun1style.css.
   ========================================================================== */

:root {
    /* Paleta azul profunda inspirada en MOBI */
    --rc-bg: #040b16;
    --rc-bg-2: #071426;
    --rc-bg-3: #0a1d36;
    --rc-surface: rgba(11, 31, 58, 0.62);
    --rc-surface-soft: rgba(13, 36, 68, 0.42);
    --rc-surface-strong: rgba(7, 20, 38, 0.86);
    --rc-line: rgba(126, 176, 255, 0.16);
    --rc-line-strong: rgba(126, 176, 255, 0.34);
    --rc-primary: #1e6fff;
    --rc-primary-deep: #0b47b8;
    --rc-primary-soft: #4d8dff;
    --rc-glow: #8ec0ff;
    --rc-cyan: #22d3ee;
    --rc-text: #eaf3ff;
    --rc-muted: #a6bdd9;
    --rc-dim: #7189aa;
    --rc-success: #34d399;
    --rc-warning: #fbbf24;
    --rc-danger: #fb7185;
    --rc-radius-xl: 28px;
    --rc-radius-lg: 20px;
    --rc-radius-md: 14px;
    --rc-radius-pill: 999px;
    --rc-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
    --rc-shadow-soft: 0 14px 38px rgba(0, 0, 0, 0.4);
    --rc-ring: 0 0 0 1px rgba(126, 176, 255, 0.16);
    --rc-font: 'Montserrat', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --rc-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    color-scheme: dark;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body,
body * {
    font-family: var(--rc-font);
}

body {
    background:
        radial-gradient(1200px 700px at 8% -10%, rgba(30, 111, 255, 0.24), transparent 62%),
        radial-gradient(900px 620px at 100% 0%, rgba(34, 211, 238, 0.12), transparent 58%),
        radial-gradient(900px 700px at 50% 120%, rgba(11, 71, 184, 0.22), transparent 60%),
        linear-gradient(160deg, var(--rc-bg-2) 0%, var(--rc-bg) 55%, #02060e 100%) !important;
    background-attachment: fixed !important;
    color: var(--rc-text) !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 46vw;
    height: 46vw;
    min-width: 280px;
    min-height: 280px;
    max-width: 620px;
    max-height: 620px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
}

body::before {
    background: #1e6fff;
    top: -18%;
    left: -12%;
    animation: rc-drift-a 22s ease-in-out infinite alternate;
}

body::after {
    /* El footer tiene su propio fondo: se elimina la figura inferior */
    content: none;
    display: none;
    background: none;
    animation: none;
}

/* En la página del mapa el fondo decorativo no aporta nada: el mapa cubre toda
   la pantalla y ese halo podía asomar como una franja azul en el borde superior. */
body:has(#map)::before {
    content: none;
    display: none;
    background: none;
    animation: none;
}

/* Rejilla técnica sutil, equivalente al fondo animado de MOBI */
body::selection {
    background: rgba(30, 111, 255, 0.4);
}

/* --------------------------------------------------------------------------
   Tipografía
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--rc-font);
    color: var(--rc-text);
    letter-spacing: -0.02em;
}

p, li {
    color: var(--rc-muted);
}

a {
    color: var(--rc-primary-soft);
}

a:hover {
    color: #bcd8ff;
}

strong {
    color: var(--rc-text);
}

::selection {
    background: rgba(30, 111, 255, 0.42);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Marca / topbar web
   -------------------------------------------------------------------------- */
.rc-topbar {
    position: sticky;
    top: 14px;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: min(100% - 24px, 1180px);
    margin: 14px auto 0;
    padding: 10px 12px 10px 14px;
    border-radius: var(--rc-radius-pill);
    border: 1px solid var(--rc-line);
    background: linear-gradient(120deg, rgba(9, 26, 50, 0.86), rgba(5, 15, 30, 0.72));
    box-shadow: var(--rc-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.rc-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    color: var(--rc-text) !important;
    min-width: 0;
}

.rc-brand-logo {
    width: 42px;
    height: 42px;
    padding: 4px;
    border-radius: 13px;
    object-fit: contain;
    border: 1px solid rgba(160, 205, 255, 0.55);
    box-shadow: 0 0 22px rgba(30, 111, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    background: linear-gradient(160deg, #f4f9ff 0%, #cfe3ff 100%);
}

.rc-brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.rc-brand-name small {
    margin-top: 3px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: var(--rc-dim);
}

.rc-topbar-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rc-pill-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--rc-radius-pill);
    background: linear-gradient(135deg, var(--rc-primary) 0%, var(--rc-primary-deep) 100%);
    color: #fff !important;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    box-shadow: 0 10px 26px rgba(30, 111, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 0.25s var(--rc-ease), box-shadow 0.25s var(--rc-ease);
    white-space: nowrap;
}

.rc-pill-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(30, 111, 255, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.rc-floating-brand {
    position: fixed;
    top: 14px;
    left: 16px;
    z-index: 500;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 6px 14px 6px 6px;
    border-radius: var(--rc-radius-pill);
    border: 1px solid var(--rc-line);
    background: rgba(6, 18, 34, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--rc-text) !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: var(--rc-shadow-soft);
}

.rc-floating-brand img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   Landing: hero y tarjetas
   -------------------------------------------------------------------------- */
.page-home {
    display: block !important;
    padding: 0 0 34px !important;
    text-align: left !important;
    min-height: 100vh;
}

.rc-main {
    width: min(100% - 32px, 1180px);
    margin: 0 auto;
    padding: 34px 0 0;
}

.rc-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--rc-radius-xl);
    border: 1px solid var(--rc-line);
    background:
        linear-gradient(150deg, rgba(12, 35, 66, 0.92) 0%, rgba(6, 17, 32, 0.94) 58%, rgba(4, 11, 22, 0.98) 100%);
    box-shadow: var(--rc-shadow);
    isolation: isolate;
}

.rc-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(4, 11, 22, 0.05) 0%, rgba(4, 11, 22, 0.65) 100%),
        radial-gradient(720px 380px at 22% 12%, rgba(30, 111, 255, 0.24), transparent 68%);
    z-index: 1;
    pointer-events: none;
}

.rc-hero-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.85;
}

.rc-hero-visual svg {
    width: 100%;
    height: 100%;
    display: block;
}

.rc-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 30px;
    align-items: center;
    padding: 58px 54px;
}

.rc-hero-copy h1 {
    font-size: clamp(42px, 6.2vw, 76px);
    line-height: 0.95;
    margin: 0 0 16px;
    font-weight: 800;
    letter-spacing: -0.045em;
    background: linear-gradient(180deg, #ffffff 0%, #a9ccff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 34px rgba(30, 111, 255, 0.28));
}

.rc-hero-copy .subtitle {
    max-width: 60ch;
    margin: 0 0 26px;
    color: #b9cfe9 !important;
    font-size: clamp(13.5px, 1.3vw, 15.5px);
    line-height: 1.75;
    font-weight: 400;
}

.rc-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    padding: 7px 14px;
    border-radius: var(--rc-radius-pill);
    border: 1px solid rgba(126, 176, 255, 0.28);
    background: rgba(30, 111, 255, 0.12);
    color: #bcd8ff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.rc-kicker::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rc-cyan);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.16);
    animation: rc-pulse-dot 2.4s ease-in-out infinite;
}

.rc-hero-panel {
    position: relative;
    padding: 26px;
    border-radius: var(--rc-radius-lg);
    border: 1px solid var(--rc-line-strong);
    background: linear-gradient(160deg, rgba(14, 40, 74, 0.78), rgba(6, 18, 34, 0.9));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.rc-hero-panel::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    border-radius: var(--rc-radius-lg) var(--rc-radius-lg) 0 0;
    background: linear-gradient(90deg, transparent, var(--rc-primary), var(--rc-cyan), transparent);
    opacity: 0.9;
}

.rc-hero-panel-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.rc-hero-panel-sub {
    margin: 0 0 18px;
    font-size: 11.5px;
    color: var(--rc-dim);
}

/* Botones del hero */
.page-home .btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: stretch;
}

.page-home .nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: var(--rc-radius-pill);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    transition: transform 0.25s var(--rc-ease), box-shadow 0.25s var(--rc-ease), background 0.25s var(--rc-ease);
}

.page-home .btn-visitor {
    background: linear-gradient(135deg, #2b7bff 0%, #0b47b8 100%);
    color: #fff;
    border: 1px solid rgba(160, 205, 255, 0.45);
    box-shadow: 0 14px 34px rgba(30, 111, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.page-home .btn-visitor:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(30, 111, 255, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.page-home .btn-outline {
    background: rgba(11, 31, 58, 0.6);
    border: 1px solid rgba(126, 176, 255, 0.24);
    color: #d6e8ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.page-home .btn-outline:hover {
    background: rgba(30, 111, 255, 0.2);
    border-color: rgba(126, 176, 255, 0.5);
    color: #fff;
    transform: translateY(-2px);
}

.page-home .no-reg-text {
    margin: 0;
    font-size: 11.5px;
    color: var(--rc-dim);
    text-align: center;
}

.page-home .creator-spam {
    margin-top: 4px;
    font-size: 12px;
    color: var(--rc-dim);
    text-align: center;
}

/* Selector de idioma */
.language-selector-container {
    margin: 0;
    width: auto;
}

.lang-dropdown {
    appearance: none;
    -webkit-appearance: none;
    border-radius: var(--rc-radius-pill);
    border: 1px solid var(--rc-line) !important;
    background: rgba(8, 23, 44, 0.8) !important;
    color: var(--rc-text) !important;
    padding: 9px 14px !important;
    font-size: 12px !important;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.lang-dropdown:hover,
.lang-dropdown:focus-visible {
    border-color: var(--rc-line-strong) !important;
    background: rgba(14, 40, 74, 0.9) !important;
}

/* En mobi-theme.css */

.rc-editorial {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    margin-top: 22px;
    align-items: stretch; /* <--- CAMBIA 'start' POR 'stretch' */
}

.page-home .editorial-card-accent,
.page-home .editorial-bottom-section {
    position: relative;
    padding: 26px 26px 24px;
    border-radius: var(--rc-radius-lg);
    border: 1px solid var(--rc-line) !important;
    background: linear-gradient(160deg, rgba(12, 34, 64, 0.62), rgba(5, 16, 31, 0.74)) !important;
    box-shadow: var(--rc-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    height: 100%; /* <--- AÑADE ESTO para que ocupen todo el alto */
    display: flex; /* <--- AÑADE ESTO */
    flex-direction: column; /* <--- AÑADE ESTO */
}

.page-home .editorial-card-accent::before,
.page-home .editorial-bottom-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 26px;
    right: 26px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(126, 176, 255, 0.55), transparent);
}

.page-home .editorial-card-accent h2,
.page-home .editorial-bottom-section h2 {
    position: relative;
    margin: 0 0 12px;
    padding-left: 15px;
    color: #dbeaff !important;
    font-size: 15.5px !important;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.page-home .editorial-card-accent h2::before,
.page-home .editorial-bottom-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--rc-primary-soft), var(--rc-cyan));
}

.page-home .editorial-card-accent p,
.page-home .editorial-bottom-section p,
.page-home .editorial-bottom-section ul {
    font-size: 13px !important;
    line-height: 1.8 !important;
    color: #a9c0dc !important;
    margin-bottom: 8px;
}

.page-home .editorial-bottom-section li {
    margin-bottom: 10px;
}

.page-home .editorial-bottom-section strong {
    color: #dbeaff;
}

/* --------------------------------------------------------------------------
   Footer global (páginas web)
   -------------------------------------------------------------------------- */
.rc-footer {
    width: min(100% - 32px, 1180px);
    margin: 28px auto 0;
}

.rc-footer-card {
    position: relative;
    overflow: hidden;
    padding: 26px 28px;
    border-radius: var(--rc-radius-xl);
    border: 1px solid var(--rc-line);
    background:
        radial-gradient(600px 200px at 10% 0%, rgba(30, 111, 255, 0.18), transparent 70%),
        linear-gradient(150deg, rgba(9, 26, 50, 0.82), rgba(4, 12, 24, 0.94));
    box-shadow: var(--rc-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.rc-footer-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--rc-primary), var(--rc-cyan), transparent);
    opacity: 0.8;
}

.rc-footer-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(126, 176, 255, 0.12);
}

.rc-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 12.5px;
}

.rc-footer-nav a {
    color: var(--rc-muted) !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.rc-footer-nav a:hover {
    color: #fff !important;
}

.rc-footer-sep {
    display: none;
}

.rc-footer-bottom {
    padding-top: 16px;
    font-size: 11.5px;
    color: var(--rc-dim);
}

/* Footer legal antiguo (se conserva el markup pero se rediseña) */
body.legal-body > footer,
body > footer,
footer.legal-footer {
    width: min(100% - 32px, 880px) !important;
    margin: 4px auto 0 !important;
    padding: 16px 22px !important;
    border-radius: var(--rc-radius-pill) !important;
    border: 1px solid var(--rc-line) !important;
    background: rgba(7, 20, 38, 0.72) !important;
    box-shadow: var(--rc-shadow-soft) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    gap: 6px 14px !important;
    font-size: 12px !important;
    color: var(--rc-dim) !important;
}

footer.legal-footer a,
body > footer a {
    color: var(--rc-muted) !important;
}

footer.legal-footer a:hover,
body > footer a:hover {
    color: #fff !important;
}

/* --------------------------------------------------------------------------
   Páginas legales / contenido / autenticación
   -------------------------------------------------------------------------- */
body.legal-body {
    padding: 92px 16px 26px !important;
}

body.legal-body .legal-container,
.content-container,
.legal-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 880px;
    padding: 42px 40px 38px !important;
    border-radius: var(--rc-radius-xl) !important;
    border: 1px solid var(--rc-line) !important;
    background:
        radial-gradient(700px 260px at 12% -10%, rgba(30, 111, 255, 0.2), transparent 68%),
        linear-gradient(160deg, rgba(11, 31, 58, 0.78), rgba(5, 14, 28, 0.92)) !important;
    box-shadow: var(--rc-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    margin-bottom: 18px !important;
}

body.legal-body .legal-container::before,
.content-container::before,
.legal-container::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--rc-primary), var(--rc-cyan), transparent);
    opacity: 0.85;
}

.content-container h1,
.legal-container h1,
.auth-container h2 {
    background: linear-gradient(180deg, #ffffff 0%, #a9ccff 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    border-bottom: 1px solid rgba(126, 176, 255, 0.14) !important;
    padding-bottom: 16px !important;
    margin-bottom: 24px !important;
    letter-spacing: -0.03em;
}

.content-container h2,
.legal-container h2 {
    color: #cfe4ff !important;
    font-size: 19px !important;
}

.content-container h3,
.legal-container h3 {
    color: #e7f2ff !important;
    font-size: 16px !important;
}

body.legal-body p,
body.legal-body li {
    color: #a9c0dc;
    font-size: 13.5px;
    line-height: 1.8;
}

body.legal-body strong {
    color: #eaf3ff;
}

body.legal-body a {
    color: #7fb0ff;
}

.email-box {
    border-radius: var(--rc-radius-md) !important;
    border: 1px solid var(--rc-line-strong) !important;
    background: linear-gradient(150deg, rgba(30, 111, 255, 0.14), rgba(7, 20, 38, 0.6)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

.auth-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 430px;
    padding: 40px 32px 34px !important;
    border-radius: var(--rc-radius-xl) !important;
    border: 1px solid var(--rc-line) !important;
    background:
        radial-gradient(500px 220px at 20% 0%, rgba(30, 111, 255, 0.24), transparent 70%),
        linear-gradient(160deg, rgba(11, 31, 58, 0.84), rgba(4, 12, 24, 0.94)) !important;
    box-shadow: var(--rc-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    margin: 96px auto 30px !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.auth-container::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--rc-primary), var(--rc-cyan), transparent);
}

.auth-subtitle {
    color: var(--rc-muted) !important;
}

.btn-google {
    border-radius: var(--rc-radius-pill) !important;
    border: 1px solid rgba(126, 176, 255, 0.24) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--rc-text) !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.btn-google:hover {
    background: rgba(30, 111, 255, 0.18) !important;
    border-color: var(--rc-line-strong) !important;
}

.back-link,
.back-home,
.inline-link {
    border-radius: var(--rc-radius-pill) !important;
    border: 1px solid rgba(126, 176, 255, 0.26) !important;
    background: rgba(30, 111, 255, 0.14) !important;
    color: #e6f1ff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.back-link:hover,
.back-home:hover,
.inline-link:hover {
    background: rgba(30, 111, 255, 0.32) !important;
    border-color: var(--rc-line-strong) !important;
    box-shadow: 0 10px 30px rgba(30, 111, 255, 0.26) !important;
}

/* --------------------------------------------------------------------------
   MAPA: header flotante tipo píldora
   -------------------------------------------------------------------------- */
header {
    top: 12px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    height: 56px !important;
    padding: 0 14px !important;
    border-radius: var(--rc-radius-pill) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: linear-gradient(120deg, rgba(9, 26, 50, 0.88), rgba(5, 15, 30, 0.76)) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
    z-index: 1200 !important;
    gap: 10px;
}

/* Sin línea de acento: el header flota limpio sobre el mapa */
header::after {
    content: none;
    display: none;
    background: none;
    animation: none;
}

.header-left,
.header-controls {
    gap: 8px !important;
    min-width: 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-left: 2px;
    font-size: 17px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: #fff !important;
    text-shadow: 0 4px 18px rgba(30, 111, 255, 0.3) !important;
    white-space: nowrap;
}

.logo::before {
    content: '';
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 9px;
    background:
        url('logorutacun.png') center / 82% no-repeat,
        linear-gradient(160deg, #f4f9ff 0%, #cfe3ff 100%);
    border: 1px solid rgba(160, 205, 255, 0.5);
    box-shadow: 0 0 18px rgba(30, 111, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.menu-btn,
.logout-btn,
.admin-toggle-btn,
.donation-btn-header {
    border-radius: var(--rc-radius-pill) !important;
    padding: 8px 15px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.2s var(--rc-ease), background 0.2s, border-color 0.2s, box-shadow 0.2s !important;
    white-space: nowrap;
}

.menu-btn {
    background: linear-gradient(135deg, #2b7bff 0%, #0b47b8 100%) !important;
    border: 1px solid rgba(160, 205, 255, 0.45) !important;
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(30, 111, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.26) !important;
}

.menu-btn:hover {
    background: linear-gradient(135deg, #3d8bff 0%, #1458cf 100%) !important;
    transform: translateY(-1px);
}

.logout-btn {
    background: rgba(251, 113, 133, 0.1) !important;
    border: 1px solid rgba(251, 113, 133, 0.28) !important;
    color: #ffb3c0 !important;
}

.logout-btn:hover {
    background: rgba(251, 113, 133, 0.22) !important;
    color: #fff !important;
}

.admin-toggle-btn {
    background: rgba(34, 211, 238, 0.12) !important;
    border: 1px solid rgba(34, 211, 238, 0.28) !important;
    color: #8ae9f7 !important;
}

.admin-toggle-btn:hover {
    background: rgba(34, 211, 238, 0.22) !important;
    color: #fff !important;
}

.donation-btn-header {
    background: rgba(52, 211, 153, 0.1) !important;
    border: 1px solid rgba(52, 211, 153, 0.26) !important;
    color: #7ef0c2 !important;
}

.donation-btn-header:hover {
    background: rgba(52, 211, 153, 0.2) !important;
    color: #fff !important;
}

/* El mapa ocupa toda la pantalla; el header flota encima */
#map {
    top: 0 !important;
    margin-top: 0 !important;
    border-top: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #06101f;
}

/* Sin anillo de foco del navegador: con el mapa a pantalla completa se veía
   como una línea azul pegada al borde superior de la pantalla. */
#map,
#map:focus,
#map:focus-visible,
.leaflet-container,
.leaflet-container:focus,
.leaflet-container:focus-visible {
    outline: none !important;
    box-shadow: none;
}

.leaflet-top.leaflet-left {
    top: 76px !important;
}

.leaflet-top.leaflet-right {
    top: 76px !important;
    right: 10px !important;
    z-index: 1150 !important;
}

.leaflet-control-zoom,
.leaflet-control-layers,
.leaflet-bar {
    border: 1px solid var(--rc-line) !important;
    border-radius: 14px !important;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42) !important;
}

.leaflet-control-zoom a,
.leaflet-bar a {
    width: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
    background: rgba(7, 20, 38, 0.88) !important;
    color: var(--rc-text) !important;
    border-bottom: 1px solid rgba(126, 176, 255, 0.12) !important;
    font-size: 18px !important;
}

.leaflet-control-zoom a:hover,
.leaflet-bar a:hover {
    background: rgba(30, 111, 255, 0.36) !important;
    color: #fff !important;
}

/* Atribución "Leaflet | © OpenStreetMap": siempre visible y legible.
   Se coloca arriba a la derecha (debajo del header) porque el panel flotante
   inferior y el control de zoom la tapaban en pantallas pequeñas. */
.leaflet-control-attribution {
    margin: 0 !important;
    padding: 4px 10px !important;
    background: rgba(4, 12, 24, 0.92) !important;
    color: #e6f0ff !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border: 1px solid rgba(126, 176, 255, 0.3) !important;
    border-radius: 999px !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    pointer-events: auto;
}

.leaflet-control-attribution a {
    color: #8ec0ff !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.leaflet-control-attribution a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: rgba(7, 20, 38, 0.94) !important;
    color: var(--rc-text) !important;
    border: 1px solid var(--rc-line) !important;
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.leaflet-popup-content {
    font-size: 12.5px;
    line-height: 1.55;
    margin: 12px 14px;
}

.leaflet-popup-close-button {
    color: #9fb6d4 !important;
}

.custom-route-tooltip {
    background: rgba(6, 18, 34, 0.92) !important;
    border: 1px solid var(--rc-line-strong) !important;
    color: #eaf3ff !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 22px rgba(30, 111, 255, 0.18) !important;
}

/* --------------------------------------------------------------------------
   MAPA: sidebar de rutas (derecha)
   -------------------------------------------------------------------------- */
.sidebar {
    top: 80px !important;
    right: -360px !important;
    width: 348px !important;
    height: calc(100vh - 92px) !important;
    height: calc(100dvh - 92px) !important;
    padding: 18px !important;
    border-radius: var(--rc-radius-xl) 0 0 var(--rc-radius-xl) !important;
    border-left: 1px solid var(--rc-line) !important;
    background:
        radial-gradient(520px 240px at 100% 0%, rgba(30, 111, 255, 0.2), transparent 70%),
        linear-gradient(170deg, rgba(10, 29, 54, 0.94), rgba(4, 12, 24, 0.96)) !important;
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.5), inset 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(22px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(140%) !important;
}

.sidebar.open {
    right: 8px !important;
}

.sidebar-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.user-status-container {
    flex: 1;
    margin: 0 !important;
    padding: 10px 14px !important;
    border-radius: var(--rc-radius-pill) !important;
    border: 1px solid var(--rc-line) !important;
    background: rgba(4, 14, 28, 0.6) !important;
    text-align: left !important;
}

#userDisplay {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #d8e9ff !important;
    letter-spacing: 0.02em;
}

#userDisplay::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rc-success);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
}

.sidebar .close-btn {
    position: static !important;
    flex: 0 0 36px;
    width: 36px !important;
    height: 36px !important;
    border-radius: 12px !important;
    border: 1px solid var(--rc-line) !important;
    background: rgba(4, 14, 28, 0.6) !important;
    color: #c7dbff !important;
}

.sidebar .close-btn:hover {
    background: rgba(251, 113, 133, 0.2) !important;
    border-color: rgba(251, 113, 133, 0.4) !important;
    color: #fff !important;
}

.search-box,
#searchZoneBox,
#searchRouteAdminBox {
    border-radius: var(--rc-radius-pill) !important;
    border: 1px solid var(--rc-line) !important;
    background: rgba(4, 14, 28, 0.7) !important;
    color: var(--rc-text) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    font-size: 12.5px !important;
    padding: 12px 38px 12px 16px !important;
}

.search-box:focus {
    border-color: rgba(126, 176, 255, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(30, 111, 255, 0.18), inset 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    background: rgba(7, 22, 42, 0.9) !important;
}

.routes-container {
    max-height: none !important;
    padding: 4px 2px 8px !important;
    border-radius: var(--rc-radius-lg);
}

.total-routes-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 14px !important;
    padding: 6px 12px;
    border-radius: var(--rc-radius-pill);
    border: 1px solid var(--rc-line);
    background: rgba(30, 111, 255, 0.1);
    color: #bcd8ff !important;
    font-size: 11px !important;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.route-section {
    margin-bottom: 8px !important;
    padding: 0;
}

.category-title {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    border-radius: var(--rc-radius-md) !important;
    border: 1px solid transparent !important;
    background: rgba(11, 31, 58, 0.42) !important;
    color: #e6f1ff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s !important;
}

.category-title:hover {
    background: rgba(30, 111, 255, 0.14) !important;
    border-color: var(--rc-line) !important;
}

.category-title > span > span:not(.details-arrow):not(.category-route-count):not(.info-horarios) {
    color: #e6f1ff !important;
    font-size: 13px !important;
}

.details-arrow {
    color: #8ec0ff !important;
    font-size: 10px !important;
}

.route-section .category-route-count.info-horarios {
    background: rgba(30, 111, 255, 0.18) !important;
    color: #a9ccff !important;
    border: 1px solid rgba(126, 176, 255, 0.24) !important;
    border-radius: var(--rc-radius-pill) !important;
    padding: 1px 9px !important;
}

.route-item {
    color: #c3d7ee !important;
    border-radius: 11px !important;
    padding: 9px 11px !important;
    gap: 10px !important;
    font-size: 12.5px !important;
}

.route-item:hover {
    background: rgba(30, 111, 255, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(126, 176, 255, 0.14) !important;
    transform: translateX(2px);
}

.route-name-text {
    color: inherit !important;
}

.route-item input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 17px !important;
    height: 17px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(126, 176, 255, 0.4) !important;
    background: rgba(4, 14, 28, 0.7) !important;
    margin-right: 2px !important;
    position: relative;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.route-item input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #2b7bff, #0b47b8) !important;
    border-color: rgba(160, 205, 255, 0.7) !important;
    box-shadow: 0 0 12px rgba(30, 111, 255, 0.45);
}

.route-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(42deg);
}

.btn-activate-all,
.btn-liquid-glass {
    border-radius: var(--rc-radius-pill) !important;
    border: 1px solid var(--rc-line) !important;
    background: rgba(4, 14, 28, 0.55) !important;
    color: #afc9e8 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    padding: 9px 14px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.btn-activate-all:hover,
.btn-liquid-glass:hover {
    background: rgba(30, 111, 255, 0.2) !important;
    border-color: rgba(126, 176, 255, 0.4) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.btn-info-glass {
    border-radius: var(--rc-radius-lg) !important;
    border: 1px solid rgba(126, 176, 255, 0.26) !important;
    background:
        radial-gradient(180px 90px at 18% 0%, rgba(34, 211, 238, 0.16), transparent 70%),
        linear-gradient(135deg, rgba(30, 111, 255, 0.24), rgba(11, 71, 184, 0.22)) !important;
    color: #eaf3ff !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    font-size: 12px !important;
    padding: 13px 16px !important;
}

.btn-info-glass:hover {
    border-color: rgba(126, 176, 255, 0.55) !important;
    background:
        radial-gradient(200px 100px at 18% 0%, rgba(34, 211, 238, 0.24), transparent 70%),
        linear-gradient(135deg, rgba(30, 111, 255, 0.38), rgba(11, 71, 184, 0.32)) !important;
    box-shadow: 0 16px 38px rgba(30, 111, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

.btn-info-glass .btn-badge {
    background: rgba(34, 211, 238, 0.16) !important;
    border-color: rgba(34, 211, 238, 0.24) !important;
    color: #8ae9f7 !important;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: rgba(3, 10, 20, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(126, 176, 255, 0.24);
    border-radius: 10px;
    border: 1px solid rgba(126, 176, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(126, 176, 255, 0.42);
}

/* --------------------------------------------------------------------------
   MAPA: panel inferior de rutas activas
   -------------------------------------------------------------------------- */
#activeRoutesFloatPanel {
    bottom: 14px !important;
    padding: 10px 14px !important;
    border-radius: var(--rc-radius-pill) !important;
    border: 1px solid var(--rc-line) !important;
    background: linear-gradient(120deg, rgba(9, 26, 50, 0.9), rgba(5, 15, 30, 0.82)) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(18px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
}

#activeRoutesFloatPanel .route-badge {
    border-radius: var(--rc-radius-pill) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

/* --------------------------------------------------------------------------
   MODALES
   -------------------------------------------------------------------------- */
.custom-modal {
    background: rgba(2, 7, 14, 0.8) !important;
    backdrop-filter: blur(18px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(120%) !important;
    padding: 18px;
}

.modal-content {
    border-radius: var(--rc-radius-xl) !important;
    border: 1px solid var(--rc-line-strong) !important;
    background:
        radial-gradient(600px 240px at 50% -10%, rgba(30, 111, 255, 0.22), transparent 70%),
        linear-gradient(170deg, rgba(10, 29, 54, 0.96), rgba(4, 12, 24, 0.98)) !important;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: var(--rc-text) !important;
}

.close-modal-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    border: 1px solid var(--rc-line);
    background: rgba(4, 14, 28, 0.6);
    color: #c7dbff !important;
    font-size: 18px !important;
    line-height: 1;
    transition: background 0.2s, border-color 0.2s;
}

.close-modal-btn:hover {
    background: rgba(251, 113, 133, 0.2);
    border-color: rgba(251, 113, 133, 0.4);
    color: #fff !important;
}

.btn-pay-real {
    border-radius: var(--rc-radius-pill) !important;
    font-size: 13px !important;
}

.btn-pay-real.ad-color {
    background: rgba(30, 111, 255, 0.16) !important;
    border: 1px solid rgba(126, 176, 255, 0.3) !important;
}

/* Modal de información de rutas */
#infoGeneralModal .modal-content {
    width: min(620px, 100%) !important;
    max-width: 620px !important;
    max-height: min(86vh, 860px) !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

#infoGeneralModal .info-modal-head {
    position: relative;
    flex: 0 0 auto;
    padding: 24px 58px 20px 24px;
    border-bottom: 1px solid rgba(126, 176, 255, 0.14);
    background:
        radial-gradient(520px 180px at 12% -20%, rgba(34, 211, 238, 0.22), transparent 70%),
        linear-gradient(135deg, rgba(30, 111, 255, 0.28), rgba(7, 20, 38, 0.4));
}

#infoGeneralModal .info-modal-head h2 {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 800;
    text-align: left !important;
    letter-spacing: -0.02em;
    color: #fff !important;
}

#infoGeneralModal .info-modal-head p {
    margin: 6px 0 0;
    font-size: 11.5px;
    color: #b9cfe9;
    line-height: 1.5;
}

#infoGeneralModal .info-modal-head .close-modal-btn {
    position: absolute;
    top: 18px;
    right: 18px;
}

#infoGeneralModal .info-sheet-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 22px 8px;
    scrollbar-gutter: stable;
}

#infoGeneralModal .info-sheet-body > div {
    margin-bottom: 16px !important;
    padding: 18px !important;
    border-radius: var(--rc-radius-lg) !important;
    border: 1px solid rgba(126, 176, 255, 0.14) !important;
    background: linear-gradient(160deg, rgba(11, 31, 58, 0.6), rgba(5, 15, 30, 0.55)) !important;
    border-top: 1px solid rgba(126, 176, 255, 0.18) !important;
}

#infoGeneralModal .info-sheet-body h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 14px !important;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(126, 176, 255, 0.12);
    color: #eaf3ff !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
}

#infoGeneralModal .info-sheet-body h4 {
    color: #9fb6d4 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#infoGeneralModal .info-sheet-body p {
    color: #b3c9e2 !important;
    font-size: 12.5px !important;
    line-height: 1.65 !important;
}

#infoGeneralModal .info-sheet-body strong {
    color: #fff !important;
}

/* Tarjetas, listas y tablas del modal de rutas */
#infoGeneralModal .info-sheet-body .info-card {
    padding: 13px 15px;
    border-radius: var(--rc-radius-md);
    border: 1px solid rgba(126, 176, 255, 0.12);
    background: rgba(30, 111, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#infoGeneralModal .info-sheet-body .info-card + .info-card {
    margin-top: 10px;
}

#infoGeneralModal .info-sheet-body .info-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #fbbf24 !important;
}

#infoGeneralModal .info-sheet-body .info-subtitle {
    margin: 16px 0 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9fb6d4 !important;
}

#infoGeneralModal .info-sheet-body .info-list {
    margin: 0;
    padding-left: 17px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

#infoGeneralModal .info-sheet-body .info-list li {
    color: #b3c9e2;
    font-size: 12.5px;
    line-height: 1.6;
}

#infoGeneralModal .info-sheet-body .info-list li::marker {
    color: #7eb0ff;
}

#infoGeneralModal .info-sheet-body .info-list a {
    color: #7eb0ff;
    word-break: break-word;
    text-decoration: underline;
}

#infoGeneralModal .info-sheet-body .info-table-wrap {
    margin: 6px 0;
    overflow-x: auto;
    border: 1px solid rgba(126, 176, 255, 0.14);
    border-radius: var(--rc-radius-md);
    -webkit-overflow-scrolling: touch;
}

#infoGeneralModal .info-sheet-body .info-table {
    width: 100%;
    min-width: 340px;
    border-collapse: collapse;
    font-size: 12px;
}

#infoGeneralModal .info-sheet-body .info-table th,
#infoGeneralModal .info-sheet-body .info-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(126, 176, 255, 0.1);
    color: #b3c9e2;
    line-height: 1.45;
    vertical-align: top;
}

#infoGeneralModal .info-sheet-body .info-table thead th {
    background: rgba(30, 111, 255, 0.16);
    color: #eaf3ff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#infoGeneralModal .info-sheet-body .info-table th:not(:first-child),
#infoGeneralModal .info-sheet-body .info-table td:not(:first-child) {
    text-align: center;
    white-space: nowrap;
}

#infoGeneralModal .info-sheet-body .info-table tbody tr:last-child td {
    border-bottom: none;
}

#infoGeneralModal .info-sheet-body .info-table tbody tr.info-table-total td {
    background: rgba(34, 211, 238, 0.12);
    color: #ffffff;
    font-weight: 700;
}

#infoGeneralModal .info-sheet-body .info-note {
    margin: 6px 0 0 !important;
    font-size: 11.5px !important;
    line-height: 1.6 !important;
    color: #94a3b8 !important;
}

/* --------------------------------------------------------------------------
   MODAL DE RUTAS EN MÓVIL: tablas completas y textos más legibles
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    #infoGeneralModal .info-modal-head h2 {
        font-size: 16.5px !important;
    }

    #infoGeneralModal .info-sheet-body {
        padding: 16px 13px 6px;
    }

    #infoGeneralModal .info-sheet-body > div {
        padding: 15px 14px !important;
    }

    #infoGeneralModal .info-sheet-body h3 {
        font-size: 15.5px !important;
        gap: 8px;
    }

    #infoGeneralModal .info-sheet-body p {
        font-size: 13.5px !important;
        line-height: 1.7 !important;
    }

    #infoGeneralModal .info-sheet-body .info-card {
        padding: 12px 13px;
    }

    #infoGeneralModal .info-sheet-body .info-label {
        font-size: 13px;
    }

    #infoGeneralModal .info-sheet-body .info-list {
        padding-left: 15px;
        gap: 8px;
    }

    #infoGeneralModal .info-sheet-body .info-list li {
        font-size: 13.5px;
        line-height: 1.7;
    }

    #infoGeneralModal .info-sheet-body .info-note {
        font-size: 12.5px !important;
        line-height: 1.65 !important;
    }

    /* Tablas: cada fila pasa a ser una tarjeta con pares etiqueta/valor,
       así se ven completas sin scroll horizontal */
    #infoGeneralModal .info-sheet-body .info-table-wrap {
        margin: 4px 0;
        overflow-x: visible;
        border: none;
    }

    #infoGeneralModal .info-sheet-body .info-table {
        display: block;
        width: 100%;
        min-width: 0;
        font-size: 13px;
    }

    #infoGeneralModal .info-sheet-body .info-table thead {
        display: none;
    }

    #infoGeneralModal .info-sheet-body .info-table tbody,
    #infoGeneralModal .info-sheet-body .info-table tr,
    #infoGeneralModal .info-sheet-body .info-table td {
        display: block;
        width: 100%;
    }

    #infoGeneralModal .info-sheet-body .info-table tr {
        margin-bottom: 8px;
        padding: 10px 12px 11px;
        border: 1px solid rgba(126, 176, 255, 0.14);
        border-radius: var(--rc-radius-md);
        background: rgba(30, 111, 255, 0.07);
    }

    #infoGeneralModal .info-sheet-body .info-table tr:last-child {
        margin-bottom: 0;
    }

    #infoGeneralModal .info-sheet-body .info-table td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
        padding: 4px 0;
        border: none;
        text-align: right;
        white-space: normal;
    }

    #infoGeneralModal .info-sheet-body .info-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        max-width: 58%;
        color: #9fb6d4;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        text-align: left;
        line-height: 1.4;
    }

    /* La primera celda funciona como título de la fila */
    #infoGeneralModal .info-sheet-body .info-table td:first-child {
        display: block;
        padding: 0 0 6px;
        margin-bottom: 5px;
        border-bottom: 1px dashed rgba(126, 176, 255, 0.18);
        color: #eaf3ff;
        font-weight: 700;
        text-align: left;
        white-space: normal;
    }

    #infoGeneralModal .info-sheet-body .info-table td:first-child::before {
        display: none;
    }

    #infoGeneralModal .info-sheet-body .info-table tbody tr.info-table-total td {
        background: transparent;
    }

    #infoGeneralModal .info-sheet-body .info-table tr.info-table-total {
        background: rgba(34, 211, 238, 0.12);
        border-color: rgba(34, 211, 238, 0.3);
    }
}

#infoGeneralModal .info-sheet-body div[style*="background"] {
    border-radius: var(--rc-radius-md) !important;
    border: 1px solid rgba(126, 176, 255, 0.12) !important;
    background: rgba(30, 111, 255, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

#infoGeneralModal .info-sheet-body div[style*="border-left: 3px solid #f59e0b"] {
    border-left: 3px solid var(--rc-warning) !important;
    background: rgba(251, 191, 36, 0.08) !important;
}

#infoGeneralModal .info-sheet-body div[style*="border-left: 3px solid #ef4444"] {
    border-left: 3px solid var(--rc-danger) !important;
    background: rgba(251, 113, 133, 0.08) !important;
}

#infoGeneralModal .info-modal-foot {
    flex: 0 0 auto;
    padding: 14px 22px 20px;
    border-top: 1px solid rgba(126, 176, 255, 0.12);
    background: rgba(4, 12, 24, 0.6);
}

#infoGeneralModal .info-close-btn {
    width: 100%;
    padding: 13px;
    border-radius: var(--rc-radius-pill) !important;
    border: 1px solid rgba(126, 176, 255, 0.3) !important;
    background: linear-gradient(135deg, rgba(30, 111, 255, 0.4), rgba(11, 71, 184, 0.34)) !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.2s var(--rc-ease), background 0.2s, box-shadow 0.2s;
}

#infoGeneralModal .info-close-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(43, 123, 255, 0.58), rgba(11, 71, 184, 0.5)) !important;
    box-shadow: 0 12px 30px rgba(30, 111, 255, 0.3);
}

/* --------------------------------------------------------------------------
   MAPA: panel administrador
   -------------------------------------------------------------------------- */
.sidebar-admin {
    top: 80px !important;
    left: -372px !important;
    width: 360px !important;
    height: calc(100vh - 92px) !important;
    height: calc(100dvh - 92px) !important;
    padding: 20px !important;
    border-radius: 0 var(--rc-radius-xl) var(--rc-radius-xl) 0 !important;
    border-right: 1px solid var(--rc-line) !important;
    background:
        radial-gradient(540px 260px at 0% 0%, rgba(34, 211, 238, 0.14), transparent 68%),
        linear-gradient(170deg, rgba(10, 29, 54, 0.96), rgba(4, 12, 24, 0.97)) !important;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.5), inset -1px 0 0 rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(22px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(140%) !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(126, 176, 255, 0.24) rgba(3, 10, 20, 0.5);
}

.sidebar-admin.open {
    left: 8px !important;
}

.sidebar-admin h3 {
    padding-right: 34px;
    font-size: 17px !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff !important;
}

.sidebar-admin h3::before {
    content: 'ADMIN';
    display: block;
    margin-bottom: 5px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.28em;
    color: rgba(142, 192, 255, 0.7);
}

.sidebar-admin .close-btn {
    top: 18px !important;
    right: 18px !important;
    border-radius: 11px !important;
    width: 34px !important;
    height: 34px !important;
    border: 1px solid var(--rc-line) !important;
    background: rgba(4, 14, 28, 0.6) !important;
    color: #c7dbff !important;
}

.admin-note {
    color: var(--rc-dim) !important;
    font-size: 11px !important;
    margin-bottom: 16px !important;
}

.admin-actions {
    gap: 8px !important;
}

.btn-admin-act {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 11px 14px !important;
    border-radius: var(--rc-radius-md) !important;
    border: 1px solid rgba(126, 176, 255, 0.18) !important;
    background: rgba(11, 31, 58, 0.55) !important;
    color: #cfe4ff !important;
    font-size: 12px !important;
    font-weight: 600;
    text-align: left;
    transition: background 0.2s, border-color 0.2s, transform 0.2s !important;
}

.btn-admin-act:hover {
    background: rgba(30, 111, 255, 0.24) !important;
    border-color: rgba(126, 176, 255, 0.4) !important;
    color: #fff !important;
    transform: translateX(2px);
}

.btn-danger-outline {
    background: rgba(251, 113, 133, 0.06) !important;
    border-color: rgba(251, 113, 133, 0.26) !important;
    color: #ffb3c0 !important;
}

.btn-danger-outline:hover {
    background: rgba(251, 113, 133, 0.2) !important;
    border-color: rgba(251, 113, 133, 0.42) !important;
    color: #fff !important;
}

/* Submenús del administrador */
.sidebar-admin [id$="Submenu"] {
    padding: 8px !important;
    border-radius: var(--rc-radius-lg) !important;
    border: 1px solid rgba(126, 176, 255, 0.1);
    background: rgba(3, 10, 20, 0.32);
    margin: 4px 0 6px !important;
}

.sidebar-admin [id$="Submenu"] .btn-admin-act {
    background: transparent !important;
    border-color: transparent !important;
    padding: 9px 10px !important;
    font-size: 11.5px !important;
    color: #b9cfe9 !important;
}

.sidebar-admin [id$="Submenu"] .btn-admin-act:hover {
    background: rgba(30, 111, 255, 0.18) !important;
    border-color: rgba(126, 176, 255, 0.2) !important;
    color: #fff !important;
}

.sidebar-admin [id$="Submenu"] .btn-danger-outline {
    color: #ffb3c0 !important;
}

/* Grupos comprimidos de rutas / geocercas / zonas */
.admin-list-groups {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.admin-list-group {
    overflow: hidden;
    border-radius: var(--rc-radius-md);
    border: 1px solid rgba(126, 176, 255, 0.14);
    background: rgba(4, 14, 28, 0.5);
}

.admin-list-group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #b9cfe9;
    transition: background 0.2s, color 0.2s;
}

.admin-list-group > summary::-webkit-details-marker {
    display: none;
}

.admin-list-group > summary::before {
    content: '';
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 2px;
    background: var(--rc-primary-soft);
    box-shadow: 0 0 8px rgba(77, 141, 255, 0.6);
}

.admin-list-group > summary .alg-label {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.admin-list-group > summary:hover {
    background: rgba(30, 111, 255, 0.14);
    color: #fff;
}

.admin-list-group[open] > summary {
    background: rgba(30, 111, 255, 0.16);
    color: #fff;
    border-bottom: 1px solid rgba(126, 176, 255, 0.12);
}

.admin-list-group > summary .alg-arrow {
    font-size: 9px;
    color: #8ec0ff;
    transition: transform 0.22s var(--rc-ease);
}

.admin-list-group[open] > summary .alg-arrow {
    transform: rotate(180deg);
}

.alg-count {
    flex: 0 0 auto;
    min-width: 24px;
    padding: 1px 7px;
    border-radius: var(--rc-radius-pill);
    border: 1px solid rgba(126, 176, 255, 0.22);
    background: rgba(30, 111, 255, 0.16);
    color: #bcd8ff;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0;
}

.alg-body {
    padding: 6px;
    max-height: 230px;
    overflow-y: auto;
}

.admin-list-group .geofences-list {
    margin-top: 0 !important;
    gap: 2px !important;
}

.admin-list-group .geofence-item,
.admin-list-group .admin-route-item {
    border-bottom: 1px solid rgba(126, 176, 255, 0.06) !important;
    border-radius: 8px !important;
    padding: 6px 8px !important;
    font-size: 11.5px !important;
    color: #c3d7ee !important;
}

.admin-list-group .geofence-item:hover,
.admin-list-group .admin-route-item:hover {
    background: rgba(30, 111, 255, 0.12) !important;
}

.admin-list-group .geofence-item input[type="checkbox"] {
    accent-color: var(--rc-primary) !important;
}

/* Formularios admin */
.dynamic-form-panel {
    border-radius: var(--rc-radius-lg) !important;
    border: 1px solid rgba(126, 176, 255, 0.16) !important;
    background: linear-gradient(160deg, rgba(11, 31, 58, 0.6), rgba(4, 14, 28, 0.62)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.dynamic-form-panel h4 {
    color: #8ec0ff !important;
    font-size: 10.5px !important;
    letter-spacing: 0.16em !important;
}

.form-group-block input,
.form-group-block select,
.admin-select {
    border-radius: 11px !important;
    border: 1px solid rgba(126, 176, 255, 0.18) !important;
    background: rgba(4, 14, 28, 0.7) !important;
    color: var(--rc-text) !important;
    font-size: 12px !important;
}

.form-group-block input:focus,
.form-group-block select:focus,
.admin-select:focus {
    border-color: rgba(126, 176, 255, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(30, 111, 255, 0.16) !important;
    background: rgba(7, 22, 42, 0.9) !important;
}

.btn-action {
    border-radius: var(--rc-radius-pill) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 11px !important;
}

.btn-blue {
    background: linear-gradient(135deg, #2b7bff, #0b47b8) !important;
    border: 1px solid rgba(160, 205, 255, 0.4) !important;
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(30, 111, 255, 0.28) !important;
}

.btn-grey {
    background: rgba(51, 65, 85, 0.5) !important;
}

.btn-danger {
    background: rgba(251, 113, 133, 0.34) !important;
    border: 1px solid rgba(251, 113, 133, 0.5) !important;
}

/* --------------------------------------------------------------------------
   Microinteracciones / animaciones
   -------------------------------------------------------------------------- */
@keyframes rc-dash {
    from { stroke-dashoffset: 440; }
    to { stroke-dashoffset: 0; }
}

@keyframes rc-dash-reverse {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: 440; }
}

@keyframes rc-pulse-ring {
    0% { transform: scale(0.55); opacity: 0; }
    45% { opacity: 0.75; }
    100% { transform: scale(1.9); opacity: 0; }
}

@keyframes rc-pulse-dot {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.25); }
}

@keyframes rc-drift-a {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(8%, 10%, 0) scale(1.12); }
}

@keyframes rc-drift-b {
    from { transform: translate3d(0, 0, 0) scale(1.05); }
    to { transform: translate3d(-7%, -8%, 0) scale(0.95); }
}

@keyframes rc-shimmer {
    from { background-position: -180% 0; }
    to { background-position: 180% 0; }
}

.rc-flow {
    fill: none;
    stroke: #7fb0ff;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 90 300;
    animation: rc-dash 8s linear infinite;
    filter: drop-shadow(0 0 6px rgba(127, 176, 255, 0.85));
}

.rc-flow.rc-flow-fast {
    animation-duration: 5.6s;
    stroke: #67e8f9;
}

.rc-flow.rc-flow-slow {
    animation-duration: 12s;
    animation-name: rc-dash-reverse;
    stroke: #4d8dff;
}

.rc-node {
    fill: #8ec0ff;
    filter: drop-shadow(0 0 8px rgba(142, 192, 255, 0.9));
}

.rc-node-ring {
    fill: none;
    stroke: #4d8dff;
    stroke-width: 1.6;
    transform-box: fill-box;
    transform-origin: center;
    animation: rc-pulse-ring 3s ease-out infinite;
}

.rc-node-ring.rc-delay-1 { animation-delay: 0.9s; }
.rc-node-ring.rc-delay-2 { animation-delay: 1.8s; }

.rc-art-line {
    fill: none;
    stroke: rgba(126, 176, 255, 0.24);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rc-art-line-strong {
    fill: none;
    stroke: rgba(77, 141, 255, 0.5);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    body::before,
    body::after {
        animation: none !important;
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
    .rc-hero-inner {
        grid-template-columns: 1fr;
        padding: 44px 30px;
        gap: 26px;
    }

    .rc-hero-copy .subtitle {
        max-width: none;
    }

    .rc-hero-panel {
        padding: 22px;
    }
}

@media (max-width: 720px) {
    .rc-topbar {
        top: 10px;
        padding: 8px 10px;
        gap: 8px;
    }

    .rc-brand-logo {
        width: 36px;
        height: 36px;
    }

    .rc-brand-name {
        font-size: 15px;
    }

    .rc-brand-name small {
        display: none;
    }

    .rc-pill-link {
        display: none;
    }

    .rc-main {
        width: min(100% - 20px, 1180px);
        padding-top: 20px;
    }

    .rc-hero {
        border-radius: 22px;
    }

    .rc-hero-inner {
        padding: 34px 20px;
    }

    .rc-hero-copy h1 {
        font-size: 44px;
    }

    .rc-editorial {
        grid-template-columns: 1fr;
    }

    .page-home .editorial-card-accent,
    .page-home .editorial-bottom-section {
        padding: 22px 20px;
    }

    .rc-footer {
        width: min(100% - 20px, 1180px);
    }

    .rc-footer-card {
        padding: 22px 20px;
        border-radius: 22px;
    }

    body.legal-body {
        padding: 82px 12px 18px !important;
    }

    body.legal-body .legal-container,
    .content-container,
    .legal-container {
        padding: 30px 22px 26px !important;
        border-radius: 22px !important;
    }

    .auth-container {
        margin-top: 84px !important;
        padding: 32px 22px 28px !important;
    }

    header {
        left: 8px !important;
        right: 8px !important;
        padding: 0 10px !important;
        height: 52px !important;
    }

    .logo {
        font-size: 15px !important;
    }

    .admin-toggle-btn,
    .donation-btn-header {
        font-size: 11px !important;
        padding: 7px 10px !important;
    }

    .logout-btn,
    .menu-btn {
        font-size: 11px !important;
        padding: 7px 11px !important;
    }

    .header-left,
    .header-controls {
        gap: 6px !important;
    }

    .leaflet-top.leaflet-left,
    .leaflet-top.leaflet-right {
        top: 72px !important;
    }

    .sidebar {
        top: 72px !important;
        height: calc(100vh - 80px) !important;
        height: calc(100dvh - 80px) !important;
        width: min(92vw, 360px) !important;
        border-radius: 20px 0 0 20px !important;
    }

    .sidebar.open {
        right: 0 !important;
    }

    .sidebar-admin {
        top: 72px !important;
        height: calc(100vh - 80px) !important;
        height: calc(100dvh - 80px) !important;
        width: min(92vw, 370px) !important;
        border-radius: 0 20px 20px 0 !important;
    }

    .sidebar-admin.open {
        left: 0 !important;
    }

    #activeRoutesFloatPanel {
        border-radius: 20px !important;
        padding: 9px 11px !important;
    }

    #infoGeneralModal .info-modal-head {
        padding: 20px 54px 16px 18px;
    }

    #infoGeneralModal .info-sheet-body {
        padding: 16px 14px 6px;
    }

    #infoGeneralModal .info-sheet-body > div {
        padding: 15px !important;
    }

    #infoGeneralModal .info-modal-foot {
        padding: 12px 14px 16px;
    }
}

@media (max-width: 460px) {
    .rc-brand-name {
        font-size: 14px;
    }

    .page-home .nav-btn {
        font-size: 12.5px;
        padding: 13px 18px;
    }

    .admin-toggle-btn {
        max-width: 92px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo::before {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   PÁGINA 404
   -------------------------------------------------------------------------- */
.rc-error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    gap: 24px;
    padding: 96px 20px 40px;
}

.rc-error-container {
    position: relative;
    width: min(560px, 100%);
    margin: 0 !important;
    padding: 48px 34px !important;
    text-align: center;
    border-radius: var(--rc-radius-xl) !important;
    border: 1px solid var(--rc-line) !important;
    background:
        radial-gradient(520px 240px at 50% -30%, rgba(34, 211, 238, 0.16), transparent 70%),
        linear-gradient(160deg, rgba(10, 29, 54, 0.78), rgba(4, 12, 24, 0.78)) !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
}

.rc-error-container::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto;
    height: 240px;
    background: radial-gradient(circle, rgba(30, 111, 255, 0.35), transparent 65%);
    filter: blur(10px);
    pointer-events: none;
}

.rc-error-code {
    position: relative;
    margin-bottom: 6px;
    font-size: clamp(74px, 16vw, 120px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #8ec0ff 0%, #2b7bff 45%, #22d3ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 14px 32px rgba(30, 111, 255, 0.4));
}

.rc-error-container h1 {
    position: relative;
    margin: 0 0 12px !important;
    color: #fff !important;
    font-size: clamp(22px, 4vw, 30px) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

.rc-error-container p {
    position: relative;
    margin: 0 auto 26px !important;
    max-width: 380px;
    color: #b3c9e2 !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
}

.rc-error-container .nav-links {
    position: relative;
    display: flex;
    justify-content: center;
}

.rc-error-container .back-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 30px;
    border-radius: var(--rc-radius-pill);
    border: 1px solid rgba(126, 176, 255, 0.32);
    background: linear-gradient(135deg, rgba(30, 111, 255, 0.72), rgba(11, 71, 184, 0.62));
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 16px 40px rgba(30, 111, 255, 0.32);
    transition: transform 0.2s var(--rc-ease), box-shadow 0.2s, background 0.2s;
}

.rc-error-container .back-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 52px rgba(30, 111, 255, 0.42);
    background: linear-gradient(135deg, rgba(43, 123, 255, 0.85), rgba(11, 71, 184, 0.75));
}/* ==========================================================================
   MAPA · OPTIMIZACIÓN DE RENDIMIENTO
   El mapa se repinta en cada arrastre, zoom y animación. Un backdrop-filter
   encima obliga a recalcular un desenfoque por frame: es la causa principal
   de los tirones en Android. Aquí se sustituye por fondos equivalentes, así
   que el aspecto es el mismo pero sin costo de GPU.
   ========================================================================== */

body.map-page header,
body.map-page .sidebar,
body.map-page .sidebar-admin,
body.map-page .sidebar .close-btn,
body.map-page .sidebar .user-status-container,
body.map-page .search-box,
body.map-page .menu-btn,
body.map-page .logout-btn,
body.map-page .admin-toggle-btn,
body.map-page .donation-btn-header,
body.map-page .btn-admin-act,
body.map-page .btn-liquid-glass,
body.map-page .btn-activate-all,
body.map-page .btn-info-glass,
body.map-page .dynamic-form-panel,
body.map-page .custom-modal,
body.map-page .modal-content,
body.map-page .tooltip-text-custom,
body.map-page .custom-route-tooltip,
body.map-page .premium-card-box,
body.map-page .leaflet-popup-content-wrapper,
body.map-page .leaflet-popup-tip,
body.map-page .leaflet-control-attribution,
body.map-page #activeRoutesFloatPanel,
body.map-page #routeSelectionPanel,
body.map-page .route-badge {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* El header va sobre el mapa: sin desenfoque necesita un fondo algo más opaco
   para que el texto siga teniendo el mismo contraste. */
body.map-page header {
    background: linear-gradient(120deg, rgba(9, 26, 50, 0.96), rgba(5, 15, 30, 0.94)) !important;
}

/* Sin halos difuminados animados detrás del mapa (se pintaban por frame) */
body.map-page::before,
body.map-page::after {
    content: none !important;
    display: none !important;
    animation: none !important;
}

/* Fondo neutro bajo los tiles: al alejar el mapa ya no aparecen bloques
   azulados mientras cargan. Es el mismo gris claro de OpenStreetMap. */
body.map-page #map,
body.map-page .leaflet-container {
    background: #e9eef4 !important;
}

/* Aísla el pintado del mapa del resto de la página */
body.map-page #map {
    contain: layout paint;
}

/* Insignia del botón de información: se queda visible pero deja de animarse
   de forma infinita (era un repintado constante dentro del panel). */
body.map-page .btn-info-glass .btn-badge {
    animation: none !important;
    opacity: 1 !important;
}

/* Deslizamiento del panel lateral más barato en móviles */
@media (max-width: 600px) {
    body.map-page .sidebar,
    body.map-page .sidebar-admin {
        transition-duration: 0.22s;
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.45) !important;
    }
}
