@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap');

:root {
    --route-nav-height: 72px;
    --route-font: Lato, Arial, sans-serif;
    --frotcom-blue: #0082c9;
    --frotcom-blue-dark: #00669f;
    --frotcom-blue-soft: #e6f5fb;
    --frotcom-red: #cd1421;
    --frotcom-red-dark: #9f0f19;
    --frotcom-grey: #263745;
    --frotcom-grey-soft: #edf2f5;
    --frotcom-orange: #ff6b00;
    --route-primary: var(--frotcom-blue);
    --route-primary-dark: var(--frotcom-blue-dark);
    --route-bg: #f3f6f8;
    --route-card: #ffffff;
    --route-border: #d8e2e8;
    --route-text: #263745;
    --route-muted: #657584;
}

.route-admin-nav {
    min-height: var(--route-nav-height);
    position: sticky;
    top: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 22px;
    box-sizing: border-box;
    color: #ffffff;
    background: linear-gradient(115deg, var(--frotcom-grey) 0%, #1d4e6a 54%, var(--frotcom-blue) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: 0 8px 24px rgba(38, 55, 69, 0.22);
}

.route-admin-nav__brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 230px;
}

.route-admin-nav__brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 44px;
    flex: 0 0 110px;
    padding: 5px 9px;
    overflow: hidden;
    border-radius: 8px;
}

.route-admin-nav__brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.route-admin-nav__brand strong,
.route-admin-nav__brand small {
    display: block;
}

.route-admin-nav__brand strong {
    font-size: 14px;
    letter-spacing: 0.01em;
}

.route-admin-nav__brand small {
    margin-top: 2px;
    color: #c8e9f6;
    font-size: 11px;
}

.route-admin-nav__links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.route-admin-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #e6f5fb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.route-admin-nav__link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.route-admin-nav__link.active {
    color: var(--frotcom-grey);
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 5px 15px rgba(38, 55, 69, 0.18);
}

.route-admin-nav__icon {
    font-size: 15px;
    line-height: 1;
}

.route-dashboard-page .sticky-panel,
.route-detail-page .sticky-panel {
    top: var(--route-nav-height) !important;
}




.route-detail-page .summary-table-wrap {
    max-height: calc(100vh - var(--sticky-toolbar-height, 170px) - var(--route-nav-height) - 22px) !important;
}

.route-dashboard-page .page-header,
.route-detail-page .page-header {
    margin-top: 18px;
}

@media (max-width: 820px) {
    :root { --route-nav-height: 112px; }

    .route-admin-nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 10px 14px;
    }

    .route-admin-nav__brand small { display: none; }
    .route-admin-nav__links { width: 100%; justify-content: flex-start; }
    .route-admin-nav__link { flex: 1 1 auto; justify-content: center; padding: 0 8px; }
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    min-height: 100%;
    font-family: var(--route-font);
}

/* La página de detalle conserva solo la tabla y sus herramientas. */


/* Sincronización compartida */
        .sync-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.55);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .sync-overlay.hidden {
            display: none;
        }

        .sync-box {
            width: min(520px, calc(100% - 32px));
            background: #ffffff;
            border-radius: 16px;
            padding: 24px;
            box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
        }

        .sync-title {
            font-size: 20px;
            font-weight: 700;
            color: var(--route-text);
            margin-bottom: 8px;
        }

        .sync-step {
            font-size: 14px;
            color: #475569;
            margin-bottom: 16px;
        }

        .sync-progress-wrap {
            width: 100%;
            height: 14px;
            background: #e5e7eb;
            border-radius: 999px;
            overflow: hidden;
        }

        .sync-progress-bar {
            height: 100%;
            background: var(--route-primary);
            border-radius: 999px;
            transition: width 0.35s ease;
        }

        .sync-percent {
            margin-top: 10px;
            font-size: 14px;
            font-weight: 700;
            color: var(--route-text);
            text-align: right;
        }

        .sync-message {
            margin-top: 8px;
            font-size: 13px;
            color: #64748b;
        }


/* Cabecera introductoria compartida de Dashboard, Detalle y Configurador */
.route-page-heading {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    margin: 0 0 16px;
    padding: 20px 22px 20px 26px;
    overflow: hidden;
    color: var(--route-text);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, var(--frotcom-blue-soft) 100%);
    border: 1px solid #cfe4ee;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(38, 55, 69, 0.07);
}

.route-page-heading::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--frotcom-blue), var(--frotcom-orange));
}

.route-page-heading__content {
    min-width: 0;
    max-width: 900px;
}

.route-page-heading h1 {
    margin: 0;
    color: var(--route-text);
    font-size: clamp(22px, 2vw, 27px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.route-page-heading p {
    max-width: 880px;
    margin: 8px 0 0;
    color: var(--route-muted);
    font-size: 13px;
    line-height: 1.55;
}

.route-page-heading__meta {
    flex: 0 0 auto;
    min-width: 128px;
    padding: 4px 0 0 18px;
    text-align: right;
    border-left: 1px solid #cfe4ee;
}

.route-page-heading__meta strong {
    display: block;
    color: var(--frotcom-blue);
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.route-page-heading__meta span {
    display: block;
    margin-top: 5px;
    color: var(--route-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}

.route-dashboard-page .dashboard-page,
.route-detail-page .route-detail-content,
.route-config-page .config-page {
    padding-top: 18px;
}

@media (max-width: 720px) {
    .route-page-heading {
        flex-direction: column;
        gap: 14px;
        padding: 18px 18px 18px 22px;
    }

    .route-page-heading__meta {
        min-width: 0;
        padding: 12px 0 0;
        text-align: left;
        border-top: 1px solid #cfe4ee;
        border-left: 0;
    }
}

/* =========================================================
   Sistema visual común: tipografía, controles y tablas
   ========================================================= */
.route-dashboard-page,
.route-detail-page,
.route-map-page,
.route-config-page {
    font-family: var(--route-font);
    font-size: 13px;
    line-height: 1.42;
}

.route-dashboard-page input,
.route-dashboard-page select,
.route-dashboard-page button,
.route-dashboard-page textarea,
.route-detail-page input,
.route-detail-page select,
.route-detail-page button,
.route-detail-page textarea,
.route-map-page input,
.route-map-page select,
.route-map-page button,
.route-map-page textarea,
.route-config-page input,
.route-config-page select,
.route-config-page button,
.route-config-page textarea {
    font-family: var(--route-font);
    font-size: 12px;
    line-height: 1.25;
}

.route-dashboard-page table,
.route-detail-page table,
.route-map-page table,
.route-config-page table {
    font-family: var(--route-font);
    font-size: 12px;
    line-height: 1.32;
}

.route-dashboard-page th,
.route-detail-page th,
.route-map-page th,
.route-config-page th {
    color: var(--frotcom-grey);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.22;
}

.route-dashboard-page td,
.route-detail-page td,
.route-map-page td,
.route-config-page td {
    color: var(--route-text);
    font-size: 12px;
    line-height: 1.32;
}

.route-dashboard-page .route-page-heading h1,
.route-detail-page .route-page-heading h1,
.route-map-page .route-page-heading h1,
.route-config-page .route-page-heading h1 {
    font-size: 25px;
}

.route-dashboard-page .route-page-heading p,
.route-detail-page .route-page-heading p,
.route-map-page .route-page-heading p,
.route-config-page .route-page-heading p {
    font-size: 13px;
}

.route-dashboard-page .route-page-heading__meta strong,
.route-detail-page .route-page-heading__meta strong,
.route-map-page .route-page-heading__meta strong,
.route-config-page .route-page-heading__meta strong {
    font-size: 28px;
}
