/* -------------------------------------------------
Brand tokens (tune here only)
-------------------------------------------------- */
:root{
    --brand-primary: #09398E;
    --brand-secondary: #0F4E6F;
    /* Legacy names: templates and older rules use --brand-orange */
    --brand-orange: var(--brand-primary);
    --brand-orange-dark: var(--brand-secondary);
    /* Primary #09398E at common alphas (8-digit hex) */
    --brand-tint-07: #09398E12;
    --brand-tint-08: #09398E14;
    --brand-tint-10: #09398E1A;
    --brand-tint-12: #09398E1F;
    --brand-tint-15: #09398E26;
    --brand-tint-18: #09398E2E;
    --brand-tint-35: #09398E59;
    --brand-tint-65: #09398EA6;
    --ink: #111111;
    --muted: #6b7280;
    --card-radius: 12px;            /* reduced from 18px to match images */
    --soft-radius: 12px;
    --stroke: 3px;
    --bg-page: #F4F7FA;             /* light gray background */
    --bs-body-font-size: 0.85rem;    /* slightly smaller base font size */
}

/* -------------------------------------------------
Page background like the mockups (soft curves)
-------------------------------------------------- */
body.flotas-theme{
    background: #F6F6F6;
    color: var(--ink);
    min-height: 100vh;
    position: relative;
}

