/* ============================================================
   AutoRenta — Estilos principales
   Complementa Bootstrap 5 con el diseño del sistema
   ============================================================ */

/* ===== TOKENS DE DISEÑO — Paleta COVESI ===== */
:root {
    --ar-ink:          #1A2535;
    --ar-ink-soft:     #5C6878;
    --ar-paper:        #F2F5F8;
    --ar-card:         #FFFFFF;
    --ar-line:         #DDE3EA;
    --ar-petrol:       #1B3D5C;
    --ar-petrol-deep:  #0E2336;
    --ar-signal:       #2B87C8;
    --ar-signal-light: #E8F3FB;
    --ar-go:           #1A8C52;
    --ar-stop:         #C94436;
    --ar-plate-bg:     #F8FAFB;
    --ar-radius:       16px;
    --ar-font-d:       'Archivo', sans-serif;
    --ar-font-b:       'Instrument Sans', sans-serif;
    --ar-font-m:       'IBM Plex Mono', monospace;
    --ar-sidebar-w:    240px;
    --ar-tabbar-h:     76px;
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

input[type="text"], input[type="email"], input[type="search"],
input[type="tel"], input[type="url"], input:not([type]),
textarea, select {
    text-transform: uppercase;
}

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--ar-font-b);
    background:  var(--ar-paper);
    color:       var(--ar-ink);
    min-height:  100dvh;
    padding-bottom: calc(var(--ar-tabbar-h) + env(safe-area-inset-bottom));
}

/* ===== SIDEBAR (solo escritorio) ===== */
.ar-sidebar { display: none; }

@media (min-width: 1024px) {
    body {
        padding-bottom: 0;
        display: grid;
        grid-template-columns: var(--ar-sidebar-w) 1fr;
    }

    .ar-sidebar {
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: var(--ar-petrol-deep);
        color: #fff;
        padding: 28px 16px;
        min-height: 100vh;
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
    }

    .ar-tabbar,
    .ar-fab-mobile { display: none !important; }

    .ar-wrap {
        min-width: 0;
        overflow-x: hidden;
    }
}

.ar-sidebar-logo {
    font-family: var(--ar-font-d);
    font-weight: 800;
    font-size: 1.3rem;
    color: #fff;
    padding: 0 12px 28px;
    letter-spacing: .03em;
}

.ar-sidebar-logo span { color: #4AB6F0; }

.ar-side-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #8DAFC8;
    padding: 11px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.ar-side-tab i { font-size: 1.15rem; min-width: 20px; text-align: center; }
.ar-side-tab:hover { color: #fff; background: rgba(255,255,255,.07); }
.ar-side-tab.active { background: rgba(255,255,255,.12); color: #fff; }

/* ===== TABBAR INFERIOR (solo móvil) ===== */
.ar-tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 100;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--ar-line);
    display: flex;
    justify-content: space-around;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}

.ar-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: .66rem;
    font-weight: 600;
    color: var(--ar-ink-soft);
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 58px;
    text-decoration: none;
    transition: color .15s;
}

.ar-tab i { font-size: 1.35rem; }
.ar-tab.active { color: var(--ar-petrol); }

/* ===== FAB ===== */
.ar-fab {
    position: fixed;
    right: 18px;
    bottom: calc(var(--ar-tabbar-h) + env(safe-area-inset-bottom) + 8px);
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--ar-signal);
    color: #fff;
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    z-index: 99;
    box-shadow: 0 8px 20px rgba(43,135,200,.45);
    text-decoration: none;
    transition: transform .1s;
}