body.flotas-theme::before{
    content:"";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;

    /* soft “wave” gradients */
    background:
        radial-gradient(1200px 800px at 10% 20%, rgba(0,0,0,0.04), transparent 60%),
        radial-gradient(1000px 700px at 90% 55%, rgba(0,0,0,0.05), transparent 58%),
        radial-gradient(900px 600px at 45% 90%, rgba(0,0,0,0.035), transparent 55%),
        linear-gradient(#F7F7F7, #F7F7F7);
}

/* -------------------------------------------------
Typography (big bold titles like mocks)
-------------------------------------------------- */
.flotas-h1{
    font-weight: 900;
    font-size: clamp(2.2rem, 3.4vw, 3.2rem);
    margin: 0 0 .35rem 0;
}

.flotas-subtitle{
    font-size: 1.25rem;
    color: #222;
    opacity: .9;
}

.flotas-link {
    color: var(--brand-orange);
    text-decoration: none;
}

.flotas-summary-stat-icon {
    font-size: 2rem;
}

.flotas-table-status-badge {
    font-size: 0.85rem;
}
/* -------------------------------------------------
Navbar
-------------------------------------------------- */
.navbar.flotas-navbar{
    background: transparent !important;
    border-bottom: 0;
}

.flotas-navbar .container-fluid {
    display: flex;
    align-items: center;
}

.flotas-navbar .navbar-brand{
    /* font-weight: 900; */
    margin-right: 3rem;
}

.flotas-navbar .navbar-brand img {
    width: 150px;
    height: auto;
}

.flotas-navbar .navbar-collapse {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.flotas-navbar .nav-link{
    position: relative;
    /* border-radius: 999px; */
    padding: .45rem .9rem;
    transition: background-color .15s ease, color .15s ease, opacity .15s ease;
}

.flotas-navbar .nav-link:hover{
    opacity: 1;
}

.flotas-navbar .dropdown-menu{
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 10px 30px rgba(0,0,0,.10);
}

/* current page */
.flotas-navbar .nav-link.active,
.flotas-navbar .nav-link[aria-current="page"] {
    /* background: #09398E24; */
    color: #1f1f1f !important;
    opacity: 1;
}

/* little underline accent */
.flotas-navbar .nav-link.active:not(.dropdown-toggle)::after,
.flotas-navbar .nav-link[aria-current="page"]:not(.dropdown-toggle)::after {
    content: "";
    position: absolute;
    left: .1rem;
    right: .1rem;
    bottom: .25rem;
    height: 3px;
    /* border-radius: 999px; */
    background: var(--brand-orange);
}


/* Stronger active state for main nav links */
.flotas-navbar .navbar-nav .nav-link.active {
    color: var(--brand-orange);
    font-weight: 600;
    position: relative;
}

/* Slightly brighter hover state, but not too different from active */
.flotas-navbar .navbar-nav .nav-link:hover {
    color: #2563EB;
}

/* Dropdown menu styling to match the design */
.flotas-navbar .dropdown-menu {
    border-radius: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
    padding: 0.35rem 0;
    background-color: #ffffff;
    font-size: 0.9rem;
}

.flotas-navbar .dropdown-item {
    padding: 0.4rem 1.1rem;
    color: #111827;
}

.flotas-navbar .nav-item.dropdown .nav-link.active::before {
    content: "";
    position: absolute;
    left: .3rem;
    right: .3rem;
    bottom: .35rem;
    height: 3px;
    border-radius: 999px;
    background: var(--brand-orange);
}

.flotas-navbar .dropdown-item:hover,
.flotas-navbar .dropdown-item:focus {
    background: var(--brand-tint-07);
    color: #111827;
}

.flotas-navbar .dropdown-divider {
    margin: 0.25rem 0;
}

/* Mobile toggler: ensure icon is visible on dark background */
.flotas-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.flotas-navbar .navbar-toggler-icon {
    background-image: none;
    width: 1.3rem;
    height: 1.3rem;
    position: relative;
}

.flotas-navbar .navbar-toggler-icon::before,
.flotas-navbar .navbar-toggler-icon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 999px;
    background-color: #f9fafb;
}

.flotas-navbar .navbar-toggler-icon::before {
    top: 0.35rem;
}

.flotas-navbar .navbar-toggler-icon::after {
    bottom: 0.35rem;
}

@media (min-width: 992px) {
    .flotas-navbar .navbar-nav.me-auto {
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }
}
.flotas-navbar .navbar-nav:last-of-type {
    margin-left: 0;
    margin-right: 0;
}
/* -------------------------------------------------
Containers / cards (brand outline where used)
-------------------------------------------------- */
.flotas-panel{
    background: transparent;       /* no different background - matches page */
    border-radius: var(--card-radius);
    /* padding: 24px 24px; */
}

.flotas-card{
    background: #fff;
    border-radius: var(--card-radius);
    border: none;                  /* no accent border */
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.flotas-card .card-header{
    /* background: #B2B2B2; */
    border-bottom: 0;
    /* padding: 18px 22px 0 22px; */
    /* font-weight: 900; */
    /* font-size: .7rem; */
    vertical-align: middle;
}

.flotas-card .card-body{
    padding: 18px 22px 22px 22px;
}

.flotas-card .form-check-input:checked {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange-dark);
}

/* -------------------------------------------------
Buttons (pill, brand primary)
-------------------------------------------------- */
.btn-flotas{
    --bs-btn-bg: var(--brand-orange);
    --bs-btn-border-color: var(--brand-orange);
    --bs-btn-hover-bg: var(--brand-orange-dark);
    --bs-btn-hover-border-color: var(--brand-orange-dark);
    --bs-btn-active-bg: var(--brand-orange-dark);
    --bs-btn-active-border-color: var(--brand-orange-dark);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    font-weight: bold;

    /* border-radius: 999px; */
    /* padding: .85rem 1.6rem; */
}

.btn-outline-flotas{
    /* border-radius: 999px; */
    border: 2px solid var(--brand-orange);
    color: #3b3b3b;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    justify-content: center;
}

.btn-outline-flotas:hover{
    background: var(--brand-tint-10);
    color: #1f1f1f;
    border: 2px solid var(--brand-orange);
}

/* -------------------------------------------------
Inputs (brand focus ring)
-------------------------------------------------- */
.form-control,
.form-select{
    /* border-radius: 18px; */
    border: 2px solid rgba(0,0,0,.15);
}

.form-control:focus,
.form-select:focus{
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 .25rem var(--brand-tint-18);
}

/* -------------------------------------------------
DataTables Buttons (brand bar)
-------------------------------------------------- */
.dt-buttons .btn{
    border-radius: var(--bs-btn-border-radius) !important;
    /* font-weight: 800; */
    border: 0 !important;
    padding: .5rem .9rem !important;
    background: var(--brand-orange) !important;
    color: #fff !important;
    margin-right: .35rem;
}

.dt-buttons .btn:hover{
    background: var(--brand-orange-dark) !important;
}

.dataTables_filter input{
    border-radius: 0.375rem !important;
    border: 1px solid var(--brand-orange-dark) !important;
    padding: .35rem .75rem !important;
}

/* -------------------------------------------------
Badges (e.g. “Activo”, brand fill)
-------------------------------------------------- */
.badge-flotas{
    background: var(--brand-orange);
    color: #fff;
    /* border-radius: 999px; */
    /* font-weight: 900; */
    padding: .45rem .85rem;
}

/* =========================
LANDING
========================= */

.landing {
    display: flex;
    min-height: 100vh;
}

.landing-left {
    flex: 1;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.landing-left-content {
    max-width: 90%;
    width: 100%;
    text-align: center;
}

.landing-illustration {
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
}

.landing-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.landing-right--light {
    background: #f8f9fb; /* soft light gray */
    color: #1f2933;
}

.country-selector {
    background: #ffffff;
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
}

.country-selector h2 {
    font-size: 1.4rem;
    margin-bottom: 32px;
    font-weight: 600;
}
.country-options {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.country-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.country-card img {
    width: 256px;
    height: auto;
    margin-bottom: 8px;
}

.country-card span {
    font-weight: 500;
}

.country-card:hover {
    background: #f1f3f6;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .landing {
        flex-direction: column;
    }

    .landing-left,
    .landing-right {
        flex: none;
        width: 100%;
    }

    .country-options {
        flex-direction: column;
    }
}

/* =========================
DASHBOARD
========================= */

.flotas-dashboard{
    position: relative;
    min-height: 100%;
}

/* subtle background like the mock (no external image needed) */
.flotas-dashboard::before{
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1200px 600px at 20% 20%, rgba(0,0,0,.04), transparent 60%),
        radial-gradient(900px 500px at 80% 60%, rgba(0,0,0,.05), transparent 60%),
        linear-gradient(#ffffff, #ffffff);
    pointer-events: none;
}

/* Catalog modal fragments use .catalog-modal-page (see _catalog_chrome_open) — no full-page ::before. */
.catalog-modal-page {
    padding: 0;
}

.flotas-page-title{
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

/* KPI brand blocks */
.flotas-kpi{
    background: var(--brand-orange);
    color: #fff;
    border-radius: var(--card-radius);
    padding: 22px 24px;
    box-shadow: 0 10px 26px rgba(0,0,0,.10);
    height: 100%;
}

.flotas-kpi-title{
    font-weight: bold;
    text-transform: uppercase;
    opacity: .95;
    font-size: .95rem;
    margin-bottom: .35rem;
}

.flotas-kpi-value{
    /* font-weight: 900; */
    font-size: 2.3rem;
    line-height: 1.05;
}

/* Full-width info banner (presupuestos, import hints, etc.) */
.flotas-app-banner{
    background: var(--brand-orange);
    color: #fff;
    border-radius: var(--card-radius);
    padding: 1rem 1.25rem;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Contact form card – white panel, no accent border */
.flotas-page-form-card{
    background: #fff;
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Mini cards */
.flotas-mini-card{
    border-radius: var(--card-radius);
}

.flotas-mini-title{
    font-weight: 900;
    text-transform: uppercase;
    opacity: .75;
    font-size: .95rem;
}

.flotas-mini-value{
    font-weight: 900;
    font-size: 2.2rem;
    line-height: 1.05;
    color: var(--brand-orange);
}

.flotas-mini-sub{
    margin-top: .35rem;
    font-weight: 700;
    opacity: .75;
    font-size: .95rem;
}

/* green delta badge like mock */
.flotas-mini-delta{
    background: #37b24d;
    color: #0b3d17;
    font-weight: 900;
    border-radius: 12px;
    padding: .45rem .7rem;
    min-width: 88px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0,0,0,.08);
}

/* chart placeholder lines */
.flotas-mini-chart{
    border-top: 0;
}

.flotas-mini-lines{
    display: grid;
    gap: 10px;
    padding: 6px 0 8px 0;
}

.flotas-mini-line{
    height: 2px;
    background: rgba(0,0,0,.35);
    border-radius: 999px;
}

.flotas-mini-foot{
    font-weight: 800;
    opacity: .75;
    font-size: .85rem;
}

/* Dashboard KPI cards - mockup style (white, no border, icon in pastel circle) */
.flotas-dashboard-kpi-card {
    background: #fff;
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.flotas-dashboard-kpi-title {
    /* font-size: .7rem; */
    font-weight: 600;
    /* text-transform: uppercase; */
    color: var(--muted);
    margin-bottom: .35rem;
}

.flotas-dashboard-graphs-title {
    /* font-size: .7rem; */
    font-weight: 600;
    /* text-transform: uppercase; */
    /* color: var(--muted); */
    margin-bottom: .35rem;
}

/* Station pie: give Chart.js a real height (canvas was height=80, chart stayed tiny) */
.flotas-dashboard-pie-chart-wrap {
    min-height: 300px;
    max-height: 420px;
    width: 100%;
}

/* Monthly dual-axis bar: needs height for ticks + Y-axis titles (Chart.js maintainAspectRatio: false) */
.flotas-dashboard-monthly-bar-wrap {
    min-height: 300px;
    max-height: 420px;
    width: 100%;
    overflow: visible;
}

/* Weekly line chart: stretch with sibling card (Chart.js needs explicit flex height) */
.flotas-dashboard-weekly-chart-wrap {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

/* Top vehicles by consumption (dashboard list) */
.flotas-dashboard-top-vehicles {
    padding-top: 0.25rem;
}

.flotas-dashboard-top-vehicles-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.flotas-dashboard-top-vehicles-item {
    min-width: 0;
}

.flotas-dashboard-top-vehicles-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.flotas-dashboard-top-vehicles-rank {
    font-size: 0.8rem;
    width: 1.25rem;
    flex-shrink: 0;
    text-align: right;
}

.flotas-dashboard-top-vehicles-id {
    line-height: 1.25;
}

.flotas-dashboard-top-vehicles-name {
    font-size: 0.8125rem;
}

.flotas-dashboard-top-vehicles-metrics {
    font-size: 0.875rem;
    white-space: nowrap;
}

.flotas-dashboard-top-vehicles-eff {
    font-size: 0.8125rem;
}

.flotas-dashboard-top-vehicles-bar-track {
    height: 6px;
    border-radius: 999px;
    background: #e8eaed;
    overflow: hidden;
    margin-left: 1.75rem;
}

.flotas-dashboard-top-vehicles-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: #4C8BF5;
    min-width: 0;
    transition: width 0.25s ease;
}

.flotas-dashboard-kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}

.flotas-dashboard-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.flotas-dashboard-kpi-icon.bg-orange-pastel {
    background: var(--brand-tint-15);
    color: var(--brand-orange);
}

.flotas-dashboard-kpi-icon.bg-blue-pastel {
    background: #E8EEF6;
    color: #2563EB;
}

.flotas-dashboard-kpi-icon.bg-purple-pastel {
    background: rgba(142, 103, 172, 0.15);
    color: #8E67AC;
}

.flotas-dashboard-kpi-icon.bg-red-pastel {
    background: rgba(220, 53, 69, 0.15);
    color: #DC3545;
}

.flotas-dashboard-kpi-icon.bg-green-pastel {
    background: rgba(40, 167, 69, 0.15);
    color: #28A745;
}

.flotas-dashboard-kpi-comparison {
    font-size: .85rem;
    margin-top: .5rem;
}

/* Ensure buttons look like the mock even if bootstrap styles differ */
.btn-flotas{
    box-shadow: 0 10px 18px rgba(0,0,0,.10);
}

.btn-outline-flotas{
    background: rgba(255,255,255,.7);
}

/* Presupuesto (base / período): Configurar y eliminar en la columna Límites */
.flotas-budget-line-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    max-width: 100%;
}
.flotas-budget-line-actions .btn {
    flex: 0 0 auto;
}
#linesTable .flotas-budget-line-actions .btn-outline-danger {
    min-width: 2.15rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

/* =========================
LOGIN MOCKUP (split layout)
========================= */
/* small flag top-right */
.login-flag{
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: auto;
    opacity: .9;
}

.login-card-header{
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.login-card-logo{
    width: 120px;
    height: auto;
    opacity: .9;
}
/* Inputs */
.login-form .form-label{
    font-weight: 500;
    margin-bottom: 10px;
}

.login-input{
    height: 54px;
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,.20);
    padding: 0 16px;
}

.login-input:focus{
    border-color: var(--brand-tint-65);
    box-shadow: 0 0 0 .25rem var(--brand-tint-12);
}
/* Button (brand pill) */
.login-btn{
    height: 58px;
    border-radius: var(--soft-radius);
    background: var(--brand-orange);
    border: 0;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 500;
}

.login-btn:hover{
    background: var(--brand-orange-dark);
}

/* Forgot link */
.login-forgot{
    text-align: center;
    margin-top: 18px;
}

.login-forgot a{
    color: #111;
    text-decoration: none;
    font-weight: 500;
}

.login-forgot a:hover{
    text-decoration: underline;
}


/* =========================
AUTH (Forgot/Reset flow)
========================= */

body.auth {
    background: #ffffff;
    min-height: 100vh;
}

/* Full page layout */
.auth-layout{
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
}

/* Left content */
/* .auth-left{
    padding: 72px 84px;
} */

.auth-left-inner{
    max-width: 680px;
}

.auth-logo{
    width: 250px;
    max-width: 95%;
    height: auto;
    margin-bottom: 42px;
}

.auth-title{
    font-weight: 700;
    font-size: clamp(2.6rem, 3.6vw, 3.6rem);
    margin: 0 0 18px 0;
}

.auth-subtitle{
    font-size: 1.25rem;
    font-weight: 600;
    color: #111;
    opacity: .9;
    margin-bottom: 34px;
    line-height: 1.35;
}

/* Input with icon */
.auth-input-group{
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 26px;
}

.auth-input-icon{
    position: absolute;
    left: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #111;
    opacity: .9;
}

.auth-input{
    height: 66px;
    border-radius: 18px;
    border: 3px solid rgba(0,0,0,.75);
    padding-left: 74px; /* space for icon */
    font-size: 1.35rem;
    /* font-weight: 700; */
}

.auth-input:focus{
    border-color: rgba(0,0,0,.75);
    box-shadow: none;
}

/* errors */
.auth-field-errors{
    margin-top: -18px;
    margin-bottom: 18px;
    font-size: 1.2rem;
    color: #dc3545;
}

/* Primary CTA (auth) */
.auth-btn{
    width: 100%;
    /* max-width: 560px; */
    border-radius: 18px;
    background: var(--brand-orange);
    color: #fff;
    border: 0;
    font-weight: 700;
    font-size: 2.4rem;
    box-shadow: 0 10px 18px rgba(0,0,0,.10);
}

.auth-btn:hover{
    background: var(--brand-orange-dark);
    color: #fff;
}

/* Right illustration */
.auth-right{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-illustration{
    max-width: 92%;
    height: auto;
}

/* Responsive */
@media (max-width: 992px){
    .auth-layout{
        grid-template-columns: 1fr;
    }
    .auth-right{
        display: none;
    }
    .auth-left{
        padding: 56px 28px;
    }
    .auth-btn{
        max-width: 100%;
    }
}

/* =========================
DATATABLES (Bootstrap 5) – pagination + controls
========================= */

/* Top controls row spacing */
.dataTables_wrapper .row:first-child {
    align-items: center;
    margin-bottom: 12px;
}

/* Bottom row spacing */
.dataTables_wrapper .row:last-child {
    align-items: center;
    margin-top: 14px;
}

/* "Mostrar X registros" + "Buscar" text */
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_info {
    /* font-weight: 600; */
    color: #111;
    opacity: .85;
}

/* Search input already has custom border; just make it match height */
.dataTables_wrapper .dataTables_filter input {
    height: 38px;
}

/* Pagination container */
.dataTables_wrapper .dataTables_paginate .pagination {
    gap: 10px;
    margin: 0;
}

/* All pagination links */
.dataTables_wrapper .dataTables_paginate .page-link {
    border-radius: 14px !important;
    border: 0 !important;
    padding: .6rem 1.1rem;
    /* font-weight: 800; */
    color: #fff;
    background: var(--brand-orange);
    box-shadow: 0 10px 18px rgba(0,0,0,.10);
}

/* Hover */
.dataTables_wrapper .dataTables_paginate .page-link:hover {
    background: var(--brand-orange-dark);
    color: #fff;
}

/* Active page */
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    background: var(--brand-orange-dark);
    color: #fff;
}

/* Disabled prev/next */
.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
    background: rgba(0,0,0,.12);
    color: rgba(0,0,0,.45);
    box-shadow: none;
}

/* Make Prev/Next feel like bigger pill buttons */
.dataTables_wrapper .dataTables_paginate .page-item:first-child .page-link,
.dataTables_wrapper .dataTables_paginate .page-item:last-child .page-link {
    padding: .7rem 1.4rem;
}

/* Optional: hide small "Previous/Next" focus ring */
.dataTables_wrapper .dataTables_paginate .page-link:focus {
    box-shadow: none;
}

/* =========================
SIDEBAR LAYOUT
========================= */

body.flotas-app-body {
    margin: 0;
    padding: 0;
    background: var(--bg-page);
    min-height: 100vh;
}

.flotas-app {
    display: flex;
    min-height: 100vh;
    background: var(--bg-page);
    min-width: 0;
    max-width: 100%;
}

.flotas-sidebar {
    width: 260px;
    background: #ffffff;           /* white header/sidebar */
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.flotas-sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.flotas-sidebar-logo {
    display: block;
}

.flotas-sidebar-logo img {
    width: 100%;
    max-width: 180px;
    height: auto;
}

.flotas-sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.flotas-sidebar-menu {
    list-style: none;
    padding: 5px;
    margin: 0;
}

.flotas-menu-item {
    margin: 0.25rem 0;
}

.flotas-menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: var(--ink);
    text-decoration: none;
    transition: all 0.15s ease;
    /* font-weight: 500; */
    position: relative;
}

.flotas-menu-link i:first-child {
    margin-right: 0.75rem;
    /* font-size: 1.1rem; */
    width: 20px;
    text-align: center;
}

.flotas-menu-link:hover {
    background: var(--brand-tint-08);
    color: var(--brand-orange);
}

.flotas-menu-link.active {
    background: var(--brand-orange);
    color: #ffffff;
    /* font-weight: 600; */
    border-radius: 12px;           /* pill/rounded as mockup */
}

.flotas-menu-link.active i {
    color: #ffffff;
}

.flotas-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.02);
    border-left: 3px solid var(--brand-orange);
}

.flotas-submenu-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.25rem 0.6rem 3rem;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 0.9rem;
}

.flotas-submenu-link i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.flotas-submenu-link:hover {
    background: var(--brand-tint-08);
    color: var(--brand-orange);
}

.flotas-submenu-link.active {
    background: var(--brand-tint-12);
    color: var(--brand-orange);
    font-weight: 600;
    border-radius: 8px;
}

.flotas-sidebar-user {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.02);
}

.flotas-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-orange);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

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

.flotas-user-name {
    font-weight: 600;
    /* font-size: 0.9rem; */
    color: var(--ink);
    /* white-space: nowrap; */
    overflow: hidden;
    text-overflow: ellipsis;
}

.flotas-user-email {
    font-size: 0.5rem;
    color: var(--muted);
    /* white-space: nowrap; */
    overflow: hidden;
    text-overflow: ellipsis;
}

.flotas-user-logout {
    color: var(--muted);
    text-decoration: none;
    padding: 0.5rem;
    margin-left: 0.5rem;
    transition: color 0.15s ease;
}

.flotas-user-logout:hover {
    color: var(--brand-orange);
}

.flotas-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    background: var(--bg-page);
    min-width: 0;
    max-width: 100%;
}

/* Login, landing, password reset: no sidebar — avoid reserved left gutter */
.flotas-main--full {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
}