.ar-fab:hover { color: #fff; transform: scale(1.07); }
.ar-fab:active { transform: scale(.94); }

/* ===== TOPBAR GLOBAL ===== */
.ar-topbar {
    background: linear-gradient(160deg, var(--ar-petrol) 0%, var(--ar-petrol-deep) 100%);
    color: #fff;
    padding: 20px 20px 22px;
}

@media (min-width: 1024px) {
    .ar-topbar { padding: 32px 48px 36px; }
    .ar-day-line { font-size: .92rem; }
    .ar-day-amount { font-size: 2.8rem; margin-top: 4px; }
    .ar-stats { gap: 16px; margin-top: 24px; }
    .ar-stat { padding: 18px 20px; }
    .ar-stat b { font-size: 1.8rem; color: var(--ar-ink); }
    .ar-stat span { font-size: .78rem; }
}

/* ── Topbar simple (páginas que no son dashboard) ── */
.ar-topbar-simple {
    background: linear-gradient(160deg, var(--ar-petrol) 0%, var(--ar-petrol-deep) 100%);
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ar-topbar-simple .ar-topbar-logo {
    font-family: var(--ar-font-d);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: .02em;
    color: #fff;
}
.ar-topbar-simple .ar-topbar-logo span { color: #4AB6F0; }
.ar-btn-salir {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    font-family: var(--ar-font-d);
    font-weight: 600;
    font-size: .85rem;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: background .15s;
}
.ar-btn-salir:hover { background: rgba(255,255,255,.2); }

@media (min-width: 1024px) {
    .ar-topbar-simple { padding: 16px 48px; }
    .ar-topbar-simple .ar-topbar-logo { font-size: 1.25rem; }
}

.ar-topbar-row { display: flex; align-items: flex-start; }
.ar-topbar-logout { margin-left: auto; }

.ar-topbar-brand { display: none; }

@media (max-width: 1023px) {
    .ar-topbar-brand { display: block; margin-bottom: 4px; }
    .ar-topbar-logo {
        font-family: var(--ar-font-d);
        font-weight: 800;
        font-size: 1.15rem;
        letter-spacing: .02em;
        color: #fff;
    }
    .ar-topbar-logo span { color: #4AB6F0; }
}

.ar-day-line { margin: 0; font-size: .82rem; color: #8AB2CC; }

.ar-day-amount {
    font-family: var(--ar-font-m);
    font-weight: 600;
    font-size: 2rem;
    margin: 2px 0 0;
    letter-spacing: -.01em;
}

.ar-day-amount small { font-size: .95rem; color: #6A9AB8; font-weight: 500; }

/* ===== STATS CARDS ===== */
.ar-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 14px 0 0;
}

@media (min-width: 1024px) {
    .ar-stats { margin-top: 18px; }
}

.ar-stat {
    background: var(--ar-card);
    border: 1px solid var(--ar-line);
    border-radius: var(--ar-radius);
    padding: 14px 12px;
    box-shadow: 0 6px 18px rgba(15,61,73,.08);
}

.ar-stat b {
    font-family: var(--ar-font-d);
    font-size: 1.45rem;
    font-weight: 700;
    display: block;
    color: var(--ar-ink);
}

.ar-stat span {
    font-size: .72rem;
    color: var(--ar-ink-soft);
    letter-spacing: .04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ar-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ar-dot--go   { background: var(--ar-go); }
.ar-dot--warn { background: #E8A020; }
.ar-dot--stop { background: var(--ar-stop); }

/* ===== CONTENIDO MAIN ===== */
.ar-main {
    padding: 22px 16px 0;
    max-width: 560px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .ar-main { max-width: 980px; padding: 26px 36px 40px; }
}

.ar-sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 20px 2px 12px;
}

.ar-sec-head h2 {
    font-family: var(--ar-font-d);
    font-weight: 700;
    font-size: 1.02rem;
    margin: 0;
}

.ar-sec-head a {
    font-size: .82rem;
    color: var(--ar-petrol);
    font-weight: 600;
    text-decoration: none;
}

/* ===== ALERTAS DASHBOARD ===== */
.ar-alert-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--ar-stop);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 6px;
}

.ar-alert-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ar-alert-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    border-left: 4px solid transparent;
}

.ar-alert--danger {
    background: #FEF2F2;
    border-left-color: #C94436;
}

.ar-alert--warning {
    background: #FFFBEB;
    border-left-color: #D97706;
}

.ar-alert-icon {
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.ar-alert--danger  .ar-alert-icon { color: #C94436; }
.ar-alert--warning .ar-alert-icon { color: #D97706; }

.ar-alert-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ar-alert-title {
    font-weight: 600;
    font-size: .88rem;
    color: var(--ar-ink);
}

.ar-alert-detail {
    font-size: .8rem;
    color: var(--ar-ink-soft);
}

.ar-alert-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #F0FDF4;
    color: #1A8C52;
    font-size: .88rem;
    font-weight: 500;
}

.ar-alert-empty i { font-size: 1.1rem; }

/* ===== TARJETA GENÉRICA ===== */
.ar-card {
    background: var(--ar-card);
    border: 1px solid var(--ar-line);
    border-radius: var(--ar-radius);
    padding: 16px;
    margin-bottom: 12px;
}

/* ===== PLACA ===== */
.ar-plate {
    font-family: var(--ar-font-m);
    font-weight: 600;
    font-size: .78rem;
    background: var(--ar-plate-bg);
    border: 1.5px solid var(--ar-ink);
    border-radius: 6px;
    padding: 3px 8px 3px 6px;
    letter-spacing: .08em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,.07);
}

.ar-plate::before {
    content: "SV";
    font-size: .55rem;
    color: #fff;
    background: var(--ar-petrol);
    border-radius: 3px;
    padding: 1px 3px;
    letter-spacing: .04em;
}

/* ===== BARRA DE PAGO (fuel gauge) ===== */
.ar-fuel { margin-top: 14px; }

.ar-fuel-track {
    height: 8px;
    border-radius: 99px;
    background: #EDEFE9;
    overflow: hidden;
}

.ar-fuel-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--ar-signal), #1A8C52);
    transition: width .4s ease;
}

.ar-fuel-meta {
    display: flex;
    justify-content: space-between;
    font-size: .75rem;
    margin-top: 6px;
    color: var(--ar-ink-soft);
}

.ar-fuel-meta b { font-family: var(--ar-font-m); color: var(--ar-ink); }

/* ===== BADGES ===== */
.ar-badge {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.ar-badge-active   { background: #E3F3EC; color: var(--ar-go); }
.ar-badge-pending  { background: #E8F3FB; color: #1B6FA8; }
.ar-badge-late     { background: #F9E5E2; color: var(--ar-stop); }
.ar-badge-reserved { background: #D9EBF8; color: var(--ar-petrol); }
.ar-badge-workshop { background: #EDEDEF; color: #55585F; }
.ar-badge-inactive { background: #F0F0F0; color: #888; }

/* ===== INDICADOR ACEITE CAJA ===== */
.ar-oil-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: .7rem;
    cursor: default;
}
.ar-oil-ok      { background: #D4EDDA; color: #1A8C52; }
.ar-oil-soon    { background: #FFF3CD; color: #856404; }
.ar-oil-overdue { background: #F8D7DA; color: #842029; }

/* ===== TARIFA MONOSPACE ===== */
.ar-rate {
    font-family: var(--ar-font-m);
    font-weight: 600;
    font-size: .85rem;
}

/* ===== BOTÓN PRIMARIO ===== */
.ar-btn-primary {
    background: var(--ar-signal);
    color: #fff;
    font-family: var(--ar-font-d);
    font-weight: 700;
    font-size: .98rem;
    border: none;
    border-radius: 14px;
    padding: 14px 24px;
    box-shadow: 0 6px 16px rgba(43,135,200,.35);
    cursor: pointer;
    transition: transform .1s, box-shadow .1s;
    width: 100%;
}

.ar-btn-primary:hover  { box-shadow: 0 8px 20px rgba(43,135,200,.50); }
.ar-btn-primary:active { transform: scale(.98); }

/* ===== CAMPOS DE FORMULARIO ===== */
.ar-field label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--ar-ink-soft);
    margin-bottom: 5px;
}

.ar-field input,
.ar-field select,
.ar-field textarea {
    width: 100%;
    border: 1.5px solid var(--ar-line);
    border-radius: 12px;
    padding: 12px 13px;
    font: inherit;
    font-size: .92rem;
    background: #FBFCFA;
    color: var(--ar-ink);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .15s;
}

.ar-field input:focus,
.ar-field select:focus,
.ar-field textarea:focus {
    border-color: var(--ar-petrol);
    outline: none;
    background: #fff;
}

/* ===== GRID 2 COLUMNAS ===== */
@media (min-width: 600px) {
    .ar-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .ar-grid-2 .ar-card { margin-bottom: 0; }
}

/* ===== FILTROS FLOTA ===== */
.ar-filter-input,
.ar-filter-select {
    border: 1.5px solid var(--ar-line);
    border-radius: 12px;
    padding: 12px 16px;
    font: inherit;
    font-size: 1rem;
    background: #fff;
    color: var(--ar-ink);
    -webkit-appearance: none;
    appearance: none;
}

.ar-filter-input  { max-width: 320px; width: 100%; }
.ar-filter-select { max-width: 220px; }

.ar-filter-input:focus,
.ar-filter-select:focus { border-color: var(--ar-petrol); outline: none; }

/* ===== LINK ACCIÓN ENCABEZADO ===== */
.ar-link-action {
    font-size: .88rem;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none;
    letter-spacing: .01em;
    background: var(--ar-signal);
    padding: 8px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(43,135,200,.30);
    transition: box-shadow .15s, transform .1s;
    white-space: nowrap;
}
.ar-link-action:hover {
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(43,135,200,.45);
    transform: translateY(-1px);
}
@media (min-width: 1024px) {
    .ar-link-action { font-size: 1rem; padding: 9px 20px; }
}

/* ===== TARJETA VEHÍCULO (flota) ===== */
.ar-veh-card {
    background: var(--ar-card);
    border: 1px solid var(--ar-line);
    border-radius: var(--ar-radius);
    padding: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.ar-veh-card--click {
    cursor: pointer;
    transition: box-shadow .15s, border-color .15s;
}
.ar-veh-card--click:hover {
    border-color: #b8cfe0;
    box-shadow: 0 4px 14px rgba(27,61,92,.10);
}

.ar-veh-ic {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: #EAF1F7;
    display: grid;
    place-items: center;
    font-size: 1.45rem;
    color: var(--ar-petrol);
    flex-shrink: 0;
}

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

.ar-veh-name {
    font-weight: 700;
    font-size: .95rem;
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-veh-plate-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ar-veh-note {
    font-size: .75rem;
    color: var(--ar-ink-soft);
}

.ar-veh-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

/* ===== ÍTEM DE PAGO ===== */
.ar-pay {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--ar-card);
    border: 1px solid var(--ar-line);
    border-radius: var(--ar-radius);
    padding: 13px 14px;
    margin-bottom: 10px;
}

.ar-pay-ic {
    width: 38px; height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.ar-pay-ic-go  { background: #E4F3EA; }
.ar-pay-ic-sig { background: #FDF1DA; }

.ar-amount {
    font-family: var(--ar-font-m);
    font-weight: 600;
    font-size: .92rem;
    color: var(--ar-go);
}

.ar-amount-neg { color: var(--ar-stop); }

/* ===== MODAL OVERRIDE ===== */
.modal-content { border-radius: var(--ar-radius); border: none; }
.modal-header  { border-bottom: 1px solid var(--ar-line); }
.modal-footer  { border-top: 1px solid var(--ar-line); }

/* ===== FORMULARIO POR SECCIONES ===== */
.ar-form-section {
    border-bottom: 1px solid var(--ar-line);
    padding: 20px 24px;
}
.ar-form-section:last-child { border-bottom: none; }

.ar-form-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--ar-font-d);
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .08em;
    color: var(--ar-petrol);
    margin-bottom: 16px;
}

.ar-step-badge {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--ar-petrol-deep);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ar-form-section-body { padding: 0; }

.ar-total-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ar-signal-light);
    border: 1.5px solid var(--ar-signal);
    border-radius: 12px;
    padding: 12px 16px;
}

/* ===== DOCUMENTO ROW ===== */
.ar-doc-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid var(--ar-line);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    user-select: none;
    background: #fff;
}
.ar-doc-row:hover { border-color: var(--ar-signal); background: var(--ar-signal-light); }
.ar-doc-row.has-file { border-color: var(--ar-go); background: #f0faf5; }
.ar-doc-row__icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: var(--ar-signal-light);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem; color: var(--ar-signal);
}
.ar-doc-row.has-file .ar-doc-row__icon { background: #dcf5ea; color: var(--ar-go); }
.ar-doc-row__body { flex: 1; min-width: 0; }
.ar-doc-row__title { font-weight: 600; font-size: .875rem; color: var(--ar-ink); }
.ar-doc-row__sub { font-size: .78rem; color: var(--ar-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-doc-row.has-file .ar-doc-row__sub { color: var(--ar-go); }
.ar-doc-row__check {
    width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid var(--ar-line);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: .75rem; color: transparent;
    transition: all .2s;
}
.ar-doc-row.has-file .ar-doc-row__check {
    background: var(--ar-go); border-color: var(--ar-go); color: #fff;
}

/* ===== DATATABLES OVERRIDE ===== */
.dataTables_wrapper .dataTables_filter input { border-radius: 10px; }
.dataTables_wrapper .dataTables_length select { border-radius: 10px; }

/* ===== SELECT2 OVERRIDE ===== */
.select2-container--bootstrap-5 .select2-selection {
    border-color: var(--ar-line);
    border-radius: 12px;
    font-size: .92rem;
}

/* ===== ACCESIBILIDAD ===== */
:focus-visible { outline: 3px solid var(--ar-signal); outline-offset: 2px; }

/* ===== PAY ICON COLORS — COVESI ===== */
.ar-pay-ic-go  { background: #E3F3EC; }
.ar-pay-ic-sig { background: #E8F3FB; }

/* ===== CALENDARIO DE DISPONIBILIDAD ===== */
.ar-cal { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.ar-cal-month { flex: 1; min-width: 180px; }
.ar-cal-month-name { font-weight: 700; text-align: center; margin-bottom: .5rem; font-size: .875rem; text-transform: uppercase; letter-spacing: .05em; }
.ar-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ar-cal-dow { text-align: center; font-size: .65rem; font-weight: 700; color: var(--ar-muted); padding: 3px 0; }
.ar-cal-day { text-align: center; font-size: .75rem; padding: 5px 2px; border-radius: 5px; line-height: 1; }
.ar-cal-day--past { color: var(--ar-muted); }
.ar-cal-day--free { color: var(--ar-text); }
.ar-cal-day--booked { background: rgba(220,53,69,.15); color: #dc3545; font-weight: 700; }
.ar-cal-day--booked-past { background: rgba(220,53,69,.07); color: #dc3545; opacity: .55; }
.ar-cal-day--today { outline: 2px solid var(--ar-accent); outline-offset: -2px; font-weight: 700; }
.ar-cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.ar-cal-dot--booked { background: #dc3545; }
.ar-cal-dot--free { background: var(--ar-text); }
.ar-cal-dot--past { background: #adb5bd; }

/* ===== TABS (Flota) ===== */
.ar-tabs { display: flex; border-bottom: 2px solid var(--ar-line); margin-bottom: 1.25rem; }
.ar-tab-btn {
    flex: 1;
    padding: .65rem 1rem;
    border: none;
    background: none;
    font-family: var(--ar-font-d);
    font-weight: 700;
    font-size: .92rem;
    color: var(--ar-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}
.ar-tab-btn.active { color: var(--ar-accent); border-bottom-color: var(--ar-accent); }
.ar-tab-btn:hover:not(.active) { color: var(--ar-text); }

/* ===== LOADING SPINNER ===== */
.ar-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
    width: 100%;
    color: var(--ar-muted);
}
.ar-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
    color: var(--ar-accent);
}

/* ===== BARRA DE PROGRESO DE NAVEGACIÓN Y AJAX ===== */
#arPageBar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0;
    background: var(--ar-signal);
    z-index: 99999;
    pointer-events: none;
    display: none;
}
#arPageBar.ar-bar-loading {
    display: block;
    animation: arBarNav 2s cubic-bezier(.4,0,.2,1) forwards;
}
#arPageBar.ar-bar-running {
    display: block;
    animation: arBarRun 1.2s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes arBarNav {
    0%   { width: 0% }
    40%  { width: 60% }
    70%  { width: 80% }
    100% { width: 92% }
}
@keyframes arBarRun {
    0%   { width: 0% }
    100% { width: 85% }
}