/* Two-tier app header (white strip + optional context band) */
.flotas-app-top-header {
    margin-bottom: 0;
}

.flotas-app-top-header-bar {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.flotas-app-top-header-pad {
    padding: 0.85rem 1rem 1rem;
}

.flotas-app-top-header-pad--row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.flotas-app-top-header-text {
    flex: 1 1 auto;
    min-width: 0;
}

.flotas-app-top-header-actions {
    flex: 0 0 auto;
}

/* Customer alerts summary modal — richer layout (see customer-alerts-summary.js) */
.customer-alerts-summary__kpi {
    text-align: center;
    border-radius: 10px;
    padding: 0.65rem 0.4rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f4f6f9;
    height: 100%;
    min-height: 5.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
}

.customer-alerts-summary__kpi-icon {
    font-size: 1.15rem;
    opacity: 0.55;
    line-height: 1;
}

.customer-alerts-summary__kpi--active {
    background: #eef2f8;
    border-color: rgba(0, 0, 0, 0.1);
}

.customer-alerts-summary__kpi--active .customer-alerts-summary__kpi-icon {
    opacity: 0.85;
    color: var(--ink);
}

.customer-alerts-summary__kpi--critical {
    background: rgba(220, 53, 69, 0.08);
    border-color: rgba(220, 53, 69, 0.28);
}

.customer-alerts-summary__kpi--critical .customer-alerts-summary__kpi-icon {
    color: #dc3545;
    opacity: 1;
}

.customer-alerts-summary__kpi--warning {
    background: rgba(255, 193, 7, 0.12);
    border-color: rgba(255, 193, 7, 0.45);
}

.customer-alerts-summary__kpi--warning .customer-alerts-summary__kpi-icon {
    color: #b8860b;
    opacity: 1;
}

.customer-alerts-summary__kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink);
}

.customer-alerts-summary__kpi-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    font-weight: 600;
}

.customer-alerts-summary__section {
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

.customer-alerts-summary__section--overdue {
    border-left: 4px solid #dc3545;
    background: rgba(220, 53, 69, 0.04);
}

.customer-alerts-summary__section-icon {
    color: #dc3545;
    opacity: 0.85;
    line-height: 1;
}

.customer-alerts-summary__metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.customer-alerts-summary__metric-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 600;
}

.customer-alerts-summary__metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
}

.customer-alerts-summary__metric--compact .customer-alerts-summary__metric-value {
    font-size: 0.95rem;
}

.customer-alerts-summary__progress {
    height: 12px;
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.06);
}

.customer-alerts-summary__progress .progress-bar {
    border-radius: 6px;
}

.customer-alerts-summary__ops-tile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8fafc;
    height: 100%;
}

.customer-alerts-summary__ops-tile > i {
    font-size: 1.75rem;
    opacity: 0.45;
    color: var(--ink);
}

.customer-alerts-summary__ops-value {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink);
}

.customer-alerts-summary__ops-label {
    font-size: 0.78rem;
    color: #6c757d;
    margin-top: 0.15rem;
}

@media (min-width: 992px) {
    .flotas-app-top-header-pad {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

.flotas-app-top-header-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 0.2rem 0;
    line-height: 1.3;
}

.flotas-app-top-header-title:empty {
    display: none;
}

.flotas-app-top-header-meta {
    font-size: 0.875rem;
    line-height: 1.4;
}

.flotas-app-top-header-context {
    background: #e8eef4;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.flotas-app-top-header-context-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    line-height: 1.2;
}

.flotas-app-top-header-context-meta {
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Mobile sidebar */
@media (max-width: 991px) {
    .flotas-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .flotas-sidebar.show {
        transform: translateX(0);
    }

    .flotas-main {
        margin-left: 0;
    }

    /* Add mobile toggle button */
    .flotas-mobile-toggle {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        background: var(--brand-orange);
        color: #ffffff;
        border: none;
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
        cursor: pointer;
    }
}

/*
 * Short landscape (typical phone sideways): slim sidebar, hide logo, full-width main,
 * avoid lg-only layout when viewport is still physically small.
 */
@media (orientation: landscape) and (max-height: 560px) and (max-width: 1199.98px) {
    body.flotas-app-body {
        overflow-x: hidden;
    }

    .flotas-sidebar-logo {
        display: none !important;
    }

    .flotas-sidebar-header {
        padding: 0.35rem 0.65rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .flotas-sidebar {
        width: min(200px, 38vw);
    }

    .flotas-menu-link {
        padding: 0.45rem 0.75rem;
        font-size: 0.875rem;
    }

    .flotas-menu-link i:first-child {
        margin-right: 0.5rem;
        width: 18px;
    }

    .flotas-sidebar-user {
        padding: 0.45rem 0.65rem;
    }

    .flotas-user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.78rem;
        margin-right: 0.5rem;
    }

    .flotas-user-email {
        display: none;
    }

    .flotas-main {
        margin-left: 0 !important;
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    .flotas-main main {
        max-width: 100%;
    }

    .flotas-app-top-header-pad--row {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .flotas-app-top-header-title {
        font-size: 1rem;
    }

    .flotas-mobile-toggle {
        top: max(0.65rem, env(safe-area-inset-top, 0px));
        left: max(0.65rem, env(safe-area-inset-left, 0px));
    }

    .dataTables_wrapper {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dataTables_wrapper .row:last-child {
        flex-wrap: wrap;
        justify-content: center;
        margin-left: 0;
        margin-right: 0;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none !important;
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    .dataTables_wrapper .dataTables_paginate .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) and (orientation: landscape) and (max-height: 560px) {
    .flotas-mobile-toggle.d-lg-none {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .flotas-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .flotas-sidebar.show {
        transform: translateX(0);
    }
}

/* =========================
BADGES – consistent states
========================= */

.badge {
    padding: .45rem .85rem;
    /* display: block; */
    /* font-weight: 800; */
}

/* If you already print "Activo" with a badge class, map it */
.badge.badge-active,
.badge.status-active,
.badge-flotas {
    background: var(--brand-orange);
    color: #fff;
}

/* Inactivo */
.badge.badge-inactive,
.badge.status-inactive {
    background: rgba(0,0,0,.18);
    color: rgba(0,0,0,.75);
}

/* Optional: success-ish */
.badge.badge-successish,
.badge.status-ok {
    background: #37b24d;
    color: #0b3d17;
}

.table thead th {
    /* font-weight: 800; */
    background-color: #f4f7fa;
    color: rgba(0,0,0,.75);
    vertical-align: middle;
}

.table tbody td {
    vertical-align: middle;
}


div.dt-top-container {
    display: grid;
    grid-template-columns: auto auto;
    gap: 5px;
}

div.dt-center-in-div {
    margin: 0 auto;
}

div.dt-filter-spacer {
    margin: 10px 0;
}

/* =========================
Bootstrap Alerts – force theme colors
========================= */
.alert {
    --bs-alert-color: #fff;
    --bs-alert-bg: var(--brand-orange);
    --bs-alert-border-color: var(--brand-orange-dark);
    --bs-alert-link-color: #fff;

    border-width: 0;
    border-radius: var(--soft-radius);
    font-weight: 600;
    box-shadow: 0 10px 18px rgba(0,0,0,.08);
}

/* Make close button visible on dark brand alert */
.alert .btn-close {
    filter: invert(1) grayscale(100%);
    opacity: .9;
}

.alert .btn-close:hover {
    opacity: 1;
}

/* =========================
TABS (Bootstrap nav-tabs) – Flotas theme
========================= */

/* Tabs bar */
.nav-tabs {
    border-bottom: 0;
    gap: 10px;
}

/* Each tab button */
.nav-tabs .nav-link {
    border: 0 !important;
    border-radius: 16px 16px 0 0;
    padding: .75rem 1.2rem;
    font-weight: bold;
    color: rgba(0,0,0,.65);
    background: rgba(0,0,0,.06);
    transition: background .15s ease, color .15s ease;
}

/* Hover */
.nav-tabs .nav-link:hover {
    background: var(--brand-tint-12);
    color: #111;
}

/* Active tab */
.nav-tabs .nav-link.active {
    background: #fff;
    color: #111;
    position: relative;
    box-shadow: 0 -10px 22px rgba(0,0,0,.06);
}

/* Brand underline accent inside active tab */
.nav-tabs .nav-link.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 10px;
    height: 4px;
    border-radius: 999px;
    background: var(--brand-orange);
}

/* The tab content panel (your div already has border/padding/bg) */
.tab-content {
    border-radius: 0 var(--soft-radius) var(--soft-radius) var(--soft-radius);
    border: 1px solid var(--brand-orange-dark) !important;
    box-shadow: 0 12px 26px rgba(0,0,0,.06);
}

/* Make the border between tabs and panel seamless */
.tab-content.border-top-0 {
    border-top: 0 !important;
}

/* Optional: spacing above tab bar so it doesn't feel glued */
.nav-tabs {
    margin-top: 6px;
    margin-bottom: 0;
}

/* Mobile: allow horizontal scroll instead of wrapping ugly */
@media (max-width: 768px) {
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
    }
    .nav-tabs .nav-link {
        white-space: nowrap;
    }
}

/* Importar datos: mockup-style tabs (brand top bar on active) + lighter panel border */
.flotas-imports-page .nav-tabs.flotas-imports-nav {
    gap: 4px;
    margin-top: 0;
}

.flotas-imports-page .nav-tabs.flotas-imports-nav .nav-link.active {
    box-shadow: none !important;
    border-top: 4px solid var(--brand-orange);
    padding-top: calc(0.75rem - 4px);
}

.flotas-imports-page .nav-tabs.flotas-imports-nav .nav-link.active::after {
    display: none !important;
}

.flotas-imports-page .tab-content {
    border: 1px solid var(--brand-tint-35) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
    border-radius: 0 0 var(--card-radius) var(--card-radius) !important;
    background: #fff;
}

.flotas-imports-upload-box {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--card-radius);
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Bootstrap modal: host #catalogModal on body (sibling of .flotas-app) so backdrop dims the app.
   Without this, a modal nested inside .flotas-app can stack incorrectly vs .modal-backdrop. */
/* #catalogModal.modal {
    z-index: 1060;
} */

/* Ensure dimming layer is visible (do not raise z-index here — must stay below .modal). */
/* body > .modal-backdrop {
    --bs-backdrop-bg: #000;
    --bs-backdrop-opacity: 0.5;
} */

.center {
    text-align: center;
}

.js-catalog-modal-title-icon {
    color: var(--brand-orange);
}

.dt-filter-border {
    border-bottom: 1px solid var(--brand-orange) !important;
}

/* Vehicle compliance: LIC. EXPLOTACIÓN / TASA VEHICULAR (list) */
.vehicle-due-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 0.5rem;
    padding: 0.25rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid;
    line-height: 1.25;
}

.vehicle-due-badge i {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.vehicle-due-subline {
    margin-top: 0.4rem;
    line-height: 1.35;
}

.vehicle-due-badge--vigente {
    border-color: #2f9e44;
    background: #ebfbee;
    color: #2b8a3e;
}

.vehicle-due-badge--por-vencer {
    border-color: #fd7e14;
    background: #fff4e6;
    color: #d9480f;
}

.vehicle-due-badge--critico {
    border-color: #f59f00;
    background: #fff9db;
    color: #e67700;
}

.vehicle-due-badge--vencido {
    border-color: #fa5252;
    background: #fff5f5;
    color: #c92a2a;
}

/* Driver catalog (pilotos): row tint by license tier */
#drivers-table tbody tr.driver-list-row--vigente > td {
    background-color: rgba(235, 251, 238, 0.5);
}
#drivers-table tbody tr.driver-list-row--por_vencer > td {
    background-color: rgba(255, 244, 230, 0.55);
}
#drivers-table tbody tr.driver-list-row--critico > td {
    background-color: rgba(255, 249, 219, 0.55);
}
#drivers-table tbody tr.driver-list-row--vencido > td {
    background-color: rgba(255, 245, 245, 0.55);
}