:root {

    /* =========================================
    🔵 PRIMARY (cobre balanceado)
    ========================================= */
    --color-primary: #B45309;        /* cobre real (más naranja, menos rojo) */
    --color-primary-hover: #92400E;  /* profundidad coherente */
    --color-primary-soft: #FEF3C7;   /* conecta con accent-soft */

    /* =========================================
       🟠 ACCENT
    ========================================= */
    --color-accent: #F59E0B;
    --color-accent-hover: #D97706;
    --color-accent-soft: #FEF3C7;

    /* =========================================
    🟤 SUCCESS (cálido positivo, distinto al primary)
    ========================================= */
    --color-success: #D97706;        /* más dorado, menos cobre */
    --color-success-hover: #B45309;
    --color-success-soft: #FEF3C7;

    /* =========================================
    🔥 DANGER (cálido crítico)
    ========================================= */
    --color-danger: #9A3412;         /* rojo quemado / terracota */
    --color-danger-hover: #7C2D12;
    --color-danger-soft: #FEE2E2;

    /* =========================================
       ⚠️ WARNING
    ========================================= */
    --color-warning: #FBBF24;
    --color-warning-soft: #FEF9C3;


    /* =========================================
       ⚙️ NEUTROS (AJUSTADOS)
    ========================================= */
    --color-bg: #E6ECF2;              /* 🔥 MÁS CONTRASTE REAL */
    --color-surface: #FFFFFF;
    --color-surface-alt: #E2E8F0;

    --color-text: #0F172A;
    --color-text-light: #334155;
    --color-muted: #64748B;

    --color-border: #CBD5E1;          /* 🔥 MÁS PRESENTE */
    --color-border-strong: #94A3B8;

    /* =========================================
       📦 UI
    ========================================= */
    --radius: 10px;
    --radius-sm: 6px;

    /* 🔥 SISTEMA DE SOMBRAS (AQUÍ ESTÁ LA CLAVE) */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 3px 8px rgba(15, 23, 42, 0.06);
    --shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.12);

    /* =========================================
       ⚡ INTERACTION
    ========================================= */
    --transition-fast: 0.15s ease;
    --transition: 0.2s ease;
}

/* =========================================
   RESET + GLOBAL
========================================= */

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

body {
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

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


.rv-main {
    margin-left: 240px;
    min-height: 100vh;
}

.rv-container {
    padding: 20px 24px; /* asegúrate que sea consistente */
}

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

.rv-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100vh;

    background: var(--color-surface);
    border-right: 1px solid var(--color-border);

    display: flex;
    flex-direction: column;

    z-index: 1000;
}

.rv-sidebar__brand {
    padding: 20px;
    font-weight: 600;
}

.rv-sidebar__nav {
    padding: 10px;
    flex: 1;
}

.rv-sidebar__footer {
    padding: 10px;
    border-top: 1px solid var(--color-border);
}

.rv-link {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    transition: var(--transition);
    text-decoration: none;
}

.rv-link:hover {
    background: var(--color-surface-alt);
}

.rv-link.active {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.rv-link--danger {
    color: var(--color-danger);
}

/* =========================================
   NAVBAR
========================================= */

.rv-navbar {
    height: 60px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);

    display: flex;
    align-items: center;
    padding: 0 20px;

    position: sticky;
    top: 0;
    z-index: 800;
}

.rv-navbar__menu {
    font-size: 20px;
    margin-right: 10px;
    cursor: pointer;
}

/* =========================================
   COMPONENTS
========================================= */

.rv-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow); /* 🔥 ahora sí correcto */
}

.rv-btn {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
}

.rv-btn--primary {
    background: var(--color-primary);
    color: white;
}

.rv-btn--accent {
    background: var(--color-accent);
    color: white;
}

/* =========================================
   OVERLAY (FIX REAL)
========================================= */

.rv-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);

    opacity: 0;
    pointer-events: none;

    transition: var(--transition);

    z-index: 900;
}

.rv-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

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

    .rv-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition);
    }

    .rv-sidebar.open {
        transform: translateX(0);
    }
}

/* =========================================
   NAVBAR VISIBILITY CONTROL
========================================= */

/* ❌ Desktop: ocultar navbar */
.rv-navbar {
    display: none;
}

/* 📱 Mobile: mostrar navbar */
@media (max-width: 768px) {
    .rv-navbar {
        display: flex;
    }
}


/* =========================================
   MOBILE HEADER IMPROVEMENT
========================================= */

@media (max-width: 768px) {

    .rv-navbar {
        display: flex;
        align-items: center;
        justify-content: space-between;

        height: 60px;
        padding: 0 16px;

        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);

        position: sticky;
        top: 0;
        z-index: 800;
    }

    /* 🔥 HAMBURGER PRO */

    .rv-navbar__menu {
        width: 45px;
        height: 45px;

        display: flex;
        align-items: center;
        justify-content: center;

        border-radius: var(--radius-sm);

        background: var(--color-accent);
        color: white;

        font-size: 20px;
        border: none;
        cursor: pointer;

        box-shadow: var(--shadow-sm);
        transition: var(--transition);
    }

    .rv-navbar__menu:hover {
        background: var(--color-accent-hover);
    }

    .rv-navbar__menu:active {
        transform: scale(0.95);
    }


    /* 🧠 TÍTULO */


}


/* 🧱 DASHBOARD LAYOUT*/


/*🔥 HERO*/


/* estados usando tu sistema existente */


.rv-hero__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 📋 LIST SYSTEM (🔥 clave para escalar) */


/* 🧩 CARD HEADER */

.rv-card__header {
    font-weight: 600;
    margin-bottom: 10px;
}

/* 🔘 BUTTON VARIANTS */

.rv-btn--success {
    background: var(--color-success);
    color: white;
}

.rv-btn--danger {
    background: var(--color-danger);
    color: white;


}

.rv-btn--light {
    background: var(--color-accent-soft);
    color: var(--color-text);

    border: 1px solid var(--color-border-strong);
}

.rv-btn--dark {
    background: var(--color-accent);
    color: white;
}

.rv-btn--sm {
    padding: 6px 10px;
    font-size: 13px;
}


/* 🧠 TEXT HELPERS */

.rv-text-muted {
    color: var(--color-muted);
}

.rv-text-strong {
    font-weight: 600;
}


/* 🚫 EMPTY STATE */


/* 📊 METRICS */


/* =========================================
   AUTH
========================================= */

.rv-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rv-auth__card {
    width: 100%;
    max-width: 380px;
}

/*🧾 HEADER*/

.rv-auth__header {
    text-align: center;
    margin-bottom: 20px;
}


/*📝 FORM SYSTEM (🔥 importante)*/

/* =========================================
   FORM
========================================= */

.rv-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rv-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rv-form-group label {
    font-size: 13px;
    color: var(--color-text-light);
}

/* 🔥 INPUTS alineados al sistema */
.rv-form-group input {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 14px;
    text-align: center;
    transition: var(--transition);
}

.rv-form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-soft);
}


/*🔘 BUTTON BLOCK*/

.rv-btn--block {
    width: 100%;
}


/* =========================================
   ALERTS
========================================= */

.rv-alert {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 10px;
}

.rv-alert--danger {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.rv-alert--warning {
    background: var(--color-warning-soft);
    color: var(--color-primary);
}

.rv-alert--success {
    background: var(--color-success-soft);
    color: var(--color-success);
}


/* 🧱 SCAN LAYOUT */


.rv-scan {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.rv-scan__card {
    width: 100%;
    max-width: 500px;
}


/* 🧾 HEADER */


.rv-scan__header {
    text-align: center;
    margin-bottom: 20px;
}


.rv-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/*🎭 MODAL SYSTEM (🔥 clave)*/


.rv-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 1100;
}

.rv-modal__content {
    background: var(--color-surface);
    padding: 25px;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.rv-modal__title {
    font-size: 18px;
    margin-bottom: 10px;
}

.rv-modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.rv-modal__actions a {
    flex: 1;
}


/* 🧱 INVENTORY LAYOUT*/

.rv-inventory {
    max-width: 700px;
    margin: 30px auto;
    padding: 0 15px;

    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 📋 LIST REFINADA */


/* 🔢 BADGE SYSTEM (🔥 reemplaza quantity)*/

.rv-badge {
    background: var(--color-surface-alt);

    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
}

/* devoluciones */
.rv-badge--warning {
    background: var(--color-warning-soft);
    color: var(--color-primary);
}


/*⚠️ CARD VARIANT (devoluciones)*/


.rv-card--warning {
    border-left: 4px solid var(--color-warning);
}

.rv-form-inline {
    margin-top: 15px;
}


/* 🧱 ROUTE LAYOUT */

.rv-route {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 🧾 HEADER */

.rv-route__header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


/*🗺️ MAP (aislado, no contamina global)*/

.rv-map-card {
    padding: 0;
    overflow: hidden;
}

.rv-map {
    height: 400px;
    width: 100%;
}

/* 👥 CUSTOMER ITEM (🔥 este es el tricky bien hecho) */


/* 🧠 INFO */


/* 🔘 ACTIONS */


/* Customer detail */


/*🧱 CUSTOMER LAYOUT*/

.rv-customer {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* 🧾 HEADER */

.rv-customer-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .rv-customer-header {
        flex-direction: row;
        justify-content: space-between;
    }
}

.rv-customer-header__credit {
    border-top: 1px solid var(--color-border);
    padding-top: 10px;
}

@media (min-width: 768px) {
    .rv-customer-header__credit {
        border-top: none;
        padding-top: 0;
        text-align: right;
    }
}

.rv-credit {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-success);
}


/* ACTIONS*/


.rv-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 📊 ROW SYSTEM (🔥 reutilizable) */


.rv-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.rv-row__info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}


/* 📦 SPLIT LAYOUT */


.rv-split {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .rv-split {
        flex-direction: row;
    }

    .rv-split > div {
        flex: 1;
    }
}


/* 🔄 SCROLL */


/* 🧩 UTILS */


.rv-stack-sm {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rv-section-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.rv-page-title {
    font-size: 22px;
    font-weight: 700;
}


/* 🧾 ORDER MODULE */

.rv-order {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rv-product-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 10px;
}

.product-item {
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.product-item:hover {
    background: var(--color-surface-alt);
}

/* 🔢 ORDER ROW (usa tu sistema base) */

.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.qty-input {
    width: 50px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.remove-btn {
    background: var(--color-danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    cursor: pointer;
}

/* 💰 SUMMARY */

.rv-order-summary {
    background: var(--color-surface-alt);
    padding: 15px;
    border-radius: var(--radius);
    margin-top: 15px;

    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rv-order-summary__success {
    color: var(--color-success);
}

.rv-order-summary__danger {
    color: var(--color-danger);
    display: none;
}

.rv-order-summary__total {
    font-size: 20px;
    font-weight: 700;
}

.rv-order-summary + .rv-btn {
    margin-top: 25px;
}


/* 🧾 INVOICE MODULE */

.rv-invoice {
    max-width: 900px;
    margin: auto;
}

/* HEADER */
.rv-invoice__header {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* META */
.rv-invoice__meta {
    margin-bottom: 20px;
}

.rv-invoice__meta p {
    margin: 3px 0;
    color: var(--color-text-light);
}

/* TABLE */
.rv-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.rv-table th {
    text-align: left;
    padding: 10px;
    background: var(--color-surface-alt);
    border-bottom: 2px solid var(--color-border);
}

.rv-table td {
    padding: 10px;
    border-bottom: 1px solid var(--color-border);
}

.rv-invoice__product {
    font-weight: 600;
}

/* TOTALS */
.rv-invoice__totals {
    margin-top: 20px;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rv-invoice__discount {
    color: var(--color-danger);
}

.rv-invoice__total {
    font-size: 20px;
    font-weight: bold;
}

/* PAYMENT */
.rv-invoice__payment {
    margin-top: 20px;
}

.rv-invoice__badge {
    margin-bottom: 10px;
}

/* BADGE SYSTEM */
.rv-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;

}

.rv-badge--success {
    background: var(--color-success);
    color: white;
}

.rv-badge--primary {
    background: var(--color-primary);
    color: white;
}

.rv-badge--accent {
    background: var(--color-accent);
}

/* ATTACHMENTS */
.rv-invoice__attachments {
    margin-bottom: 10px;
}

.rv-attachment a {
    color: var(--color-primary);
    text-decoration: none;
}

.rv-attachment a:hover {
    text-decoration: underline;
}

/* ACTIONS */
.rv-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* PRINT (NO INLINE YA) */
@media print {

    html,
    body{
        background:#fff !important;
        margin:0 !important;
        padding:0 !important;
    }

    body *{
        visibility:hidden !important;
    }

    #invoice,
    #invoice *{
        visibility:visible !important;
    }

    #invoice{
        display:block !important;
        position:static !important;
        width:100% !important;
        max-width:none !important;
        margin:0 !important;
        padding:20px !important;
        border:none !important;
        box-shadow:none !important;
        background:#fff !important;
        overflow:visible !important;
    }

    .rv-actions-card,
    .rv-page-header,
    nav,
    aside,
    header,
    footer{
        display:none !important;
    }

    table{
        width:100% !important;
        border-collapse:collapse !important;
    }

    tr,
    td,
    th{
        page-break-inside:avoid !important;
    }

    .rv-invoice__totals{
        margin-top:20px !important;
    }

}


/* =========================================
   🔘 ACTIONS CARD UPGRADE
========================================= */

.rv-actions-card {
    max-width: 900px;
    margin: 20px auto 0 auto;

    /* 🔥 sensación de bloque separado */
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);

    /* 🔥 aire interno */
    padding: 18px;
}

/* layout botones */
.rv-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center; /* 🔥 ESTA ES LA CLAVE */
}

/* botones dentro del card */
.rv-actions .rv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    font-weight: 500;
    padding: 10px 14px;

    box-shadow: var(--shadow-xs);
    transition: var(--transition);
}

/* hover más vivo */
.rv-actions .rv-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* 🔥 jerarquía visual */
.rv-actions .rv-btn--accent {
    font-weight: 600;
}

/* =========================================
   📱 MOBILE
========================================= */

@media (max-width: 768px) {

    .rv-actions {
        flex-direction: column;
    }

    .rv-actions .rv-btn,
    .rv-actions a {
        width: 100%;
    }

}


/* STABLE*/


//* ====================================== */
/* CREATE CUSTOMER - 3 CARDS */
/* ====================================== */

#rvCreateCardMain,
#rvCreateCardLocation,
#rvCreateCardRoute{
    max-width: 600px;
    width: 100%;
}

.rv-create-layout{
    max-width: 1280px;
    margin: 0 auto;
}

.rv-create-form{
    display: grid;
    grid-template-columns: 600px 600px;
    justify-content: center;
    gap: 22px;
    align-items: start;
}

/* ====================================== */
/* BASE CARD */
/* ====================================== */

.rv-create-card{
    padding: 24px;
}

/* ====================================== */
/* CARD 1 */
/* ====================================== */

#rvCreateCardMain{
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
}

/* ====================================== */
/* CARD 2 */
/* ====================================== */

#rvCreateCardLocation{
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    position: sticky;
    top: 20px;
}

/* ====================================== */
/* CARD 3 */
/* ====================================== */

#rvCreateCardRoute{
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin-top: -4px;
}

/* ====================================== */
/* GRID INTERNOS */
/* ====================================== */

.rv-create-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ====================================== */
/* MAPA */
/* ====================================== */

.rv-map{
    width: 100%;
    height: 380px;
    margin: 14px 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: var(--color-surface-alt);
}


.rv-status-muted{
    margin-top: 10px;
    font-size: 14px;
    color: var(--color-muted);
}

/* ====================================== */
/* BOTÓN FINAL */
/* ====================================== */

#rvCreateCardRoute .rv-btn{
    margin-top: 18px;
}

/* ====================================== */
/* TABLET */
/* ====================================== */

@media (max-width: 1260px){

    .rv-create-layout{
        max-width: 820px;
    }

    .rv-create-form{
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    #rvCreateCardMain,
    #rvCreateCardLocation,
    #rvCreateCardRoute{
        max-width: 100%;
        grid-column: auto;
        grid-row: auto;
    }

    #rvCreateCardLocation{
        position: static;
    }

}

/* HEADER */

.rv-create-header{
    margin-bottom: 22px;
}

.rv-create-page-title{
    margin: 0;
    font-size: 36px;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.1;
}


/* BLOCK */

.rv-create-customer-type{
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 24px;
}

.rv-create-customer-type__title{
    font-size: 18px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 14px;
}

.rv-create-customer-type .rv-form-group{
    margin-bottom: 0;
}


/* SELECT igual al resto del form */

select.rv-form-input{
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 15px;
    width: 100%;
}

select.rv-form-input:focus{
    outline: none;
    border-color: var(--color-primary);
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    .rv-create-grid{
        grid-template-columns: 1fr;
    }

    .rv-create-card{
        padding: 18px;
    }

    .rv-map{
        height: 300px;
    }

}


/* ====================================== */
/* INVOICES ADMIN */
/* ====================================== */

.rv-invoice-admin-card{
    max-width: 1100px;
    margin: 0 auto;
}

.rv-invoice-toolbar{
    margin-bottom: 18px;
}

.rv-invoice-search-input{
    width: 100%;
    max-width: 420px;
}


/* ====================================== */
/* MOBILE INVOICE ADMIN FIX */
/* ====================================== */

@media (max-width: 768px){

    .rv-invoice-admin-card{
        padding:16px;
    }

    .rv-invoice-toolbar{
        flex-shrink:0;
        margin-bottom:14px;
    }

    .rv-invoice-search-input{
        width:100%;
    }


}


/* ====================================== */
/* PRODUCTS PAGE */
/* ====================================== */

.rv-products-layout{
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 22px;
    align-items: start;
}

/* ====================================== */
/* CREATE CARD */
/* ====================================== */

.rv-product-create-card{
    position: sticky;
    top: 20px;
}

.rv-products-form-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
    margin-bottom: 18px;
}

.rv-products-full{
    grid-column: 1 / -1;
}

.rv-textarea{
    resize: vertical;
    min-height: 110px;
}

/* ====================================== */
/* PRODUCT LIST */
/* ====================================== */

.rv-product-mobile-list{
    display: none;
}

.rv-product-mobile-item{
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}

.rv-product-mobile-meta{
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.rv-product-name{
    font-weight: 700;
    color: var(--color-text);
}

.rv-product-price{
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 10px;
}

.rv-table-wrap{
    margin-top: 14px;
}


/* ====================================== */
/* ACTIVE PRODUCTS CARD
   fixed height + internal scroll
/* ====================================== */

.rv-product-list-card{


    height: 500px;          /* ← cambia este valor */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* título queda fijo arriba */
.rv-product-list-card .rv-section-title{
    flex-shrink: 0;
    margin-bottom: 14px;
}

/* zona scrolleable */
.rv-product-list-card .rv-table-wrap,
.rv-product-list-card .rv-product-mobile-list{
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

/* scrollbar limpio */
.rv-product-list-card .rv-table-wrap::-webkit-scrollbar,
.rv-product-list-card .rv-product-mobile-list::-webkit-scrollbar{
    width: 8px;
}

.rv-product-list-card .rv-table-wrap::-webkit-scrollbar-thumb,
.rv-product-list-card .rv-product-mobile-list::-webkit-scrollbar-thumb{
    background: var(--color-border-strong);
    border-radius: 999px;
}

.rv-product-list-card .rv-table-wrap::-webkit-scrollbar-track,
.rv-product-list-card .rv-product-mobile-list::-webkit-scrollbar-track{
    background: transparent;
}


/* FIX BLEEDING DESKTOP */

@media (min-width: 769px){

    .rv-products-layout{
        grid-template-columns: minmax(0, 900px) minmax(380px, 520px);
        align-items: start;
    }

    .rv-product-create-card{
        min-width: 0;
        width: 100%;
    }

    .rv-product-list-card{
        min-width: 0;
        width: 100%;
        overflow: hidden;
    }

    .rv-products-form-grid{
        grid-template-columns: 1fr 1fr;
    }

    .rv-products-form-grid > *{
        min-width: 0;
    }

    .rv-form-input{
        width: 100%;
        max-width: 100%;
    }

    .rv-textarea{
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

}

/* ====================================== */
/* TABLET */
/* ====================================== */

@media (max-width: 1100px){

    .rv-products-layout{
        grid-template-columns: 1fr;
    }

    .rv-product-create-card{
        position: static;
    }

}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    .rv-products-form-grid{
        grid-template-columns: 1fr;
    }

    .rv-products-full{
        grid-column: auto;
    }

    .rv-product-mobile-list{
        display: block;
        margin-top: 10px;
    }

    .rv-table-wrap{
        display: none;
    }

}


/* ====================================== */
/* INVENTORY ACTION CENTER */
/* ====================================== */

.rv-inventory-action-center{
    max-width:1200px;
    margin:0 auto;
}

.rv-inventory-action-card{
    padding:22px;
}

.rv-inventory-action-header{
    margin-bottom:18px;
}

.rv-inventory-action-title{
    font-size:20px;
    font-weight:800;
    color:var(--color-text);
}

.rv-inventory-action-subtitle{
    margin-top:5px;
    font-size:14px;
    color:var(--color-muted);
}

.rv-inventory-action-buttons{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:14px;
}

.rv-inventory-action-btn{
    min-height:82px;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;

    padding:16px;

    font-size:15px;
    font-weight:700;
    text-align:center;

    border-radius:var(--radius);
    border:1px solid var(--color-border);

    box-shadow:var(--shadow-xs);
    transition:var(--transition);
}

.rv-inventory-action-btn:hover{
    transform:translateY(-2px);
    box-shadow:var(--shadow-sm);
}


/* ====================================== */
/* INVENTORY MODALS */
/* ====================================== */

.rv-inventory-modal{
    display:none;
}

.rv-inventory-modal.is-open{
    display:flex;
}

.rv-inventory-modal__content{
    width:calc(100% - 40px);
    max-width:1100px;
    max-height:90vh;

    padding:22px;

    overflow:hidden;

    text-align:left;
}

.rv-inventory-modal__content--medium{
    max-width:850px;
}

.rv-inventory-modal__header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;

    margin-bottom:18px;
}

.rv-inventory-modal__heading{
    min-width:0;
}

.rv-inventory-modal__title{
    margin:0;

    font-size:20px;
    font-weight:800;
    color:var(--color-text);
}

.rv-inventory-modal__subtitle{
    margin-top:5px;

    font-size:14px;
    color:var(--color-muted);
}

.rv-inventory-modal__close{
    flex-shrink:0;

    width:36px;
    height:36px;

    display:flex;
    align-items:center;
    justify-content:center;

    border:none;
    border-radius:var(--radius-sm);

    background:var(--color-surface-alt);
    color:var(--color-text);

    cursor:pointer;
    transition:var(--transition-fast);
}

.rv-inventory-modal__close:hover{
    background:var(--color-border);
}

.rv-inventory-modal__body{
    max-height:calc(90vh - 110px);
    overflow:auto;
}


/* ====================================== */
/* INVENTORY MODAL RESPONSIVE */
/* ====================================== */

@media (max-width:900px){

    .rv-inventory-action-buttons{
        grid-template-columns:1fr;
    }

    .rv-inventory-action-btn{
        min-height:64px;
    }

}


@media (max-width:768px){

    .rv-inventory-action-card{
        padding:16px;
    }


    /* ====================================== */
    /* INVENTORY MODAL BASE */
    /* ====================================== */

    .rv-inventory-modal__content,
    .rv-inventory-modal__content--medium{
        width:calc(100% - 20px);
        max-width:none;
        max-height:94vh;

        padding:16px;
    }

    .rv-inventory-modal__body{
        max-height:calc(94vh - 100px);
    }

    .rv-inventory-modal__header{
        gap:10px;
        margin-bottom:14px;
    }

    .rv-inventory-modal__title{
        font-size:18px;
        line-height:1.25;
    }

    .rv-inventory-modal__subtitle{
        font-size:13px;
    }


    /* ====================================== */
    /* WAREHOUSE VIEW MODAL */
    /* ====================================== */

    .rv-warehouse-view-scroll{
        max-height:60vh;
        border-radius:12px;
        overflow-y:auto;
        overflow-x:hidden;
    }


    .rv-warehouse-view-table thead{
        display:none;
    }


    .rv-warehouse-view-table tbody tr{
        display:block;

        padding:16px 14px;

        border-bottom:1px solid var(--color-border);

        background:var(--color-surface);
    }


    .rv-warehouse-view-table tbody tr:last-child{
        border-bottom:none;
    }


    .rv-warehouse-view-table tbody td{
        display:block;
        padding:0;
        border:none;
    }


    /* PRODUCT NAME */

    .rv-warehouse-view-table tbody td:first-child{
        margin:0;

        font-size:16px;
        line-height:1.35;

        color:var(--color-text);
    }


    .rv-warehouse-view-table .rv-product-name{
        font-size:16px;
        font-weight:800;
    }


    .rv-warehouse-view-table .rv-product-meta{
        margin-top:5px;

        font-size:12px;
        font-weight:500;

        color:var(--color-muted);
    }


    /* STOCK */

    .rv-warehouse-view-table tbody td:nth-child(2){
        margin-top:12px;

        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;

        padding:10px 12px;

        border-radius:8px;

        background:var(--color-primary-soft);

        color:var(--color-primary);
    }


    .rv-warehouse-view-table tbody td:nth-child(2)::before{
        content:"Stock disponible";

        font-size:13px;
        font-weight:600;

        color:var(--color-text-light);
    }


    .rv-warehouse-view-table tbody td:nth-child(2) strong{
        font-size:17px;
        font-weight:800;

        color:var(--color-primary);
    }




}


/* ====================================== */
/* INVENTORY PAGE */
/* ====================================== */

.rv-inventory-layout{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:24px;
    align-items:start;
}

.rv-inventory-col{
    display:contents;
}

/* ====================================== */
/* CARD HELPERS */
/* ====================================== */

.rv-inventory-card{
    overflow:hidden;
}

.rv-card-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    margin-bottom:18px;
}

.rv-page-subtitle{
    margin-top:6px;
    color:var(--color-muted);
    font-size:14px;
}

.rv-section-subtitle{
    margin-top:4px;
    font-size:13px;
    color:var(--color-muted);
}

.rv-mt-xs{ margin-top:6px; }
.rv-mt-md{ margin-top:16px; }
.rv-mb-md{ margin-bottom:16px; }

/* ====================================== */
/* FORMS */
/* ====================================== */


/* ====================================== */
/* PICKER LIST */
/* ====================================== */


/* ====================================== */
/* PRODUCT TEXT */
/* ====================================== */

.rv-product-name{
    font-weight:700;
    color:var(--color-text);
}

.rv-product-meta{
    font-size:13px;
    color:var(--color-muted);
    margin-top:4px;
}

.rv-price{
    font-weight:800;
    color:var(--color-primary);
}

/* ====================================== */
/* TABLES */
/* ====================================== */

.rv-table-scroll{
    max-height:520px;
    overflow:auto;
    border:1px solid var(--color-border);
    border-radius:var(--radius);
    background:var(--color-surface);
}

.rv-table{
    width:100%;
    border-collapse:collapse;
}

.rv-table thead{
    position:sticky;
    top:0;
    z-index:5;
}

.rv-table thead th{
    background:var(--color-surface);
    border-bottom:1px solid var(--color-border);
    padding:12px 14px;
    font-size:13px;
    font-weight:700;
    color:var(--color-text-light);
    text-align:left;
    white-space:nowrap;
}

.rv-table tbody td{
    padding:12px 14px;
    border-bottom:1px solid var(--color-border);
    vertical-align:middle;
}

.rv-table tbody tr:last-child td{
    border-bottom:none;
}

.rv-table tbody tr:hover{
    background:var(--color-surface-alt);
}

.rv-table tbody tr.selected{
    background:var(--color-primary-soft);
}

/* ====================================== */
/* MINI ACTIONS */
/* ====================================== */

.rv-mini-actions{
    display:flex;
    gap:8px;
    align-items:center;
}

.rv-mini-btn{
    width:32px;
    height:32px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    background:var(--color-surface-alt);
    color:var(--color-text);
    transition:var(--transition-fast);
    font-weight:700;
}

.rv-mini-btn:hover{
    background:var(--color-border);
}


/* ====================================== */
/* STATES */
/* ====================================== */

.rv-empty-state{
    padding:18px;
    color:var(--color-muted);
    text-align:center;
}


/* ====================================== */
/* SCROLLBARS */
/* ====================================== */


/* ====================================== */
/* TABLET */
/* ====================================== */

@media (max-width: 1100px){

    .rv-inventory-layout{
        grid-template-columns:1fr;
    }

    .rv-table-scroll{
        max-height:460px;
    }

}
/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    .rv-inventory-layout{
        gap:18px;
    }

    .rv-card-toolbar{
        flex-direction:column;
        align-items:stretch;
    }


    /* ================================= */
    /* SEARCH BAR MOBILE FIX            */
    /* ================================= */

    #warehouseSearch{
        width:100%;
        height:42px;
        font-size:15px;
        padding:0 14px;
        border:1px solid var(--color-border);
        border-radius:10px;
        box-sizing:border-box;
        display:block;
    }

    /* ================================= */
    /* BODEGA MOBILE REDESIGN           */
    /* ================================= */

    .rv-table-scroll{
        max-height:430px;
        overflow-y:auto;
        overflow-x:hidden;
    }

    .rv-table{
        width:100%;
    }

    .rv-table thead{
        display:none;
    }

    .rv-table tbody tr{
        display:block;
        padding:14px 12px;
        border-bottom:1px solid var(--color-border);
    }

    .rv-table tbody td{
        display:block;
        padding:0;
        border:none;
    }

    /* PRODUCTO */
    .rv-table tbody td:nth-child(1){
        font-weight:700;
        font-size:16px;
        line-height:1.35;
    }

    .rv-table tbody td:nth-child(1) .rv-product-meta{
        margin-top:6px;
        font-size:13px;
        color:var(--color-muted);
        font-weight:500;
    }

    /* STOCK */
    .rv-table tbody td:nth-child(2){
        margin-top:10px;
        font-size:15px;
        font-weight:700;
        color:var(--color-primary);
    }

    .rv-table tbody td:nth-child(2)::before{

        color:var(--color-text);
        font-weight:600;
    }

    /* ASIGNAR */
    .rv-table tbody td:nth-child(3){
        margin-top:12px;
        display:flex;
        gap:8px;
        align-items:center;
    }

    .rv-table input[type="number"]{
        width:88px;
        height:38px;
        font-size:15px;
        text-align:center;
        border-radius:8px;
    }

    .rv-btn--sm,
    .rv-mini-btn{
        width:38px;
        height:38px;
        padding:0;
        display:flex;
        align-items:center;
        justify-content:center;
        border-radius:8px;
        font-size:18px;
    }

}

/* ====================================== */
/* WAREHOUSE ADD MODAL - MOBILE */
/* ====================================== */

@media (max-width:768px){

    /* ====================================== */
    /* SCROLL AREA */
    /* ====================================== */

    .rv-warehouse-add-scroll{
        max-height:62vh;

        overflow-y:auto;
        overflow-x:hidden;

        border-radius:12px;
    }


    /* ====================================== */
    /* TABLE RESET FOR THIS MODAL */
    /* ====================================== */

    .rv-table.rv-warehouse-add-table thead{
        display:none;
    }


    .rv-table.rv-warehouse-add-table tbody tr{
        display:grid;

        grid-template-columns:auto 1fr;

        gap:10px 12px;

        padding:16px 14px;

        border-bottom:1px solid var(--color-border);

        background:var(--color-surface);
    }


    .rv-table.rv-warehouse-add-table tbody tr:last-child{
        border-bottom:none;
    }


    .rv-table.rv-warehouse-add-table tbody td{
        display:block;

        padding:0;
        margin:0;

        border:none;
    }


    /* ====================================== */
    /* PRODUCT */
    /* ====================================== */

    .rv-table.rv-warehouse-add-table tbody td:nth-child(1){
        grid-column:1 / -1;

        margin:0;

        color:var(--color-text);
    }


    .rv-warehouse-add-table .rv-product-name{
        font-size:16px;
        font-weight:800;
        line-height:1.3;
    }


    .rv-warehouse-add-table .rv-product-meta{
        margin-top:5px;

        font-size:12px;
        font-weight:500;

        color:var(--color-muted);
    }


    /* ====================================== */
    /* PRESENTATION */
    /* ====================================== */

    .rv-table.rv-warehouse-add-table tbody td:nth-child(2){
        grid-column:1;

        display:flex;

        align-items:center;

        margin:0;

        color:var(--color-text);
    }


    .rv-warehouse-add-table .rv-badge{
        padding:5px 10px;

        font-size:12px;
        font-weight:700;
    }


    /* ====================================== */
    /* PRICE */
    /* ====================================== */

    .rv-table.rv-warehouse-add-table tbody td:nth-child(3){
        grid-column:2;

        display:flex;

        align-items:center;
        justify-content:flex-end;

        margin:0;

        color:var(--color-primary);
    }


    .rv-warehouse-add-table .rv-price{
        font-size:16px;
        font-weight:800;
    }


    /* ====================================== */
    /* ACTION */
    /* ====================================== */

    .rv-table.rv-warehouse-add-table tbody td:nth-child(4){
        grid-column:1 / -1;

        display:block;

        margin-top:2px;
    }


    .rv-warehouse-add-table .rv-mini-actions{
        display:block;

        width:100%;
        margin:0;
    }


    .rv-warehouse-add-table .rv-stock-inline-form{
        width:100%;
        margin:0;
    }


    /* ====================================== */
    /* CLOSED STATE */
    /* ====================================== */

    .rv-warehouse-add-table
    .rv-stock-inline-form:not(.is-open){
        display:block;

        width:100%;
    }


    .rv-warehouse-add-table
    .rv-stock-inline-form:not(.is-open)
    .rv-stock-input,

    .rv-warehouse-add-table
    .rv-stock-inline-form:not(.is-open)
    .rv-save-stock-btn,

    .rv-warehouse-add-table
    .rv-stock-inline-form:not(.is-open)
    .rv-cancel-stock-btn{
        display:none !important;
    }


    .rv-warehouse-add-table
    .rv-stock-inline-form:not(.is-open)
    .rv-toggle-stock-btn{
        display:flex !important;

        width:100% !important;
        height:42px !important;

        align-items:center;
        justify-content:center;

        padding:0 14px !important;

        border-radius:8px;

        font-size:17px;
    }


    /* ====================================== */
    /* OPEN STATE */
    /* ====================================== */

    .rv-warehouse-add-table
    .rv-stock-inline-form.is-open{
        display:grid;

        grid-template-columns:minmax(0, 1fr) 44px 44px;

        gap:8px;

        width:100%;
    }


    .rv-warehouse-add-table
    .rv-stock-inline-form.is-open
    .rv-stock-input{
        display:block !important;

        width:100% !important;
        min-width:0;

        height:42px;

        padding:0 12px;

        border:1px solid var(--color-border);
        border-radius:8px;

        background:var(--color-surface);

        font-size:15px;
        text-align:center;
    }


    .rv-warehouse-add-table
    .rv-stock-inline-form.is-open
    .rv-save-stock-btn,

    .rv-warehouse-add-table
    .rv-stock-inline-form.is-open
    .rv-cancel-stock-btn{
        display:flex !important;

        width:44px !important;
        height:42px !important;

        padding:0 !important;

        align-items:center;
        justify-content:center;

        border-radius:8px;
    }


    .rv-warehouse-add-table
    .rv-stock-inline-form.is-open
    .rv-toggle-stock-btn{
        display:none !important;
    }

}


/* ====================================== */
/* SELLER INVENTORY TABS */
/* ====================================== */

.rv-seller-inventory-tabs{
    display:none;
}


/* ====================================== */
/* MOBILE SELLER INVENTORY */
/* ====================================== */

@media (max-width:768px){

    .rv-seller-inventory-tabs{
        display:grid;

        grid-template-columns:1fr 1fr;

        gap:8px;

        margin-bottom:12px;
    }


    .rv-seller-inventory-tab{
        height:44px;

        border:1px solid var(--color-border);
        border-radius:8px;

        background:var(--color-surface-alt);
        color:var(--color-text);

        font-size:14px;
        font-weight:700;

        cursor:pointer;

        transition:var(--transition-fast);
    }


    .rv-seller-inventory-tab.is-active{
        background:var(--color-primary);
        color:white;

        border-color:var(--color-primary);
    }


    .rv-seller-inventory-layout{
        display:block;
    }


    .rv-seller-inventory-panel{
        display:none;
    }


    .rv-seller-inventory-panel.is-active{
        display:block;
    }


    .rv-seller-inventory-panel .rv-inventory-card{
        width:100%;
    }

}



/* ====================================== */
/* SELLER WAREHOUSE TABLE - MOBILE */
/* ====================================== */



/* ====================================== */
/* SELLER CURRENT INVENTORY - MOBILE */
/* ====================================== */

@media (max-width:768px){

    /* ====================================== */
    /* CARD / SCROLL */
    /* ====================================== */

    .rv-seller-inventory-panel[data-seller-panel="seller"]
    .rv-inventory-card{
        padding:12px;
    }


    .rv-seller-current-scroll{
        max-height:54vh;

        overflow-y:auto;
        overflow-x:hidden;

        border:1px solid var(--color-border);
        border-radius:10px;

        background:var(--color-surface);
    }


    /* ====================================== */
    /* TABLE RESET */
    /* ====================================== */

    .rv-table.rv-seller-current-table thead{
        display:none;
    }


    .rv-table.rv-seller-current-table tbody tr{
        display:grid !important;

        grid-template-columns:1fr;

        gap:14px;

        padding:16px 12px !important;

        border-bottom:1px solid var(--color-border);

        background:var(--color-surface);
    }


    .rv-table.rv-seller-current-table tbody tr:last-child{
        border-bottom:none;
    }


    .rv-table.rv-seller-current-table tbody td{
        display:block !important;

        width:100%;

        padding:0 !important;
        margin:0 !important;

        border:none !important;
    }


    /* ====================================== */
    /* PRODUCT */
    /* ====================================== */

    .rv-seller-current-table .rv-product-name{
        font-size:16px;
        font-weight:800;
        line-height:1.3;
    }


    .rv-seller-current-table .rv-product-meta{
        margin-top:6px;

        font-size:12px;
        font-weight:500;

        color:var(--color-muted);
    }


    /* ====================================== */
    /* ADJUST AREA */
    /* ====================================== */

    .rv-seller-current-table
    tbody td:nth-child(2){
        margin:0 !important;

        color:inherit !important;
    }


    .rv-seller-current-table
    tbody td:nth-child(2)
    > .rv-mini-actions{
        display:block;

        width:100%;

        margin:0;
    }


    .rv-seller-adjust-form{
        display:grid !important;

        grid-template-columns:44px minmax(0, 1fr) 44px;

        gap:8px;

        width:100%;

        align-items:center;
    }


    /* MINUS */

    .rv-seller-adjust-form .decrease-btn{
        grid-column:1;
        grid-row:1;

        width:44px !important;
        height:44px !important;

        padding:0;

        display:flex;

        align-items:center;
        justify-content:center;

        border-radius:8px;

        font-size:20px;
        font-weight:800;
    }


    /* INPUT */

    .rv-seller-adjust-form .quantity-input{
        grid-column:2;
        grid-row:1;

        width:100% !important;
        min-width:0;

        height:44px;

        padding:0 10px;

        border:1px solid var(--color-border);
        border-radius:8px;

        background:var(--color-surface);

        font-size:16px;
        font-weight:700;

        text-align:center;
    }


    .rv-seller-adjust-form .quantity-input:focus{
        outline:none;

        border-color:var(--color-primary);

        box-shadow:0 0 0 3px var(--color-primary-soft);
    }


    /* PLUS */

    .rv-seller-adjust-form .increase-btn{
        grid-column:3;
        grid-row:1;

        width:44px !important;
        height:44px !important;

        padding:0;

        display:flex;

        align-items:center;
        justify-content:center;

        border-radius:8px;

        font-size:20px;
        font-weight:800;
    }


    /* SAVE */

    .rv-seller-adjust-form .rv-btn{
        grid-column:1 / -1;
        grid-row:2;

        width:100% !important;
        height:42px;

        margin-top:2px;

        padding:0 14px !important;

        display:flex;

        align-items:center;
        justify-content:center;

        border-radius:8px;

        font-size:14px;
        font-weight:700;
    }

}

@media (max-width:768px){

    /* ====================================== */
    /* CARD / SCROLL */
    /* ====================================== */

    .rv-seller-inventory-panel[data-seller-panel="warehouse"]
    .rv-inventory-card{
        padding:12px;
    }


    .rv-seller-warehouse-scroll{
        max-height:54vh;

        overflow-y:auto;
        overflow-x:hidden;

        border:1px solid var(--color-border);
        border-radius:10px;

        background:var(--color-surface);
    }


    /* ====================================== */
    /* TABLE RESET */
    /* ====================================== */

    .rv-table.rv-seller-warehouse-table thead{
        display:none;
    }


    .rv-table.rv-seller-warehouse-table tbody tr{
        display:grid !important;

        grid-template-columns:1fr;

        gap:12px;

        padding:14px 12px !important;

        border-bottom:1px solid var(--color-border);

        background:var(--color-surface);
    }


    .rv-table.rv-seller-warehouse-table tbody tr:last-child{
        border-bottom:none;
    }


    .rv-table.rv-seller-warehouse-table tbody td{
        display:block !important;

        width:100%;

        padding:0 !important;
        margin:0 !important;

        border:none !important;
    }


    /* ====================================== */
    /* PRODUCT */
    /* ====================================== */

    .rv-table.rv-seller-warehouse-table
    tbody td:first-child{
        color:var(--color-text);
    }


    .rv-seller-warehouse-table .rv-product-name{
        font-size:16px;
        font-weight:800;
        line-height:1.25;
    }


    /* ====================================== */
    /* SKU + AVAILABLE */
    /* ====================================== */

    .rv-seller-warehouse-table .rv-product-meta-row{
        display:flex;

        align-items:center;
        justify-content:space-between;

        gap:10px;

        margin-top:8px;

        flex-wrap:nowrap;
    }


    .rv-seller-warehouse-table .rv-product-meta{
        margin:0;

        font-size:12px;
        font-weight:500;

        color:var(--color-muted);
    }


    .rv-seller-warehouse-table .rv-stock-available{
        flex-shrink:0;

        display:inline-flex;

        align-items:center;
        gap:4px;

        padding:5px 9px;

        border-radius:999px;

        background:var(--color-primary-soft);

        font-size:12px;
        font-weight:700;

        color:var(--color-text-light);
    }


    .rv-seller-warehouse-table
    .rv-stock-available strong{
        color:var(--color-primary);

        font-size:13px;
        font-weight:900;
    }


    /* ====================================== */
    /* ASSIGN AREA */
    /* ====================================== */

    .rv-table.rv-seller-warehouse-table
    tbody td:nth-child(2){
        margin:0 !important;

        color:inherit !important;
    }


    .rv-seller-assign-form{
        display:grid !important;

        grid-template-columns:minmax(0, 1fr) auto;

        gap:8px;

        width:100%;

        align-items:center;
    }


    .rv-seller-assign-form .quantity-input{
        width:100% !important;
        min-width:0;

        height:42px;

        padding:0 12px;

        border:1px solid var(--color-border);
        border-radius:8px;

        background:var(--color-surface);

        font-size:15px;
        font-weight:600;

        text-align:center;
    }


    .rv-seller-assign-form .quantity-input:focus{
        outline:none;

        border-color:var(--color-primary);

        box-shadow:0 0 0 3px var(--color-primary-soft);
    }


    .rv-seller-assign-form .rv-btn{
        width:auto !important;
        min-width:92px;

        height:42px;

        padding:0 14px !important;

        display:flex;

        align-items:center;
        justify-content:center;

        border-radius:8px;

        font-size:14px;
        font-weight:700;

        white-space:nowrap;
    }

}


/* ====================================== */
/* SEARCH BAR DESKTOP + GLOBAL FIX
/* ====================================== */

#warehouseSearch{
    width:100%;
    height:44px;
    padding:0 14px;
    font-size:15px;
    border:1px solid var(--color-border);
    border-radius:10px;
    background:var(--color-surface);
    color:var(--color-text);
    box-sizing:border-box;
    outline:none;
    transition:var(--transition-fast);
    display:block;
    margin-bottom:2px;
}

#warehouseSearch::placeholder{
    color:var(--color-muted);
}

#warehouseSearch:focus{
    border-color:var(--color-primary);
    box-shadow:0 0 0 3px rgba(245,158,11,.12);
}

/* spacing below seller select */
.rv-inventory-card .rv-mb-md{
    margin-bottom:14px;
}

/* ====================================== */
/* DESKTOP ONLY */
/* ====================================== */

@media (min-width: 769px){

    #warehouseSearch{
        max-width:100%;
        height:46px;
        font-size:15px;
    }

}

/* ====================================== */
/* ROUTES PAGE */
/* ====================================== */

.rv-routes-layout{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:22px;
    align-items:start;
}

/* ====================================== */
/* ROUTE CARD */
/* ====================================== */

.rv-route-card{
    padding:20px;
}

.rv-route-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    padding-bottom:14px;
    margin-bottom:14px;
    border-bottom:1px solid var(--color-border);
}

.rv-route-header__left{
    min-width:0;
}

.rv-route-header__right{
    flex-shrink:0;
}

.rv-route-title{
    font-size:18px;
    font-weight:800;
    color:var(--color-text);
    line-height:1.2;
}

.rv-route-seller{
    margin-top:6px;
    font-size:14px;
    color:var(--color-muted);
}

.rv-route-seller--warning{
    color:var(--color-danger);
}

.rv-route-username{
    color:var(--color-text-light);
}

/* ====================================== */
/* CUSTOMERS */
/* ====================================== */


/* ====================================== */
/* SCROLLBAR */
/* ====================================== */


/* ====================================== */
/* TABLET */
/* ====================================== */

@media (max-width: 1100px){

    .rv-routes-layout{
        grid-template-columns:1fr;
    }

}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    .rv-route-card{
        padding:18px;
    }

    .rv-route-header{
        flex-direction:column;
        align-items:stretch;
        gap:10px;
    }

    .rv-route-header__right{
        align-self:flex-start;
    }

    .rv-route-title{
        font-size:17px;
    }

    .rv-route-seller{
        font-size:13px;
    }


}


/* ====================================== */
/* EDIT INVOICE PAGE */
/* ====================================== */

.rv-edit-order {
    width: 100%;
}

.rv-edit-order__hero-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.rv-edit-order__cart {
    min-width: 0;
}

.rv-edit-order__row {
    gap: 14px;
}

.rv-edit-order__item-main {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rv-edit-order__item-main small {
    color: var(--color-muted);
}

.rv-edit-order__line-price {
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 800;
}

.rv-edit-order__actions {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    gap: 8px;
}

.rv-edit-order__qty-btn {
    width: 36px;
    height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);

    background: var(--color-surface);
    color: var(--color-text);

    font-size: 20px;
    font-weight: 800;

    cursor: pointer;
}

.rv-edit-order__qty-btn:hover {
    background: var(--color-surface-alt);
}

.rv-edit-order__qty-btn:active {
    transform: scale(.97);
}

.rv-edit-order__product {
    width: 100%;
    text-align: left;
    font: inherit;
}

.rv-edit-order__legacy {
    margin-top: 18px;
    padding-top: 16px;

    border-top: 1px solid var(--color-border);
}

.rv-edit-order__legacy-row {
    gap: 14px;
}

.rv-edit-order__warning {
    margin-top: 14px;
}

.rv-edit-order .qty-input {
    width: 58px;
    height: 36px;

    text-align: center;
    font-weight: 800;
}


/* ====================================== */
/* TABLET */
/* ====================================== */

@media (max-width: 1050px) {

    .rv-edit-order .rv-order-workspace {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(320px, .9fr);
    }

}


/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px) {

    .rv-edit-order {
        gap: 14px;
    }

    .rv-edit-order .rv-order-builder__hero {
        padding: 18px;

        flex-direction: column;
        align-items: stretch;

        gap: 14px;
    }

    .rv-edit-order__hero-actions {
        width: 100%;
    }

    .rv-edit-order__hero-actions .rv-btn {
        width: 100%;
    }

    .rv-edit-order .rv-order-workspace {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .rv-edit-order .rv-order-catalog,
    .rv-edit-order .rv-order-cart {
        width: 100%;
    }

    .rv-edit-order .rv-order-cart {
        position: static;
    }

    .rv-edit-order .rv-order-panel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .rv-edit-order .rv-order-step-btn {
        width: 100%;

        justify-content: space-between;
    }

    .rv-edit-order .rv-order-product-list {
        max-height: 360px;
    }

    .rv-edit-order .rv-order-product {
        min-height: 72px;
    }

    .rv-edit-order__row,
    .rv-edit-order__legacy-row {
        flex-direction: column;
        align-items: stretch;

        gap: 12px;

        padding: 14px 0;
    }

    .rv-edit-order__actions {
        width: 100%;

        display: grid;
        grid-template-columns:
            44px
            minmax(58px, 1fr)
            44px
            46px;

        gap: 8px;
    }

    .rv-edit-order__qty-btn {
        width: 100%;
        height: 44px;
    }

    .rv-edit-order .qty-input {
        width: 100%;
        height: 44px;

        font-size: 16px;
    }

    .rv-edit-order .remove-btn {
        width: 100%;
        height: 44px;

        font-size: 18px;
    }

    .rv-edit-order .rv-order-checkout {
        margin-top: 16px;
    }

    .rv-edit-order .rv-order-checkout-button {
        min-height: 54px;

        font-size: 16px;
    }

}


/* ====================================== */
/* SMALL MOBILE */
/* ====================================== */

@media (max-width: 480px) {

    .rv-edit-order .rv-order-product {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .rv-edit-order .rv-order-product__aside {
        width: 100%;

        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

}

/* ====================================== */
/* PAYMENT PAGE */
/* ====================================== */

.rv-payment-layout{
    max-width: 640px;
    margin: 0 auto;
}

.rv-payment-card{
    padding: 24px;
}

/* ====================================== */
/* SUMMARY */
/* ====================================== */

.rv-payment-summary{
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.rv-payment-summary__row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 6px 0;
}

.rv-payment-summary__row + .rv-payment-summary__row{
    border-top: 1px solid var(--color-border);
    margin-top: 6px;
    padding-top: 12px;
}

.rv-payment-total{
    color: var(--color-primary);
    font-size: 18px;
}

/* ====================================== */
/* HELPERS */
/* ====================================== */

.rv-hidden-block{
    display: none;
}

.rv-mt-xs{
    margin-top: 8px;
}

.rv-mt-md{
    margin-top: 18px;
}

/* ====================================== */
/* FILE INPUT */
/* ====================================== */

input[type="file"].rv-form-input{
    padding: 10px;
    cursor: pointer;
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    .rv-payment-card{
        padding: 18px;
    }

    .rv-payment-summary{
        padding: 14px;
    }

    .rv-payment-summary__row{
        font-size: 14px;
    }

    .rv-payment-total{
        font-size: 17px;
    }

}


/* ====================================== */
/* PAYMENT PAGE */
/* ====================================== */

.rv-payment-layout{
    max-width: 640px;
    margin: 0 auto;
}

.rv-payment-card{
    padding: 24px;
}

/* ====================================== */
/* SUMMARY */
/* ====================================== */

.rv-payment-summary{
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.rv-payment-summary__row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 6px 0;
}

.rv-payment-summary__row + .rv-payment-summary__row{
    border-top: 1px solid var(--color-border);
    margin-top: 6px;
    padding-top: 12px;
}

.rv-payment-total{
    color: var(--color-primary);
    font-size: 18px;
}

/* ====================================== */
/* HELPERS */
/* ====================================== */

.rv-hidden-block{
    display: none;
}

.rv-mt-xs{
    margin-top: 8px;
}

.rv-mt-md{
    margin-top: 18px;
}

/* ====================================== */
/* FILE INPUT */
/* ====================================== */

input[type="file"].rv-form-input{
    padding: 10px;
    cursor: pointer;
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    .rv-payment-card{
        padding: 18px;
    }

    .rv-payment-summary{
        padding: 14px;
    }

    .rv-payment-summary__row{
        font-size: 14px;
    }

    .rv-payment-total{
        font-size: 17px;
    }

}


/* ====================================== */
/* ATTACHMENT PAGE */
/* ====================================== */

.rv-attachment-layout{
    max-width: 560px;
    margin: 0 auto;
}

.rv-attachment-card{
    padding: 24px;
}

/* ====================================== */
/* SUMMARY */
/* ====================================== */

.rv-attachment-summary{
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 20px;
}

.rv-attachment-summary__row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* ====================================== */
/* FILE INPUT */
/* ====================================== */

input[type="file"].rv-form-input{
    padding: 10px;
    cursor: pointer;
}

/* ====================================== */
/* FILE NAME */
/* ====================================== */


.rv-hidden{
    display: none;
}

/* ====================================== */
/* HELPERS */
/* ====================================== */

.rv-mt-md{
    margin-top: 18px;
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    .rv-attachment-card{
        padding: 18px;
    }

    .rv-attachment-summary{
        padding: 12px 14px;
    }

}


/* ====================================== */
/* RETURNS PAGE */
/* ====================================== */

.rv-returns-layout{
    max-width: 1180px;
    margin: 0 auto;
}

.rv-returns-layout form{
    display: grid;
    grid-template-columns: 1.35fr 0.75fr;
    gap: 24px;
    align-items: start;
}

/* ====================================== */
/* MAIN CARD */
/* ====================================== */

.rv-returns-card{
    padding: 22px;
}

.rv-card-toolbar{
    display:flex;
    justify-content:space-between;
    gap:16px;
    align-items:center;
    margin-bottom:18px;
}

.rv-returns-counter{
    padding:10px 14px;
    border-radius:999px;
    background:var(--color-primary-soft);
    color:var(--color-primary);
    font-weight:700;
    white-space:nowrap;
}

.rv-table-wrap{
    overflow:auto;
}

.rv-returns-desktop{
    display:block;
}

.rv-returns-mobile{
    display:none;
}

.rv-qty-input{
    max-width:90px;
    text-align:center;
}

.rv-return-row td{
    vertical-align:middle;
}

/* ====================================== */
/* SUMMARY */
/* ====================================== */

.rv-returns-summary-card{
    padding:22px;
    position:sticky;
    top:20px;
}

.rv-summary-list{
    margin-top:16px;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.rv-summary-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    padding:12px 0;
    border-bottom:1px solid var(--color-border);
}

.rv-summary-row:last-child{
    border-bottom:none;
}

.rv-mt-md{
    margin-top:18px;
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 1024px){

    .rv-returns-layout form{
        grid-template-columns:1fr;
    }

    .rv-returns-summary-card{
        position:static;
    }

}

@media (max-width: 768px){

    .rv-returns-desktop{
        display:none;
    }

    .rv-returns-mobile{
        display:flex;
        flex-direction:column;
        gap:14px;
    }

    .rv-return-mobile-card{
        border:1px solid var(--color-border);
        border-radius:var(--radius);
        padding:14px;
        background:var(--color-surface-alt);
    }

    .rv-return-mobile-price{
        margin-top:6px;
        margin-bottom:12px;
        font-weight:700;
        color:var(--color-primary);
    }

    .rv-card-toolbar{
        flex-direction:column;
        align-items:flex-start;
    }

    .rv-returns-card,
    .rv-returns-summary-card{
        padding:18px;
    }

}

/* ====================================== */
/* SEARCH BAR */
/* ====================================== */

.rv-returns-search-wrap{
    margin-bottom:16px;
}

.rv-returns-search{
    width:100%;
}

/* ====================================== */
/* PRODUCTOS VENDIDOS SCROLL REAL */
/* ====================================== */

.rv-returns-card{
    display:flex;
    flex-direction:column;
    overflow:hidden;
}

/* contenedor visible */
.rv-returns-desktop{
    display:block;
    height:560px;      /* desktop real */
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    padding-right:6px;
}

/* mobile */
.rv-returns-mobile{
    display:none;
}

/* scrollbar */
.rv-returns-desktop::-webkit-scrollbar{
    width:8px;
}

.rv-returns-desktop::-webkit-scrollbar-thumb{
    background:var(--color-border-strong);
    border-radius:999px;
}

.rv-returns-desktop::-webkit-scrollbar-track{
    background:transparent;
}

/* MOBILE */
@media (max-width:768px){

    .rv-returns-desktop{
        display:none;
    }

    .rv-returns-mobile{
        gap: 14px;
        display:flex;
        height:230px;
        min-height:0;
        overflow-y:auto;
        overflow-x:hidden;
        padding-right:4px;
    }

    .rv-returns-mobile::-webkit-scrollbar{
        width:6px;
    }

    .rv-returns-mobile::-webkit-scrollbar-thumb{
        background:var(--color-border-strong);
        border-radius:999px;
    }

}


/* ====================================== */
/* RETURN DETAIL */
/* ====================================== */

.rv-return-detail-card{
    max-width: 980px;
    margin: 0 auto;
    padding: 24px;
}

.rv-return-actions-card{
    max-width: 980px;
    margin: 18px auto 0;
    padding: 18px;
}

/* HEADER */

.rv-return-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:18px;
    flex-wrap:wrap;
    margin-bottom:18px;
}

.rv-return-billbox{
    min-width:180px;
    padding:14px;
    border-radius:var(--radius);
    background:var(--color-surface-alt);
    border:1px solid var(--color-border);
    text-align:right;
}

.rv-return-billbox__title{
    font-size:13px;
    color:var(--color-muted);
}

.rv-return-billbox__number{
    font-size:22px;
    font-weight:800;
    margin-top:4px;
}

.rv-return-billbox__status{
    margin-top:6px;
    font-size:13px;
    color:var(--color-primary);
}

/* META */

.rv-return-meta-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px;
    margin-bottom:18px;
}

.rv-meta-box{
    padding:14px;
    border-radius:var(--radius);
    background:var(--color-surface-alt);
    border:1px solid var(--color-border);
}

.rv-meta-label{
    font-size:13px;
    color:var(--color-muted);
    margin-bottom:4px;
}

.rv-meta-value{
    font-weight:700;
}

/* TABLE */

.rv-return-table-desktop{
    display:block;
}

.rv-return-mobile{
    display:none;
}

.rv-return-total-box{
    margin-top:20px;
    padding-top:18px;
    border-top:1px solid var(--color-border);
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
}

.rv-return-total-box__label{
    font-size:18px;
    font-weight:700;
}

.rv-return-total-box__value{
    font-size:28px;
    font-weight:900;
    color:var(--color-primary);
}

/* ACTIONS */

.rv-action-group{
    display:flex;
    justify-content:center;
    gap:12px;
    flex-wrap:wrap;
}

/* HELPERS */

.rv-mb-sm{
    margin-bottom:10px;
}

.rv-text-sm{
    font-size:13px;
}

/* MOBILE */
/* ====================================== */
/* MOBILE PRO FIX */
/* Reemplaza SOLO tu @media (max-width:768px) */
/* ====================================== */

@media (max-width: 768px){

    .rv-return-detail-card,
    .rv-return-actions-card{
        padding:16px;
        border-radius:16px;
    }

    .rv-return-header{
        flex-direction:column;
        align-items:stretch;
        gap:14px;
        margin-bottom:16px;
    }

    .rv-return-billbox{
        width:100%;
        min-width:unset;
        text-align:left;
        padding:16px;
    }

    .rv-return-billbox__number{
        font-size:28px;
        margin-top:6px;
    }

    .rv-return-meta-grid{
        grid-template-columns:1fr;
        gap:12px;
        margin-bottom:16px;
    }

    .rv-meta-box{
        padding:14px;
    }

    .rv-return-table-desktop{
        display:none;
    }

    .rv-return-mobile{
        display:block;
    }

    .rv-return-mobile-item{
        padding:16px;
        border-radius:14px;
        background:var(--color-surface-alt);
        border:1px solid var(--color-border);
    }

    .rv-product-name{
        font-size:20px;
        line-height:1.25;
        margin-bottom:8px;
        word-break:break-word;
    }

    .rv-text-muted{
        line-height:1.35;
        word-break:break-word;
    }

    .rv-mobile-row{
        display:flex;
        justify-content:space-between;
        align-items:center;
        gap:12px;
        padding:14px 0;
        border-bottom:1px solid var(--color-border);
        font-size:16px;
    }

    .rv-mobile-row:last-child{
        border-bottom:none;
    }

    .rv-mobile-row strong{
        font-size:18px;
    }

    .rv-return-total-box{
        margin-top:18px;
        padding-top:18px;
        flex-direction:column;
        align-items:flex-start;
        gap:8px;
    }

    .rv-return-total-box__label{
        font-size:20px;
    }

    .rv-return-total-box__value{
        font-size:36px;
        line-height:1;
        word-break:break-word;
    }

    .rv-action-group{
        display:flex;
        flex-direction:column;
        gap:10px;
    }

    .rv-action-group a,
    .rv-action-group button,
    .rv-action-group .rv-btn{
        width:100%;
    }

}

/* PRINT */

/* ====================================== */
/* PRINT FIX REAL */
/* Reemplaza TODO tu bloque @media print */
/* ====================================== */

@media print {

    html,
    body{
        background:#fff !important;
        margin:0 !important;
        padding:0 !important;
    }

    body *{
        visibility:hidden !important;
    }

    #returnDocument,
    #returnDocument *{
        visibility:visible !important;
    }

    #returnDocument{
        display:block !important;
        position:static !important;
        width:100% !important;
        max-width:none !important;
        margin:0 !important;
        padding:20px !important;
        border:none !important;
        box-shadow:none !important;
        background:#fff !important;
        overflow:visible !important;
    }

    .rv-return-actions-card,
    .rv-page-header,
    nav,
    aside,
    header,
    footer{
        display:none !important;
    }

    .rv-return-mobile{
        display:none !important;
    }

    .rv-return-table-desktop{
        display:block !important;
    }

    .rv-return-total-box{
        margin-top:18px !important;
    }

    table{
        width:100% !important;
        border-collapse:collapse !important;
    }

    tr,
    td,
    th{
        page-break-inside:avoid !important;
    }
}
/* ====================================== */
/* ADMIN DASHBOARD */
/* Adaptado al template final actual */
/* ====================================== */

.rv-admin-wrap{
    display:flex;
    flex-direction:column;
    gap:22px;
}

/* HEADER */

.rv-admin-hero{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:18px;
    flex-wrap:wrap;
}

.rv-admin-hero__left{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.rv-admin-hero__title{
    margin:0;
    font-size:34px;
    line-height:1.1;
    font-weight:800;
}

.rv-admin-hero__subtitle{
    margin:0;
    font-size:15px;
    color:var(--color-muted);
}

/* ====================================== */
/* TOP GRID */
/* ====================================== */

.rv-admin-grid{
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:18px;
}

/* METRIC CARD */

.rv-metric-card{
    min-height:160px;
    padding:22px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    transition:.18s ease;
}

.rv-metric-card:hover{
    transform:translateY(-2px);
}


.rv-metric-card__label{
    font-size:14px;
    font-weight:700;
    color:var(--color-muted);
    text-transform:uppercase;
    letter-spacing:.04em;
}


.rv-metric-card__value{
    margin-top:16px;
    font-size:34px;
    font-weight:900;
    line-height:1;
    word-break:break-word;
}


/* ====================================== */
/* LOWER SECTION */
/* ====================================== */


/* PANEL */

.rv-panel{
    padding:22px;
}

.rv-panel__title{
    margin:0 0 16px 0;
    font-size:20px;
    font-weight:800;
}

/* LIST */


/* ====================================== */
/* TABLET */
/* ====================================== */

@media (max-width:1100px){

    .rv-admin-grid{
        grid-template-columns:repeat(2,1fr);
    }

}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width:768px){

    .rv-admin-wrap{
        gap:16px;
    }

    .rv-admin-hero{
        align-items:flex-start;
    }

    .rv-admin-hero__title{
        font-size:28px;
    }

    .rv-admin-grid{
        grid-template-columns:1fr;
        gap:14px;
    }

    .rv-metric-card{
        min-height:auto;
        padding:18px;
    }

    .rv-metric-card__value{
        font-size:28px;
    }

    .rv-panel{
        padding:18px;
    }


}


/* ====================================== */
/* BUTTON LINKS FIX */
/* ====================================== */

/* ====================================== */
/* BUTTON LINKS COLOR FIX */
/* ====================================== */

a.rv-btn{
    text-decoration:none;
}

/* PRIMARY */
a.rv-btn--primary{
    background: var(--color-primary);
    color: #fff;
}

/* SECONDARY */
a.rv-btn--secondary{
    background: var(--color-surface-alt);
    color: var(--color-text);
}

/* ACCENT */
a.rv-btn--accent{
    background: var(--color-accent);
    color: #fff;
}

/* WARNING */
a.rv-btn--warning{
    background: var(--color-warning);
    color: #fff;
}

.rv-product-meta-row{
    display:flex;

    align-items:center;
    gap:12px;
    margin-top:6px;
    flex-wrap:wrap;
}

.rv-stock-available{
    font-size:14px;
    font-weight:700;
    color:var(--color-text);
    line-height:1.2;
}

.rv-stock-available strong{
    color:var(--color-primary);
    font-weight:900;
}


/* REEMPLAZA TODO TU BLOQUE rv-stock-inline-form POR ESTE */

.rv-stock-inline-form{
    display:flex;
    align-items:center;
    gap:8px;
}

.rv-stock-input{
    display:none;
    width:90px;
}

.rv-save-stock-btn,
.rv-cancel-stock-btn{
    display:none;
}

/* OPEN MODE */

.rv-stock-inline-form.is-open .rv-stock-input{
    display:block;
}

.rv-stock-inline-form.is-open .rv-save-stock-btn{
    display:inline-flex;
}

.rv-stock-inline-form.is-open .rv-cancel-stock-btn{
    display:inline-flex;
}

.rv-stock-inline-form.is-open .rv-toggle-stock-btn{
    display:none;
}

/* MOBILE FIX REAL */

@media (max-width:768px){

    .rv-stock-inline-form{
        width:100%;
        margin-bottom:10px;
    }

    /* cerrado */
    .rv-stock-inline-form:not(.is-open){
        display:flex;
        justify-content:flex-start;
        align-items:center;
    }

    /* abierto */
    .rv-stock-inline-form.is-open{
        display:grid;
        grid-template-columns:1fr auto auto;
        gap:8px;
        align-items:center;
        width:100%;
    }

    .rv-stock-inline-form.is-open .rv-stock-input{
        display:block;
        width:100%;
        min-width:0;
    }

    .rv-stock-inline-form.is-open .rv-save-stock-btn,
    .rv-stock-inline-form.is-open .rv-cancel-stock-btn{
        display:inline-flex;
        justify-content:center;
        align-items:center;
        min-width:42px;
        height:42px;
        padding:0 12px;
    }

}

/* FIX FINAL: mantener una sola línea en mobile
   y NO mostrar guardar/cancelar cerrados */

@media (max-width:768px){

    .rv-mini-actions{
        display:flex;
        flex-wrap:nowrap;
        align-items:center;
        gap:8px;
        width:100%;
    }

    .rv-mini-actions > *{
        flex:0 0 auto;
    }

    /* FORM BODEGA */
    .rv-mini-actions .rv-stock-inline-form{
        display:flex;
        align-items:center;
        gap:8px;
        width:auto;
        margin:0;
    }

    /* ESTADO CERRADO:
       solo caja */
    .rv-mini-actions .rv-stock-inline-form:not(.is-open) .rv-stock-input,
    .rv-mini-actions .rv-stock-inline-form:not(.is-open) .rv-save-stock-btn,
    .rv-mini-actions .rv-stock-inline-form:not(.is-open) .rv-cancel-stock-btn{
        display:none !important;
    }

    .rv-mini-actions .rv-stock-inline-form:not(.is-open) .rv-toggle-stock-btn{
        display:flex !important;
    }

    /* ESTADO ABIERTO:
       input + guardar + cancelar */
    .rv-mini-actions .rv-stock-inline-form.is-open .rv-toggle-stock-btn{
        display:none !important;
    }

    .rv-mini-actions .rv-stock-inline-form.is-open .rv-stock-input{
        display:block !important;
        width:90px;
    }

    .rv-mini-actions .rv-stock-inline-form.is-open .rv-save-stock-btn,
    .rv-mini-actions .rv-stock-inline-form.is-open .rv-cancel-stock-btn{
        display:flex !important;
    }

    /* botones generales */
    .rv-mini-actions .rv-btn,
    .rv-mini-actions a.rv-btn{
        width:44px;
        height:44px;
        padding:0;
        display:flex;
        align-items:center;
        justify-content:center;
    }

}


.rv-stock-desktop{
    display:inline;
}

.rv-stock-mobile{
    display:none;

    font-weight:700;
}

.rv-stock-mobile strong{
    font-weight:900;
}

/* MOBILE */
@media (max-width:768px){

    .rv-stock-desktop{
        display:none;
    }

    .rv-stock-mobile{
        display:inline-block;
        margin-top:4px;
    }

}


/* ====================================== */
/* FACTURAS ADMIN - MOBILE PRO V2 */
/* Reemplaza bloque anterior */
/* ====================================== */

@media (max-width: 768px){

    /* CARD */
    .rv-invoice-admin-card{
        padding:16px;
    }

    /* SCROLL */
    .rv-invoice-admin-card .rv-table-scroll{
        max-height:calc(100dvh - 240px);
        overflow-y:auto;
        overflow-x:hidden;
        border:1px solid var(--color-border);
        border-radius:var(--radius);
        background:var(--color-surface);
    }

    /* HIDE HEAD */
    .rv-invoice-admin-card .rv-table thead{
        display:none;
    }

    /* ROW = CARD */
    .rv-invoice-admin-card .rv-table tbody tr{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:14px 18px;
        padding:18px 14px;
        border-bottom:1px solid var(--color-border);
        align-items:start;
    }

    .rv-invoice-admin-card .rv-table tbody tr:last-child{
        border-bottom:none;
    }

    /* CELLS */
    .rv-invoice-admin-card .rv-table tbody td{
        display:block;
        padding:0;
        border:none;
        min-width:0;
    }

    /* ================================= */
    /* FACTURA HEADER FULL WIDTH */
    /* ================================= */

    .rv-invoice-admin-card .rv-table tbody td:nth-child(1){
        grid-column:1 / -1;
        margin-bottom:2px;
    }

    .rv-invoice-admin-card .rv-table tbody td:nth-child(1) .rv-product-name{
        font-size:32px;
        font-weight:900;
        line-height:1;
        margin-bottom:6px;
    }

    /* ================================= */
    /* GRID ORDER */
    /* ================================= */

    /* row 1 */
    .rv-invoice-admin-card .rv-table tbody td:nth-child(2){
        grid-column:1;
        grid-row:2;
    }

    .rv-invoice-admin-card .rv-table tbody td:nth-child(3){
        grid-column:2;
        grid-row:2;
    }

    /* row 2 */
    .rv-invoice-admin-card .rv-table tbody td:nth-child(4){
        grid-column:1;
        grid-row:3;
    }

    .rv-invoice-admin-card .rv-table tbody td:nth-child(5){
        grid-column:2;
        grid-row:3;
    }

    /* row 3 */
    .rv-invoice-admin-card .rv-table tbody td:nth-child(6){
        grid-column:1;
        grid-row:4;
    }

    .rv-invoice-admin-card .rv-table tbody td:nth-child(7){
        grid-column:2;
        grid-row:4;
        align-self:end;
    }

    /* ================================= */
    /* LABELS */
    /* ================================= */

    .rv-invoice-admin-card .rv-table tbody td:nth-child(2)::before{
        content:"📅 Fecha";
    }

    .rv-invoice-admin-card .rv-table tbody td:nth-child(3)::before{
        content:"🏪 Cliente";
    }

    .rv-invoice-admin-card .rv-table tbody td:nth-child(4)::before{
        content:"🧑‍💼 Vendedor";
    }

    .rv-invoice-admin-card .rv-table tbody td:nth-child(5)::before{
        content:"💰 Total";
    }

    .rv-invoice-admin-card .rv-table tbody td:nth-child(6)::before{
        content:"📌 Estado";
    }

    .rv-invoice-admin-card .rv-table tbody td:nth-child(2)::before,
    .rv-invoice-admin-card .rv-table tbody td:nth-child(3)::before,
    .rv-invoice-admin-card .rv-table tbody td:nth-child(4)::before,
    .rv-invoice-admin-card .rv-table tbody td:nth-child(5)::before,
    .rv-invoice-admin-card .rv-table tbody td:nth-child(6)::before{
        display:block;
        font-size:13px;
        font-weight:700;
        color:var(--color-muted);
        margin-bottom:4px;
        line-height:1.1;
    }

    /* ================================= */
    /* CONTENT TUNING */
    /* ================================= */

    .rv-invoice-admin-card .rv-table tbody td:nth-child(2){
        color:var(--color-primary);
        font-weight:800;
        font-size:16px;
    }

    .rv-invoice-admin-card .rv-table tbody td:nth-child(5) .rv-price{
        display:block;
        font-size:26px;
        font-weight:900;
        line-height:1;
    }

    .rv-invoice-admin-card .rv-table tbody td:nth-child(6) .rv-badge{
        display:inline-flex;
        min-height:38px;
        align-items:center;
        padding:0 12px;
    }

    .rv-invoice-admin-card .rv-table tbody td:nth-child(7) .rv-btn{
        width:100%;
        min-height:42px;
        display:flex;
        align-items:center;
        justify-content:center;
        margin-top:17px;
    }

}


/* ====================================== */
/* DASHBOARD TABLES - MOBILE PRO V2 */
/* Reemplaza bloque anterior */
/* ====================================== */

@media (max-width: 768px){

    /* ================================= */
    /* BASE */
    /* ================================= */


    /* ================================= */
    /* INVENTARIO
       Cantidad | número
    /* ================================= */


}


/* ====================================== */
/* HOTFIX SOLO PROXIMOS CLIENTES MOBILE */
/* Reemplaza únicamente ese bloque */
/* ====================================== */

@media (max-width:768px){

    /* en tu template YA NO existe #customers-card,
       por eso no aplicaba nada */


    /* columna izquierda */


    /* boton derecha */


    /* nombre */


    /* direccion */


    /* boton */


}


.rv-table-actions{
    white-space:nowrap;
}

.rv-table-actions a{
    display:inline-flex;
    margin-right:8px;
}

@media (max-width:768px){

.rv-table-actions{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.rv-table-actions a{
    width:100%;
    margin-right:0;
}

}


/* ====================================== */
/* INVENTORY PAGE - MOBILE PRO V2 */
/* Cantidad | número en ambas tarjetas */
/* Reemplaza bloque anterior */
/* ====================================== */

@media (max-width:768px){

    /* ================================= */
    /* BASE CELL LAYOUT */
    /* ================================= */

    .rv-inventory .rv-table tbody td:nth-child(2){
        display:flex;
        align-items:center;
        gap:10px;
        flex-wrap:wrap;
        margin-top:12px;
    }

    /* ================================= */
    /* INVENTARIO NORMAL */
    /* ================================= */

    .rv-inventory .rv-card:not(.rv-card--warning)
    .rv-table tbody td:nth-child(2)::before{
        content:"📦 Cantidad";
    }

    /* ================================= */
    /* DEVOLUCIONES */
    /* ================================= */

    .rv-inventory .rv-card--warning
    .rv-table tbody td:nth-child(2)::before{
        content:"🔁 Cantidad";
    }

    /* ================================= */
    /* LABEL STYLE */
    /* ================================= */

    .rv-inventory .rv-table tbody td:nth-child(2)::before{
        font-size:13px;
        font-weight:700;
        color:var(--color-muted);
        line-height:1;
    }

    /* ================================= */
    /* BADGE */
    /* ================================= */

    .rv-inventory .rv-table tbody td:nth-child(2) .rv-badge{
        min-width:46px;
        min-height:36px;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        padding:0 10px;
    }

}


.rv-alert{
    padding:14px 16px;
    border-radius:10px;
    font-weight:600;
}

.rv-alert--success{
    background:#dcfce7;
    color:#166534;
}


.rv-alert--warning{
    background:#fef3c7;
    color:#92400e;
}


/* ====================================== */
/* QR PAGE */
/* ====================================== */

.rv-qr{
    margin-top: 28px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 18px;

    padding: 36px 24px;

    border: 1px solid var(--color-border);
    border-radius: 20px;

    background:
        linear-gradient(
            to bottom,
            var(--color-surface),
            var(--color-surface-alt)
        );

    box-shadow: var(--shadow-sm);

    text-align: center;
}

.rv-qr__image-wrap{

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    padding: 24px;

    background: white;

    border-radius: 24px;

    border: 1px solid var(--color-border);

    box-shadow: var(--shadow);
}

.rv-qr__image{
    width: 320px;
    height: 320px;

    object-fit: contain;
    display: block;
}

.rv-qr__helper{
    font-size: 18px;
    font-weight: 800;
    color: var(--color-primary);

    text-align: center;
}

.rv-qr__uuid{

    max-width: 100%;

    color: var(--color-muted);

    font-size: 12px;

    text-align: center;

    word-break: break-all;
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    .rv-qr{
        padding: 22px 16px;
    }

    .rv-qr__image{
        width: 240px;
        height: 240px;
    }

    .rv-qr__image-wrap{
        padding: 18px;
    }

}


/* ====================================== */
/* PRINT */
/* ====================================== */

@media print {

    html,
    body{
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* esconder UI */
    .rv-sidebar,
    .rv-navbar,
    .rv-actions,
    .rv-card-toolbar,
    .rv-payment-summary{
        display: none !important;
    }

    /* limpiar layout */
    .rv-page-shell,
    .rv-payment-layout,
    .rv-payment-card,
    .rv-card{
        background: #fff !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* sticker */
    #qrSticker{

        width: 100% !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;

        margin-top: 40px !important;

        background: #fff !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* imagen QR */
    .rv-qr__image{

        width: 420px !important;
        height: 420px !important;

        display: block !important;

        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .rv-qr__image-wrap{

        background: #fff !important;
        border: none !important;
        box-shadow: none !important;
    }

}


/* ====================================== */
/* CUSTOMER VISITS TABLE */
/* ====================================== */

.rv-visits-table-scroll{
    max-height: 320px;
}

.rv-visits-date{
    font-weight: 600;
    color: var(--color-text);
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    /* ================================= */
    /* FECHA                             */
    /* ================================= */

    .rv-visits-table tbody td:nth-child(1)::before{
        content:"📅 Fecha";
        display:inline-block;
        min-width:95px;

        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;
        color:var(--color-muted);

        margin-right:8px;
    }

    /* ================================= */
    /* VENDEDOR                          */
    /* ================================= */

    .rv-visits-table tbody td:nth-child(2)::before{
        content:"👤 Vendedor";
        display:inline-block;
        min-width:95px;

        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;
        color:var(--color-muted);

        margin-right:8px;
    }

    .rv-visits-table tbody td:nth-child(2) .rv-product-name{
        display:inline;
    }

    /* ================================= */
    /* ESTADO                            */
    /* ================================= */

    .rv-visits-table tbody td:nth-child(3)::before{
        content:"⚡ Estado";
        display:block;
        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;
        color:var(--color-muted);
        margin-top:10px;
        margin-bottom:6px;
    }

    .rv-visits-table .rv-badge{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        min-height:36px;
        padding:0 12px;
    }

}


/* ====================================== */
/* CUSTOMER INVOICES TABLE */
/* ====================================== */

.rv-invoices-table-scroll{
    max-height: 420px;
}

.rv-invoice-number{
    font-weight: 700;
    color: var(--color-text);
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    /* FACTURA */

    .rv-invoices-table tbody td:nth-child(1)::before{
        content:"🧾 Factura";
        display:inline-block;
        min-width:95px;

        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;
        color:var(--color-muted);

        margin-right:8px;
    }

    /* FECHA */

    .rv-invoices-table tbody td:nth-child(2)::before{
        content:"📅 Fecha";
        display:inline-block;
        min-width:95px;

        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;
        color:var(--color-muted);

        margin-right:8px;
    }

    /* TOTAL */

    .rv-invoices-table tbody td:nth-child(3)::before{
        content:"💰 Total";
        display:inline-block;
        min-width:95px;

        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;
        color:var(--color-muted);

        margin-right:8px;
    }

    /* ESTADO */

    .rv-invoices-table tbody td:nth-child(4)::before{
        content:"⚡ Estado";
        display:inline-block;
        min-width:95px;

        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;
        color:var(--color-muted);

        margin-right:8px;
    }

    /* ACCIÓN */

    .rv-invoices-table tbody td:nth-child(5){
        margin-top:14px;
    }

    .rv-invoices-table tbody td:nth-child(5) .rv-btn{
        width:100%;
        justify-content:center;
    }

    /* BADGES */

    .rv-invoices-table .rv-badge{
        display:inline-flex;
        align-items:center;
        min-height:36px;
    }

}


/* ====================================== */
/* RETURNS + CREDITS TABLES */
/* ====================================== */

.rv-returns-table-scroll,
.rv-credits-table-scroll{
    max-height: 320px;
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    /* ================================= */
    /* RETURNS                           */
    /* ================================= */

    .rv-returns-table tbody td:nth-child(1)::before{
        content:"📦 Producto";
    }

    .rv-returns-table tbody td:nth-child(2)::before{
        content:"📅 Fecha";
    }

    .rv-returns-table tbody td:nth-child(3)::before{
        content:"🔢 Cantidad";
    }

    .rv-returns-table tbody td:nth-child(4)::before{
        content:"💰 Total";
    }

    /* ================================= */
    /* CREDITS                           */
    /* ================================= */

    .rv-credits-table tbody td:nth-child(1)::before{
        content:"💰 Monto";
    }

    .rv-credits-table tbody td:nth-child(2)::before{
        content:"🔁 Return";
    }

    .rv-credits-table tbody td:nth-child(3)::before{
        content:"🧾 Factura";
    }

    .rv-credits-table tbody td:nth-child(4)::before{
        content:"📅 Fecha";
    }

    /* ================================= */
    /* SHARED MOBILE ENGINE              */
    /* ================================= */

    .rv-returns-table tbody td::before,
    .rv-credits-table tbody td::before{

        display:inline-block;
        min-width:95px;

        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;
        color:var(--color-muted);

        margin-right:8px;
    }

    /* ================================= */
    /* PRODUCT NAME INLINE               */
    /* ================================= */

    .rv-returns-table .rv-product-name{
        display:inline;
    }

    /* ================================= */
    /* ACTION BUTTONS                    */
    /* ================================= */

    .rv-returns-table tbody td:nth-child(5),
    .rv-credits-table tbody td:nth-child(5){
        margin-top:14px;
    }

    .rv-returns-table tbody td:nth-child(5) .rv-btn,
    .rv-credits-table tbody td:nth-child(5) .rv-btn{
        width:100%;
        justify-content:center;
    }

}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    /* ================================= */
    /* CLIENT NAME INLINE                */
    /* ================================= */

    .rv-customers-table .rv-product-name{
        display:inline;
    }

    .rv-customers-table .rv-product-name::before{
        content:"👤 Cliente";
        display:inline-block;
        min-width:95px;

        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;

        color:var(--color-muted);

        margin-right:8px;
    }

    /* ================================= */
    /* ADDRESS                           */
    /* ================================= */

    .rv-customers-table .rv-customer-address::before{
        content:"📍 Dirección";
        display:inline-block;
        min-width:95px;

        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;

        color:var(--color-muted);

        margin-right:8px;
    }

    /* ================================= */
    /* PHONE                             */
    /* ================================= */

    .rv-customers-table .rv-customer-phone::before{
        content:"📞 Teléfono";
        display:inline-block;
        min-width:95px;

        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;

        color:var(--color-muted);

        margin-right:8px;
    }

    /* ================================= */
    /* META SPACING                      */
    /* ================================= */

    .rv-customers-table .rv-product-meta{
        margin-top:8px;
    }

    /* ================================= */
    /* ACTIONS                           */
    /* ================================= */

    .rv-customers-table .rv-table-actions{
        display:flex;
        flex-direction:column;
        gap:10px;

        margin-top:18px;
    }

    /* ================================= */
    /* BUTTONS                           */
    /* ================================= */

    .rv-customers-table .rv-table-actions .rv-btn{
        width:100%;
        justify-content:center;
    }

}


/* ====================================== */
/* QR CAMERA */
/* ====================================== */

.rv-qr-reader{
    margin-top:16px;
    overflow:hidden;
    border-radius:16px;
    border:1px solid var(--color-border);
}

#reader{
    width:100%;
    background:#000;
    min-height:300px;
}

#reader video{
    border-radius:16px;
}


/* ====================================== */
/* DISCOUNTS ADMIN */
/* ====================================== */

.rv-discounts-table-scroll{
    max-height: 72vh;
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    /* CLIENTE */

    .rv-discounts-table tbody td:nth-child(1)::before{
        content:"👤 Cliente";
    }

    /* FACTURA */

    .rv-discounts-table tbody td:nth-child(2)::before{
        content:"🧾 Factura";
    }

    /* RETURN */

    .rv-discounts-table tbody td:nth-child(3)::before{
        content:"🔁 Return";
    }

    /* VENDEDOR */

    .rv-discounts-table tbody td:nth-child(4)::before{
        content:"👨‍💼 Vendedor";
    }

    /* DESCUENTO */

    .rv-discounts-table tbody td:nth-child(5)::before{
        content:"💰 Descuento";
    }

    /* FECHA */

    .rv-discounts-table tbody td:nth-child(6)::before{
        content:"📅 Fecha";
    }

    /* ================================= */
    /* LABEL ENGINE                      */
    /* ================================= */

    .rv-discounts-table tbody td::before{

        display:inline-block;
        min-width:105px;

        font-size:12px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.04em;

        color:var(--color-muted);

        margin-right:8px;
    }

    /* ================================= */
    /* ACTION BUTTON                     */
    /* ================================= */

    .rv-discounts-table tbody td:nth-child(7){
        margin-top:14px;
    }

    .rv-discounts-table tbody td:nth-child(7) .rv-btn{
        width:100%;
        justify-content:center;
    }

}


/* ====================================== */
/* OVERRIDES PANEL */
/* ====================================== */

.rv-override-panel{
    display:flex;
    flex-direction:column;
    gap:20px;
}

/* ====================================== */
/* HEADER */
/* ====================================== */

.rv-override-panel__top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
}

/* ====================================== */
/* FORM */
/* ====================================== */

.rv-override-form{
    display:flex;
    flex-direction:column;
    gap:14px;
}

/* ====================================== */
/* LIST */
/* ====================================== */

.rv-override-list{
    display:flex;
    flex-direction:column;
    gap:14px;
}

/* ====================================== */
/* ITEM */
/* ====================================== */

.rv-override-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;

    padding:18px;
}

/* ====================================== */
/* INFO */
/* ====================================== */

.rv-override-item__info{
    display:flex;
    flex-direction:column;
    gap:8px;
}

/* ====================================== */
/* TOKEN */
/* ====================================== */

.rv-override-code{

    font-size:26px;
    font-weight:800;
    letter-spacing:.08em;

    color:var(--color-primary);

    font-family:monospace;
}

/* ====================================== */
/* META */
/* ====================================== */

.rv-override-meta{
    display:flex;
    flex-wrap:wrap;
    gap:12px;

    font-size:14px;
    color:var(--color-muted);
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 768px){

    .rv-override-item{
        flex-direction:column;
        align-items:flex-start;
    }

    .rv-override-status{
        width:100%;
    }

    .rv-override-status .rv-badge{
        width:100%;
        justify-content:center;
    }

    .rv-override-code{
        font-size:22px;
    }

}


/* ====================================== */
/* OVERRIDE MODAL */
/* ====================================== */

.rv-override-modal{
    max-width:420px;
}

/* ====================================== */
/* INPUT */
/* ====================================== */

.rv-override-modal input{

    text-align:center;

    font-size:24px;
    font-weight:700;
    letter-spacing:.12em;

    text-transform:uppercase;

    font-family:monospace;
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width:768px){

    .rv-override-modal input{

        font-size:20px;

    }

}

/* ====================================== */
/* PRODUCT STOCK */
/* ====================================== */

.rv-product-stock{

    margin-top:6px;

    font-size:13px;
    font-weight:600;

    color:var(--color-muted);

}


/* ====================================================== */
/* 🚀 ADMIN INSIGHTS */
/* ====================================================== */

.rv-admin-insights{
    display:grid;

    grid-template-columns:
        repeat(auto-fit, minmax(320px, 1fr));

    gap:24px;

    margin-top:24px;
}

/* ====================================================== */
/* 💎 INSIGHT CARD */
/* ====================================================== */


/* ====================================================== */
/* 🎯 ICON */
/* ====================================================== */

.rv-insight-card__icon{
    width:58px;
    height:58px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:18px;

    background:var(--color-surface-hover);

    font-size:28px;

    flex-shrink:0;
}

/* ====================================================== */
/* 📦 CONTENT */
/* ====================================================== */

.rv-insight-card__content{
    flex:1;
    min-width:0;
}

/* ====================================================== */
/* 🏷 LABEL */
/* ====================================================== */

.rv-insight-card__label{
    font-size:14px;
    font-weight:700;

    text-transform:uppercase;
    letter-spacing:.04em;

    color:var(--color-muted);

    margin-bottom:10px;
}

/* ====================================================== */
/* 💰 VALUE */
/* ====================================================== */

.rv-insight-card__value{
    font-size:34px;
    font-weight:800;
    line-height:1.1;

    color:var(--color-text);

    word-break:break-word;
}

/* ====================================================== */
/* SMALL VALUE */
/* ====================================================== */

.rv-insight-card__value--sm{
    font-size:24px;
}

/* ====================================================== */
/* 📝 META */
/* ====================================================== */


/* ====================================================== */
/* 📱 MOBILE */
/* ====================================================== */

@media (max-width: 768px){

    .rv-admin-insights{
        grid-template-columns:1fr;
        gap:18px;
    }


    .rv-insight-card__icon{
        width:52px;
        height:52px;

        font-size:24px;
    }

    .rv-insight-card__value{
        font-size:28px;
    }

    .rv-insight-card__value--sm{
        font-size:20px;
    }

}


/* =======================================================
   🔁 GLOBAL RETURNS
======================================================= */

#returnTable .rv-return-row td {

    vertical-align: top;

    padding-top: 18px;
    padding-bottom: 18px;

}

#returnTable .rv-return-cell {

    min-width: 120px;

}

#returnTable .rv-return-cell--product {

    min-width: 340px;

}

#returnTable .rv-return-product {

    font-weight: 700;

    line-height: 1.45;

    color: var(--color-text-primary);

    max-width: 360px;

}

#returnTable .rv-table-primary {

    font-weight: 700;

    color: var(--color-text-primary);

}

#returnTable .rv-table-money {

    font-weight: 700;

    color: var(--color-primary);

    white-space: nowrap;

}

#returnTable .rv-return-row .rv-badge {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 46px;

}


/* =======================================================
   📱 MOBILE RETURNS TABLE
======================================================= */

@media (max-width: 768px) {

    #returnTable thead {

        display: none;

    }

    #returnTable,
    #returnTable tbody,
    #returnTable tr,
    #returnTable td {

        display: block;

        width: 100%;

    }

    /* ===================================================
       MOBILE CARD
    =================================================== */

    #returnTable .rv-return-row {

        padding: 14px;

        border-bottom: 1px solid var(--color-border);

    }

    #returnTable .rv-return-row td {

        border: none;

        padding: 6px 0;

    }

    /* ===================================================
       DEFAULT ROW LAYOUT
    =================================================== */

    #returnTable .rv-return-cell {

        display: flex;

        align-items: center;

        gap: 10px;

    }

    #returnTable .rv-return-cell::before {

        flex-shrink: 0;

        width: 95px;

        font-size: 11px;

        font-weight: 700;

        letter-spacing: .03em;

        text-transform: uppercase;

        color: var(--color-text-muted);

    }

    /* ===================================================
       PRODUCT SPECIAL LAYOUT
    =================================================== */

    #returnTable .rv-return-cell--product {

        display: block;

        margin-top: 6px;

        margin-bottom: 10px;

    }

    #returnTable .rv-return-cell--product::before {

        content: "📦 Producto";

        display: block;

        width: auto;

        margin-bottom: 6px;

    }

    /* ===================================================
       UNIQUE LABELS
    =================================================== */

    #returnTable .rv-return-cell--customer::before {

        content: "👤 Cliente";

    }

    #returnTable .rv-return-cell--quantity::before {

        content: "🔁 Return";

    }

    #returnTable .rv-return-cell--reason::before {

        content: "⚠ Motivo";

    }

    #returnTable .rv-return-cell--total::before {

        content: "💰 Total";

    }

    #returnTable .rv-return-cell--seller::before {

        content: "👨‍💼 Vendedor";

    }

    #returnTable .rv-return-cell--date::before {

        content: "📅 Fecha";

    }

    /* ===================================================
       PRODUCT
    =================================================== */

    #returnTable .rv-return-product {

        width: 100%;

        max-width: 100%;

        line-height: 1.45;

        font-size: 15px;

        word-break: break-word;

        font-weight: 700;

        color: var(--color-primary);

    }

    /* ===================================================
       MONEY
    =================================================== */

    #returnTable .rv-table-money {

        font-size: 16px;

        font-weight: 800;

        color: var(--color-primary);

    }

    /* ===================================================
       TEXT
    =================================================== */

    #returnTable .rv-table-primary,
    #returnTable .rv-return-seller,
    #returnTable .rv-return-date {

        line-height: 1.3;

        font-weight: 700;

    }

    /* ===================================================
       BADGES
    =================================================== */

    #returnTable .rv-badge {

        min-width: 42px;

        justify-content: center;

    }

}


/* =======================================================
   📊 WEEKLY SALES CARD
======================================================= */

.rv-insight-card--weekly {

    display: flex;

    align-items: flex-start;

    gap: 18px;

}


/* =======================================================
   📊 WEEKLY CONTENT
======================================================= */

.rv-insight-card--weekly .rv-insight-card__content {

    width: 100%;

}

/* =======================================================
   📊 WEEKLY BODY
======================================================= */

.rv-insight-card--weekly .rv-insight-weekly-today,
.rv-insight-card--weekly .rv-insight-weekly-list {

    margin-left: 4px;

}

/* =======================================================
   ✨ TODAY BLOCK
======================================================= */

.rv-insight-weekly-today {

    margin-top: 22px;

    margin-bottom: 22px;

}

.rv-insight-weekly-today__pill {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 18px;

    padding: 18px 20px;

    border-radius: 20px;

    background: linear-gradient(
        135deg,
        var(--color-accent-soft),
        rgba(255,255,255,.82)
    );

    border: 1px solid var(--color-accent-border);

    box-shadow:
        0 10px 24px rgba(0,0,0,.04);

    transition:
        transform .2s ease,
        box-shadow .2s ease;

}

.rv-insight-weekly-today__pill:hover {

    transform: translateY(-2px);

    box-shadow:
        0 16px 30px rgba(0,0,0,.06);

}

/* =======================================================
   🏷️ TODAY TAG
======================================================= */

.rv-insight-weekly-today__tag {

    display: flex;

    flex-direction: column;

    gap: 2px;

    font-size: 13px;

    font-weight: 800;

    letter-spacing: .05em;

    text-transform: uppercase;

    color: var(--color-accent);

    line-height: 1.2;

}

/* =======================================================
   💰 TODAY AMOUNT
======================================================= */

.rv-insight-weekly-today__amount {

    font-size: 20px;

    font-weight: 900;

    line-height: 1;

    letter-spacing: -.03em;

    color: var(--color-accent);

}

/* =======================================================
   📅 WEEKLY LIST
======================================================= */

.rv-insight-weekly-list {

    display: flex;

    flex-direction: column;

    gap: 12px;

    margin-top: auto;

}

/* =======================================================
   📅 WEEK ROW
======================================================= */

.rv-insight-weekly-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 14px;

    padding: 14px 16px;

    border-radius: 18px;

    border: 1px solid var(--color-border);

    background: rgba(255,255,255,.58);

    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;

}

.rv-insight-weekly-row:hover {

    transform: translateY(-2px);

    border-color: var(--color-accent-border);

    box-shadow:
        0 10px 22px rgba(0,0,0,.05);

}

/* =======================================================
   📆 DAY
======================================================= */

.rv-insight-weekly-day {

    font-size: 15px;

    font-weight: 800;

    letter-spacing: -.01em;

    color: var(--color-text-primary);

}

/* =======================================================
   💵 AMOUNT
======================================================= */

.rv-insight-weekly-amount {

    font-size: 16px;

    font-weight: 800;

    color: var(--color-text-primary);

}

/* =======================================================
   📱 MOBILE
======================================================= */

@media (max-width: 768px) {

    .rv-insight-weekly-today__pill {

        padding: 16px;

        border-radius: 18px;

    }

    .rv-insight-weekly-today__amount {

        font-size: 18px;

    }

    .rv-insight-weekly-row {

        padding: 12px 14px;

        border-radius: 16px;

    }

    .rv-insight-weekly-day {

        font-size: 14px;

    }

    .rv-insight-weekly-amount {

        font-size: 15px;

    }

}


/* =======================================================
   📦 TOP PRODUCTS CARD
======================================================= */

.rv-insight-products-card {

    display: flex;

    flex-direction: column;

}

.rv-insight-products-card__header {

    display: flex;

    align-items: center;

    gap: 16px;

    margin-bottom: 24px;

}

.rv-insight-products-card__subtitle {

    margin-top: 4px;

    font-size: 14px;

    color: var(--color-text-muted);

}

/* =======================================================
   📦 PRODUCTS LIST
======================================================= */

.rv-insight-products-list {

    display: flex;

    flex-direction: column;

    gap: 14px;

}

/* =======================================================
   📦 PRODUCT ROW
======================================================= */

.rv-insight-product-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 14px;

    padding: 14px 16px;

    border: 1px solid var(--color-border);

    border-radius: 14px;

    background: rgba(255,255,255,.55);

    transition: all .2s ease;

}

.rv-insight-product-row:hover {

    transform: translateY(-2px);

    border-color: var(--color-primary);

    box-shadow: 0 8px 20px rgba(0,0,0,.06);

}

/* =======================================================
   📦 PRODUCT INFO
======================================================= */

.rv-insight-product-info {

    flex: 1;

    min-width: 0;

}

.rv-insight-product-name {

    font-size: 14px;

    font-weight: 700;

    line-height: 1.45;

    color: var(--color-text-primary);

    word-break: break-word;

}

.rv-insight-product-sales {

    margin-top: 6px;

    font-size: 13px;

    font-weight: 600;

    color: var(--color-text-muted);

}

/* =======================================================
   📦 QTY BADGE
======================================================= */

.rv-insight-product-qty {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-width: 70px;

    padding: 10px 12px;

    border-radius: 14px;

    background: rgba(var(--color-primary-rgb), .08);

    color: var(--color-primary);

    font-size: 22px;

    font-weight: 800;

    line-height: 1;

}

.rv-insight-product-qty span {

    margin-top: 4px;

    font-size: 11px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .05em;

    opacity: .7;

}

/* =======================================================
   📱 MOBILE
======================================================= */

@media (max-width: 768px) {

    /* ==========================================
       HEADERS
    ========================================== */

    .rv-insight-products-card__header,
    .rv-insight-sales-card__header,
    .rv-insight-top-seller-card__header {

        align-items: flex-start;

        gap: 14px;

        margin-bottom: 18px;

    }

    /* ==========================================
       PRODUCT ROWS
    ========================================== */

    .rv-insight-product-row {

        display: inline-flex;

        align-items: center;

        justify-content: space-between;

        gap: 10px;

        width: auto;

        min-width: 100%;

        padding: 12px 14px;

        border-radius: 16px;

        box-sizing: border-box;

    }

    .rv-insight-products-list {

        align-items: stretch;

    }

    .rv-insight-product-info {

        flex: 1;

        min-width: 0;

    }

    .rv-insight-product-name {

        font-size: 13px;

        line-height: 1.4;

    }

    .rv-insight-product-sales {

        font-size: 12px;

    }

    /* ==========================================
       PRODUCT QTY
    ========================================== */

    .rv-insight-product-qty {

        min-width: 56px;

        padding: 8px 10px;

        border-radius: 12px;

        font-size: 18px;

    }

    .rv-insight-product-qty span {

        font-size: 10px;

    }

    /* ==========================================
       SALES ROWS
    ========================================== */

    .rv-insight-sales-row {

        padding: 12px 14px;

        border-radius: 16px;

    }

    .rv-insight-sales-name {

        font-size: 14px;

    }


    .rv-insight-sales-amount {

        font-size: 16px;

    }

    /* ==========================================
       TOP SELLER TOTAL
    ========================================== */

    .rv-insight-top-seller-total {

        padding: 14px 16px;

        border-radius: 16px;

    }

    .rv-insight-top-seller-total__amount {

        font-size: 24px;

    }

}


/* =======================================================
   📱 MOBILE VISUAL CONSISTENCY
======================================================= */

@media (max-width: 768px) {

    .rv-insight-sales-list {

        gap: 10px;

    }

    .rv-insight-sales-row {

        padding: 10px 12px;

        border-radius: 14px;

    }

    .rv-insight-sales-name {

        font-size: 13px;

    }

    .rv-insight-sales-amount {

        font-size: 15px;

    }

}


/* =======================================================
   📈 SALES INFO FLEX FIX
======================================================= */

.rv-insight-sales-info {

    flex: 1;

    min-width: 0;

}

.rv-insight-sales-name {

    word-break: break-word;

    line-height: 1.35;

}


/* =======================================================
   📈 SALES TODAY CARD
======================================================= */

.rv-insight-sales-card {

    display: flex;

    flex-direction: column;

}

/* =======================================================
   📈 HEADER
======================================================= */

.rv-insight-sales-card__header {

    display: flex;

    align-items: center;

    gap: 16px;

    margin-bottom: 24px;

}

.rv-insight-sales-card__subtitle {

    margin-top: 4px;

    font-size: 14px;

    color: var(--color-text-muted);

}

/* =======================================================
   📈 SALES LIST
======================================================= */

.rv-insight-sales-list {

    display: flex;

    flex-direction: column;

    gap: 14px;

}

/* =======================================================
   📈 SALES ROW
======================================================= */

.rv-insight-sales-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 14px;

    padding: 14px 16px;

    border: 1px solid var(--color-border);

    border-radius: 14px;

    background: rgba(255,255,255,.55);

    transition: all .2s ease;

}

.rv-insight-sales-row:hover {

    transform: translateY(-2px);

    border-color: var(--color-primary);

    box-shadow: 0 8px 20px rgba(0,0,0,.06);

}

/* =======================================================
   📈 INFO
======================================================= */

.rv-insight-sales-info {

    flex: 1;

    min-width: 0;

}

.rv-insight-sales-name {

    font-size: 15px;

    font-weight: 700;

    line-height: 1.4;

    color: var(--color-text-primary);

}


/* =======================================================
   📈 AMOUNT
======================================================= */

.rv-insight-sales-amount {

    font-size: 18px;

    font-weight: 800;

    color: var(--color-primary);

    white-space: nowrap;

}

/* =======================================================
   🏆 TOP SELLER CARD
======================================================= */

.rv-insight-top-seller-card {

    display: flex;

    flex-direction: column;

}

/* =======================================================
   🏆 HEADER
======================================================= */

.rv-insight-top-seller-card__header {

    display: flex;

    align-items: center;

    gap: 16px;

    margin-bottom: 26px;

}

.rv-insight-top-seller-card__subtitle {

    margin-top: 6px;

    font-size: 14px;

    color: var(--color-text-muted);

}

/* =======================================================
   🏆 TOTAL BOX
======================================================= */

.rv-insight-top-seller-total {

    padding: 18px;

    border-radius: 18px;

    background: linear-gradient(
        135deg,
        rgba(var(--color-primary-rgb), .08),
        rgba(255,255,255,.75)
    );

    border: 1px solid rgba(var(--color-primary-rgb), .12);

}

.rv-insight-top-seller-total__label {

    font-size: 13px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .05em;

    color: var(--color-text-muted);

}

.rv-insight-top-seller-total__amount {

    margin-top: 8px;

    font-size: 28px;

    font-weight: 900;

    line-height: 1;

    letter-spacing: -.03em;

    color: var(--color-primary);

}

/* =======================================================
   📱 MOBILE
======================================================= */

@media (max-width: 768px) {

    .rv-insight-sales-card__header,
    .rv-insight-top-seller-card__header {

        align-items: flex-start;

    }

    .rv-insight-sales-row {

        padding: 12px;

        gap: 12px;

    }

    .rv-insight-sales-name {

        font-size: 14px;

    }

    .rv-insight-sales-amount {

        font-size: 16px;

    }

    .rv-insight-top-seller-total {

        padding: 16px;

    }

    .rv-insight-top-seller-total__amount {

        font-size: 24px;

    }

}


/* =======================================================
   📊 DASHBOARD HERO
======================================================= */

.rv-admin-hero--dashboard {

    margin-bottom: 28px;

}


/* =======================================================
   📊 MONTHLY GRID
======================================================= */

.rv-admin-grid--monthly {

    align-items: stretch;

}

/* =======================================================
   📊 ENHANCED METRIC CARD
======================================================= */

.rv-metric-card--enhanced {

    display: flex;

    flex-direction: column;

    gap: 24px;

}

/* =======================================================
   📊 HEADER
======================================================= */

.rv-metric-card__header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 14px;

}

.rv-metric-card__header-left {

    display: flex;

    align-items: flex-start;

    gap: 14px;

}

.rv-metric-card__icon-wrap {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 52px;

    height: 52px;

    border-radius: 16px;

    background: rgba(var(--color-primary-rgb), .08);

    font-size: 24px;

}

.rv-metric-card__context {

    margin-top: 4px;

    font-size: 13px;

    line-height: 1.45;

    color: var(--color-text-muted);

}

.rv-metric-card__period {

    flex-shrink: 0;

    padding: 7px 12px;

    border-radius: 999px;

    background: var(--color-accent-soft);

    border: 1px solid var(--color-accent-border);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: .06em;

    text-transform: uppercase;

    color: var(--color-accent);

}

/* =======================================================
   💰 VALUE
======================================================= */

.rv-metric-card--enhanced .rv-metric-card__value {

    font-size: 48px;

    line-height: 1;

    font-weight: 900;

    letter-spacing: -.04em;

}

/* =======================================================
   📊 FOOTER
======================================================= */

.rv-metric-card__footer {

    margin-top: auto;

}

.rv-metric-card__footer-pill {

    display: inline-flex;

    align-items: center;

    padding: 10px 14px;

    border-radius: 14px;

    background: rgba(255,255,255,.55);

    border: 1px solid var(--color-border);

    font-size: 13px;

    line-height: 1.4;

    color: var(--color-text-muted);

}

/* =======================================================
   📱 MOBILE
======================================================= */

@media (max-width: 768px) {

    .rv-metric-card--enhanced {

        gap: 18px;

    }

    .rv-metric-card__header {

        flex-direction: column;

        gap: 16px;

    }

    .rv-metric-card__header-left {

        width: 100%;

    }

    .rv-metric-card__period {

        align-self: flex-start;

    }

    .rv-metric-card--enhanced .rv-metric-card__value {

        font-size: 38px;

    }

    .rv-metric-card__icon-wrap {

        width: 46px;

        height: 46px;

        border-radius: 14px;

        font-size: 22px;

    }

}


.rv-metric-card__period {

    text-transform: uppercase;

}


/* =======================================================
   📊 HISTORY LAYOUT
======================================================= */

.rv-history-layout {

    display: grid;

    grid-template-columns: 420px 1fr;

    gap: 24px;

    margin-top: 24px;

}

/* =======================================================
   📦 CARDS
======================================================= */

.rv-history-filter-card,
.rv-history-results-card {

    padding: 28px;

}

/* =======================================================
   🎛 HEADER
======================================================= */

.rv-history-card__header {

    display: flex;

    align-items: flex-start;

    gap: 16px;

    margin-bottom: 28px;

}

.rv-history-card__icon {

    font-size: 28px;

}

.rv-history-card__title {

    margin: 0;

    font-size: 24px;

    font-weight: 800;

    color: var(--color-text-primary);

}

.rv-history-card__subtitle {

    margin-top: 6px;

    font-size: 14px;

    color: var(--color-text-muted);

}

/* =======================================================
   🧾 FORM
======================================================= */

.rv-history-form {

    display: flex;

    flex-direction: column;

    gap: 18px;

}

.rv-history-field {

    display: flex;

    flex-direction: column;

    gap: 8px;

}

.rv-history-label {

    font-size: 13px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .04em;

    color: var(--color-text-muted);

}

.rv-history-submit {

    margin-top: 8px;

}

/* =======================================================
   📈 RESULT MAIN
======================================================= */

.rv-history-result-main {

    padding: 28px;

    border-radius: 22px;

    background: linear-gradient(
        135deg,
        rgba(var(--color-primary-rgb), .06),
        rgba(255,255,255,.85)
    );

    border: 1px solid var(--color-border);

}

.rv-history-result-label {

    font-size: 14px;

    font-weight: 800;

    letter-spacing: .05em;

    text-transform: uppercase;

    color: var(--color-text-muted);

}

.rv-history-result-value {

    margin-top: 12px;

    font-size: 54px;

    font-weight: 900;

    line-height: 1;

    letter-spacing: -.04em;

    color: var(--color-text-primary);

}

/* =======================================================
   📋 LIST
======================================================= */

.rv-history-list {

    display: flex;

    flex-direction: column;

    gap: 14px;

}

.rv-history-list-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 18px;

    padding: 18px;

    border-radius: 18px;

    border: 1px solid var(--color-border);

    background: rgba(255,255,255,.55);

}

.rv-history-row-title {

    font-size: 15px;

    font-weight: 700;

    line-height: 1.45;

    color: var(--color-text-primary);

}

.rv-history-row-subtitle {

    margin-top: 6px;

    font-size: 13px;

    color: var(--color-text-muted);

}

.rv-history-row-pill {

    display: flex;

    align-items: center;

    justify-content: center;

    min-width: 74px;

    padding: 12px 14px;

    border-radius: 14px;

    background: rgba(var(--color-primary-rgb), .08);

    color: var(--color-primary);

    font-size: 18px;

    font-weight: 800;

}

/* =======================================================
   📱 MOBILE
======================================================= */

@media (max-width: 992px) {

    .rv-history-layout {

        grid-template-columns: 1fr;

    }

}

@media (max-width: 768px) {

    .rv-history-filter-card,
    .rv-history-results-card {

        padding: 20px;

    }

    .rv-history-result-value {

        font-size: 40px;

    }

    .rv-history-list-row {

        padding: 14px;

        border-radius: 16px;

    }

}


/* stable*/

/* ======================================
   HISTORICAL DETAIL
====================================== */

.rv-history-detail{

    margin-top:22px;

    width:100%;
    grid-column:1/-1;

}

.rv-history-detail__header{

    display:flex;

    justify-content:space-between;

    align-items:flex-start;

    gap:18px;

    margin-bottom:18px;
}

.rv-history-detail__left{

    display:flex;

    align-items:flex-start;

    gap:14px;
}

.rv-history-detail__icon{

    font-size:28px;

    flex-shrink:0;
}

.rv-history-detail__title{

    margin:0;

    font-size:20px;

    font-weight:800;
}

.rv-history-detail__subtitle{

    margin-top:6px;

    color:var(--color-muted);

    font-size:14px;
}

.rv-history-detail__actions{

    margin-left:auto;

    flex-shrink:0;
}

/* ======================================
   TABLE DESKTOP
====================================== */

.rv-history-detail .rv-table-scroll{

    border:1px solid var(--color-border);

    border-radius:var(--radius);

    overflow:auto;
}

.rv-history-detail__table-inner{

    width:100%;

    border-collapse:collapse;
}

.rv-history-detail__table-inner th{

    text-align:left;

    padding:14px;

    border-bottom:1px solid var(--color-border);

    font-size:14px;
}

.rv-history-detail__table-inner td{

    padding:14px;

    border-bottom:1px solid var(--color-border);
}

.rv-history-detail__table-inner tbody tr:last-child td{

    border-bottom:none;
}

/* ======================================
   MOBILE
====================================== */

@media (max-width:768px){

    .rv-history-detail{

        padding:16px;
    }

    .rv-history-detail__header{

        flex-direction:column;

        align-items:stretch;
    }

    .rv-history-detail__actions{

        margin-left:0;

        width:100%;
    }

    .rv-history-detail__actions .rv-btn{

        width:100%;
    }

    .rv-history-detail .rv-table-scroll{

        max-height:calc(100dvh - 240px);

        overflow-y:auto;

        overflow-x:hidden;
    }

    /* HIDE TABLE HEAD */

    .rv-history-detail__table-inner thead{

        display:none;
    }

    /* CARD MODE */

    .rv-history-detail__table-inner,
    .rv-history-detail__table-inner tbody,
    .rv-history-detail__table-inner tr,
    .rv-history-detail__table-inner td{

        display:block;
    }

    .rv-history-detail__table-inner tbody tr{

        padding:18px 14px;

        border-bottom:1px solid var(--color-border);
    }

    .rv-history-detail__table-inner tbody tr:last-child{

        border-bottom:none;
    }

    .rv-history-detail__table-inner tbody td{

        padding:0;

        border:none;
    }

    /* invoice */

    .rv-history-detail__table-inner tbody td:nth-child(1){

        margin-bottom:10px;
    }

    .rv-history-detail__table-inner tbody td:nth-child(1)
    .rv-product-name{

        font-size:30px;

        font-weight:900;
    }

    /* labels */

    .rv-history-detail__table-inner tbody td:nth-child(2)::before{

        content:"📅 Fecha";
    }

    .rv-history-detail__table-inner tbody td:nth-child(3)::before{

        content:"🏪 Cliente";
    }

    .rv-history-detail__table-inner tbody td:nth-child(4)::before{

        content:"🧑‍💼 Vendedor";
    }

    .rv-history-detail__table-inner tbody td:nth-child(5)::before{

        content:"💰 Total";
    }

    .rv-history-detail__table-inner tbody td:nth-child(n+2){

        display:flex;

        align-items:baseline;

        gap:8px;

        margin-top:12px;
    }

    .rv-history-detail__table-inner tbody td:nth-child(n+2)::before{

        flex-shrink:0;

        font-size:12px;

        font-weight:700;

        color:var(--color-muted);

        min-width:85px;
    }

    .rv-history-detail__table-inner tbody td:nth-child(5){

        margin-top:14px;
    }

    .rv-history-detail__table-inner tbody td:nth-child(5)
    .rv-price{

        font-size:26px;

        font-weight:900;
    }

}


/* ==========================================
   🛒 ORDER ITEM ACTIONS
========================================== */

.rv-order-item-actions {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: .75rem;

}

.rv-order-item-price {

    color: var(--rv-primary);

    font-weight: 700;

    white-space: nowrap;

    min-width: 80px;

    text-align: right;

}

.qty-input {

    text-align: center;

    padding: 0;

    height: 32px;

    line-height: 32px;

}

/* ======================================
   RECEIVABLES
====================================== */

.rv-receivable-layout{
    max-width: 1100px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rv-receivable-summary{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.rv-receivable-stat{
    padding: 14px;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.rv-receivable-stat__label{
    font-size: 13px;
    color: var(--color-muted);
    margin-bottom: 6px;
}

.rv-receivable-stat__value{
    font-weight: 800;
    font-size: 18px;
}

.rv-receivable-balance{
    color: var(--color-primary);
}


.rv-receivable-empty{
    padding: 16px;
    text-align: center;
    color: var(--color-muted);
}

/* ======================================
   RECEIVABLE TABLE
====================================== */

.rv-receivable-table td a{
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.rv-receivable-table td a:hover{
    text-decoration: underline;
}

/* ======================================
   TEXTAREA
====================================== */

.rv-form-group textarea{
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}

.rv-form-group textarea:focus{
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-soft);
}

/* ======================================
   MOBILE
====================================== */
@media (max-width: 768px){

    /* RESUMEN */

    .rv-receivable-summary{
        grid-template-columns: 1fr;
    }

    /* TABLA → CARDS */

    .rv-receivable-table thead{
        display:none;
    }

    .rv-receivable-table tbody tr{
        display:block;
        padding:14px;
        border-bottom:1px solid var(--color-border);
    }

    .rv-receivable-table tbody td{

        display:flex;
        align-items:center;
        gap:10px;

        padding:0;
        border:none;
    }

    .rv-receivable-table tbody td + td{
        margin-top:12px;
    }

    .rv-receivable-table tbody td::before{

        flex-shrink:0;
        min-width:100px;

        font-size:12px;
        font-weight:700;

        color:var(--color-muted);
    }

    /* FECHA */
    .rv-receivable-table tbody td:nth-child(1)::before{
        content:"📅 Fecha";
    }

    /* MONTO */
    .rv-receivable-table tbody td:nth-child(2)::before{
        content:"💰 Monto";
    }


    .rv-receivable-table tbody td:nth-child(3)::before{
        content:"💳 Método";
    }

    /* USUARIO */
    .rv-receivable-table tbody td:nth-child(4)::before{
        content:"👤 Usuario";
    }

    /* SOPORTE */
    .rv-receivable-table tbody td:nth-child(5)::before{
        content:"📎 Soporte";
    }

}


.rv-modal--show{
    display: flex;
}

.rv-system-message-card{
    max-width: 460px;
    width: calc(100% - 32px);
}

.rv-system-message-list{
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}


/* ======================================
   CASH MODULE
====================================== */

.rv-cash-layout{
    display:flex;
    flex-direction:column;
    gap:22px;
}


/* ======================================
   CASH HEADER
====================================== */

.rv-cash-page-header{
    display:grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        auto;

    align-items:center;
    gap:22px;

    padding:14px 16px;

    background:var(--color-surface);
    border:1px solid var(--color-border);
    border-radius:var(--radius);

    box-shadow:var(--shadow);
}


.rv-cash-page-header__identity{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}


.rv-cash-page-header__icon{
    width:42px;
    height:42px;

    display:flex;
    align-items:center;
    justify-content:center;

    flex-shrink:0;

    font-size:20px;

    background:var(--color-accent-soft);
    border-radius:10px;
}


.rv-cash-page-header__text{
    min-width:0;
}


.rv-cash-page-title{
    margin:0;

    font-size:18px;
    font-weight:700;
    line-height:1.2;
}


.rv-cash-page-meta{
    margin-top:3px;

    font-size:13px;
    color:var(--color-muted);
}


/* EXPECTED CASH BADGE */

.rv-cash-page-header__expected{
    display:flex;
    align-items:center;
    gap:10px;

    padding:8px 14px;

    background:var(--color-accent-soft);
    border:1px solid var(--color-border);
    border-radius:999px;

    white-space:nowrap;
}


.rv-cash-expected-badge__label{
    font-size:12px;
    color:var(--color-muted);
}


.rv-cash-expected-badge__value{
    font-size:18px;
    font-weight:800;
    color:var(--color-primary);
}


/* SWITCHER */

.rv-cash-page-header__switcher{
    display:inline-flex;
    align-items:center;

    padding:4px;

    border:1px solid var(--color-border);
    border-radius:9px;

    background:var(--color-surface-alt);

    flex-shrink:0;
}


.rv-cash-page-header__switcher .rv-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    text-decoration:none;
}


/* ======================================
   CASH CURRENT GRID
====================================== */

#cashCurrentPanel{
    display:grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap:22px;

    align-items:start;
}


/*
Current template groups:
- financial summary inside .rv-cash-metrics
- financial close inside .rv-cash-actions

These wrappers should not create
another visual grid level.
*/
.rv-cash-metrics,
.rv-cash-actions{
    display:contents;
}


/* SUMMARY FULL WIDTH */

.rv-cash-summary-card{
    grid-column:1 / -1;

    position:relative;
    overflow:hidden;

    padding:24px 26px 26px;

    border:1px solid var(--color-border);
    border-radius:18px;

    background:var(--color-surface);

    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.06);
}


/* Accent line */

.rv-cash-summary-card::before{
    content:"";

    position:absolute;
    top:0;
    left:0;
    right:0;

    height:4px;

    background:var(--color-primary);
}


/* Title */

.rv-cash-summary-card > .rv-section-title{
    margin-bottom:14px;

    font-size:18px;
    font-weight:800;
    letter-spacing:-0.01em;
}


/* SECOND ROW */

.rv-cash-closing,
.rv-cash-movements-card{
    width:100%;
    max-width:none;
}


.rv-cash-closing,
.rv-cash-movements-card{
    width:100%;
    max-width:none;
}

.rv-cash-movements-card{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.rv-cash-movements-card__header{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.rv-cash-movements-card__intro{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.rv-cash-movements-card__help{
    margin:0;
    font-size:13px;
    line-height:1.45;
    color:var(--color-muted);
}

.rv-cash-movements-card__cta{
    width:100%;
    min-height:48px;
    padding:14px 18px;
    font-size:15px;
    font-weight:700;

    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.rv-cash-movements-card .rv-table-scroll{
    margin-top:0;
}


/* SUMMARY ROWS */

.rv-summary-row{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:10px 0;

    border-bottom:1px solid var(--color-border);
}


.rv-summary-row:last-child{
    border-bottom:none;
}


/* ======================================
   FINANCIAL SUMMARY BREAKDOWN
====================================== */

.rv-financial-breakdown{
    border-bottom:1px solid var(--color-border);

    border-radius:10px;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast);
}


.rv-financial-breakdown:hover{
    background:var(--color-surface-alt);
}


.rv-financial-breakdown[open]{
    margin:6px 0;

    padding:0 12px 12px;

    border:1px solid var(--color-border);
    border-radius:14px;

    background:var(--color-surface-alt);
}


.rv-financial-breakdown__summary{
    min-height:56px;

    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:18px;

    padding:11px 10px;

    list-style:none;

    cursor:pointer;

    border-radius:10px;

    transition:
        background var(--transition-fast),
        color var(--transition-fast);
}

.rv-financial-breakdown__summary::-webkit-details-marker{
    display:none;
}


.rv-financial-breakdown__summary:hover{
    color:var(--color-primary);
    background:var(--color-surface-alt);
}


.rv-financial-breakdown[open]
.rv-financial-breakdown__summary{
    background:transparent;
}


.rv-financial-breakdown__label{
    min-width:0;

    display:flex;
    flex-direction:column;
    gap:2px;
}


.rv-financial-breakdown__label > span{
    font-weight:500;
}


.rv-financial-breakdown__label small{
    color:var(--color-muted);
    font-size:12px;
    font-weight:400;
}


.rv-financial-breakdown__right{
    display:flex;
    align-items:center;
    gap:16px;

    flex-shrink:0;
}


.rv-financial-breakdown__right > strong{
    white-space:nowrap;
}


.rv-financial-breakdown__chevron{
    width:24px;
    height:24px;

    display:flex;
    align-items:center;
    justify-content:center;

    flex-shrink:0;

    font-size:24px;
    font-weight:700;
    line-height:1;

    color:var(--color-text-light);

    transition:transform var(--transition-fast);
}


.rv-financial-breakdown[open]
.rv-financial-breakdown__chevron{
    transform:rotate(90deg);
}


.rv-financial-breakdown__content{
    margin:0 0 12px;

    padding:6px 14px 12px;

    border:1px solid var(--color-border);
    border-radius:var(--radius);

    background:var(--color-surface-alt);
}


.rv-financial-breakdown__item{
    min-height:42px;

    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:18px;

    padding:9px 0;

    border-bottom:1px solid var(--color-border);
}


.rv-financial-breakdown__item-info{
    min-width:0;

    display:flex;
    flex-direction:column;
    gap:3px;
}


.rv-financial-breakdown__item-info > strong{
    font-size:14px;
    font-weight:600;
}


.rv-financial-breakdown__item-info small{
    color:var(--color-muted);
    font-size:12px;
}


.rv-financial-breakdown__amount{
    flex-shrink:0;
    white-space:nowrap;
}


.rv-financial-breakdown__total{
    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:18px;

    padding-top:11px;

    font-weight:700;
}


.rv-financial-breakdown__empty{
    padding:14px 0;

    color:var(--color-muted);
    font-size:13px;
}

.rv-financial-summary-final{
    margin-top:18px;

    padding:14px 18px;

    border:1px solid var(--color-border);
    border-radius:14px;

    background:var(--color-surface-alt);
}


.rv-financial-summary-final .rv-summary-row{
    min-height:46px;

    padding:10px 0;
}


.rv-financial-summary-final .rv-summary-row:first-child{
    font-size:16px;
    font-weight:700;
}


.rv-financial-summary-final .rv-summary-row:nth-child(2){
    font-weight:700;
}


.rv-financial-summary-final .rv-summary-row strong{
    font-size:16px;
}


/* CLOSING */

.rv-cash-closing .rv-form{
    display:flex;
    flex-direction:column;
    gap:16px;
}


/* EXPENSE LEGACY */

.rv-expense-card{
    display:flex;
    flex-direction:column;
    gap:16px;
}


.rv-expense-card .rv-btn{
    width:100%;
}


/* ======================================
   CASH MOBILE
====================================== */

@media (max-width:768px){

    .rv-cash-page-header{
        grid-template-columns:1fr;
        align-items:stretch;
        gap:14px;
    }


    .rv-cash-page-header__expected{
        width:100%;
        justify-content:space-between;

        border-radius:var(--radius);
    }


    .rv-cash-page-header__switcher{
        width:100%;
    }


    .rv-cash-page-header__switcher .rv-btn{
        flex:1;
    }


    #cashCurrentPanel{
        grid-template-columns:1fr;
    }


    .rv-cash-summary-card{
        grid-column:auto;
    }

    .rv-financial-breakdown__summary{
        gap:10px;
    }


    .rv-financial-breakdown__right{
        gap:8px;
    }


    .rv-financial-breakdown__label small{
        font-size:11px;
    }


    .rv-financial-breakdown__content{
        padding:
            4px
            10px
            10px;
    }


    .rv-financial-breakdown__item{
        gap:10px;
    }


    .rv-financial-breakdown__item-info > strong{
        font-size:13px;
    }

    .rv-cash-movements-card__cta{
        width:100%;
    }

}

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

.rv-cash-dashboard{
    display:flex;
    flex-direction:column;
    gap:24px;
}

.rv-cash-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
}

/* ==========================================================
   BALANCE
========================================================== */

.rv-box-balance-card{
    text-align:center;
}

.rv-box-balance{
    margin-top:12px;
    font-size:40px;
    font-weight:700;
    color:var(--rv-primary);
    letter-spacing:1px;
}

/* ==========================================================
   HISTORY
========================================================== */

.rv-cash-positive{
    color:#16a34a;
    font-weight:600;
}

.rv-cash-negative{
    color:#dc2626;
    font-weight:600;
}

/* ==========================================================
   REQUESTS
========================================================== */

.rv-cash-request-list{
    display:flex;
    flex-direction:column;
    gap:16px;
}

.rv-cash-request-card{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:24px;

    padding:18px;

    border:1px solid var(--rv-border-color);

    border-radius:10px;

    background:var(--rv-surface);
}

.rv-cash-request-info{
    flex:1;

    display:flex;
    flex-direction:column;
    gap:10px;
}

.rv-cash-request-actions{
    display:flex;
    align-items:center;
    justify-content:center;
}

/* ==========================================================
   EMPTY STATE
========================================================== */

.rv-empty-state{
    padding:30px;

    text-align:center;

    color:var(--rv-text-muted);

    border:1px dashed var(--rv-border-color);

    border-radius:10px;
}

/* ==========================================================
   MODAL
========================================================== */


.rv-modal--hidden {
    display: none;
}


.rv-modal-card{

    width:100%;

    max-width:520px;

    display:flex;

    flex-direction:column;

    gap:18px;

    padding:24px;

    background:#fff;

    border-radius:12px;

    box-shadow:0 20px 50px rgba(0,0,0,.18);

}

.rv-modal-card h3{
    margin:0;
}

.rv-modal-actions{

    display:flex;

    justify-content:flex-end;

    gap:12px;

    margin-top:10px;

}

/* ==========================================================
   DAILY SALES REPORT MODAL
========================================================== */

#transferRequestModal .rv-modal-card{

    overflow:hidden;

}


#transferRequestModal.rv-modal--daily-report
.rv-modal-card{

    height:min(
        720px,
        calc(100vh - 48px)
    );

    max-height:calc(
        100vh - 48px
    );

}


/* ==========================================================
   DAILY SALES REPORT VIEW
========================================================== */

.rv-daily-sales-report-view{

    flex:1;

    min-height:0;

    display:flex;

    flex-direction:column;

    overflow:hidden;

}


.rv-daily-sales-report-view[hidden]{

    display:none !important;

}


/* ==========================================================
   DAILY SALES REPORT CONTENT
========================================================== */

.rv-daily-sales-report-content{

    flex:1;

    min-height:0;

    width:100%;

    margin:0;

    padding:16px;

    overflow-y:auto;

    overflow-x:auto;

    border:1px solid var(--color-border);

    border-radius:var(--radius);

    background:var(--color-surface-alt);

    color:var(--color-text);

    font-family:
        "Courier New",
        monospace;

    font-size:13px;

    line-height:1.45;

    white-space:pre;

    scrollbar-gutter:stable;

}


.rv-daily-sales-report-content[hidden]{

    display:none !important;

}


/* ==========================================================
   DAILY SALES REPORT STATES
========================================================== */

#dailySalesReportLoading[hidden],
#dailySalesReportError[hidden]{

    display:none !important;

}


.rv-daily-sales-report-error{

    color:var(--color-danger);

}


/* ==========================================================
   DAILY SALES REPORT ACTIONS
========================================================== */

#transferRequestModal .rv-modal-actions{

    flex-shrink:0;

}


#transferRequestModal
.rv-modal-actions
[hidden]{

    display:none !important;

}


/* ==========================================================
   DAILY SALES REPORT SCROLLBAR
========================================================== */

.rv-daily-sales-report-content::-webkit-scrollbar{

    width:8px;

    height:8px;

}


.rv-daily-sales-report-content::-webkit-scrollbar-thumb{

    background:var(--color-border-strong);

    border-radius:999px;

}


.rv-daily-sales-report-content::-webkit-scrollbar-track{

    background:transparent;

}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width:768px){

    .rv-cash-request-card{

        flex-direction:column;

    }

    .rv-cash-request-actions{

        width:100%;

        justify-content:flex-end;

    }

    .rv-box-balance{

        font-size:32px;

    }

}


/* =======================================================
   ROUTE SELECTOR
======================================================= */

.rv-route-selector{

    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:12px;

}

.rv-route-option{

    display:flex;
    align-items:center;
    gap:12px;

    padding:14px 16px;

    border:1px solid var(--color-border);

    border-radius:var(--radius);

    cursor:pointer;

    transition:all .2s ease;

    background:var(--color-surface);

}

.rv-route-option:hover{

    border-color:var(--color-primary);

    background:rgba(59,130,246,.05);

}

.rv-route-option input[type="radio"]{

    width:18px;
    height:18px;

    cursor:pointer;

    flex-shrink:0;

}

.rv-route-option__label{

    font-weight:600;

    font-size:15px;

    flex:1;

}


.rv-return-price-old {
    text-decoration: line-through;
    font-size: 12px;
    color: var(--rv-text-muted);
}

.rv-return-price-presentation {
    font-size: 13px;
    color: var(--rv-text-secondary);
    margin-top: 2px;
}

.rv-return-price-unit {
    margin-top: 6px;
    font-weight: 600;
    color: var(--rv-success);
}


.rv-return-presentation{

    margin-top:4px;

    font-size:.82rem;

    color:var(--rv-text-muted);

}


/* =========================================================
   🏭 RETURN TRANSFER DASHBOARD
========================================================= */


.rv-transfer-dashboard{

    display:grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap:1.5rem;

    align-items:start;

    width:100%;

}

.rv-transfer-column{

    display:flex;

    flex-direction:column;

    min-width:0;

}

/* =========================================================
   TRANSFER REQUEST TOOLS
========================================================= */

.rv-transfer-request-search{

    position:relative;

    margin-bottom:.75rem;

}


.rv-transfer-request-search__icon{

    position:absolute;

    top:50%;

    left:.875rem;

    transform:translateY(-50%);

    pointer-events:none;

}


.rv-transfer-request-search__input{

    width:100%;

    padding:.7rem .875rem .7rem 2.5rem;

    border:1px solid var(--color-border);

    border-radius:var(--radius);

    background:var(--color-surface);

    font:inherit;

}


.rv-transfer-request-search__input:focus{

    outline:none;

    border-color:var(--rv-primary,#2563eb);

    box-shadow:0 0 0 3px rgba(37,99,235,.10);

}


.rv-transfer-request-filters{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:.5rem;

    margin-bottom:1rem;

}


.rv-transfer-request-filter{

    padding:.5rem;

    border:1px solid var(--color-border);

    border-radius:var(--radius);

    background:var(--color-surface);

    color:#6b7280;

    font-weight:600;

    cursor:pointer;

}


.rv-transfer-request-filter:hover{

    border-color:var(--rv-primary,#2563eb);

    color:var(--rv-primary,#2563eb);

}


.rv-transfer-request-filter--active{

    border-color:var(--rv-primary,#2563eb);

    background:rgba(37,99,235,.08);

    color:var(--rv-primary,#2563eb);

}


/* =========================================================
   TRANSFER REQUEST SCROLL
========================================================= */

.rv-transfer-request-scroll{

    max-height:330px;

    overflow-y:auto;

    overflow-x:hidden;

    border:1px solid var(--color-border);

    border-radius:var(--radius);

    background:var(--color-surface);

}


.rv-transfer-request-list{

    display:flex;

    flex-direction:column;

    gap:.75rem;

    padding:.75rem;

}


.rv-transfer-request{

    display:block;

    min-height:94px;

    flex-shrink:0;

    text-decoration:none;

    color:inherit;

    border:1px solid var(--rv-border,#e5e7eb);

    border-radius:12px;

    padding:1rem;

    transition:.2s;

    background:#fff;

}


.rv-transfer-request:hover{

    border-color:var(--rv-primary,#2563eb);

    transform:translateY(-1px);

}


.rv-transfer-request--active{

    border:2px solid var(--rv-primary,#2563eb);

    box-shadow:0 0 0 3px rgba(37,99,235,.10);

}


.rv-transfer-request__header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:1rem;

    margin-bottom:.5rem;

}


.rv-transfer-request__seller{

    font-weight:700;

}


.rv-transfer-request__meta{

    font-size:.875rem;

    color:#6b7280;

    margin-top:.25rem;

}


/* =========================================================
   TRANSFER REQUEST PAGINATION
========================================================= */

.rv-transfer-request-pagination{

    display:flex;

    align-items:center;

    justify-content:center;

    gap:.75rem;

    margin-top:1rem;

}


.rv-transfer-request-pagination__button{

    display:flex;

    align-items:center;

    justify-content:center;

    width:34px;

    height:34px;

    border:1px solid var(--color-border);

    border-radius:var(--radius);

    background:var(--color-surface);

    cursor:pointer;

}


.rv-transfer-request-pagination__button:hover:not(:disabled){

    border-color:var(--rv-primary,#2563eb);

    color:var(--rv-primary,#2563eb);

}


.rv-transfer-request-pagination__button:disabled{

    cursor:not-allowed;

    opacity:.4;

}


.rv-transfer-request-pagination__info{

    color:#6b7280;

    font-size:.85rem;

    font-weight:600;

}

.rv-transfer-summary{

    display:grid;

    grid-template-columns:repeat(4,minmax(0,1fr));

    gap:.75rem;

    margin-bottom:1rem;

}


.rv-transfer-summary__item{

    display:flex;

    flex-direction:column;

    min-width:0;

    gap:.2rem;

}


.rv-transfer-summary__label{

    font-size:.68rem;

    line-height:1.2;

    text-transform:uppercase;

    letter-spacing:.04em;

    color:#6b7280;

}


.rv-transfer-summary__value{

    overflow:hidden;

    font-size:.9rem;

    font-weight:600;

    line-height:1.3;

    text-overflow:ellipsis;

    white-space:nowrap;

}


/* =========================================================
   SELECTED TRANSFER REQUEST
========================================================= */

.rv-transfer-column--detail .rv-card__header{

    padding-bottom:.5rem;

}


.rv-transfer-column--detail .rv-card__body{

    padding-top:.5rem;

}


.rv-transfer-column--detail .rv-table{

    margin-top:.25rem;

}


.rv-transfer-column--detail .rv-table th,
.rv-transfer-column--detail .rv-table td{

    padding:.65rem .75rem;

}

.rv-transfer-actions{

    display:flex;

    gap:1rem;

    margin-top:1.5rem;

}


.rv-transfer-actions form{

    margin:0;

}


.rv-transfer-history{

    margin-top:1.5rem;

    display:flex;

    flex-direction:column;

    gap:.75rem;

    padding-top:1rem;

    border-top:1px solid var(--rv-border,#e5e7eb);

}


.rv-empty-state{

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

    text-align:center;

    padding:2rem 1rem;

}


.rv-empty-state__icon{

    font-size:2rem;

    margin-bottom:.75rem;

}


.rv-empty-state__title{

    font-weight:700;

    margin-bottom:.35rem;

}


.rv-empty-state__text{

    color:#6b7280;

    max-width:320px;

    font-size:.9rem;

}


/* =========================================================
   STATUS BADGES
========================================================= */

.rv-badge{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:.25rem .75rem;

    border-radius:999px;

    font-size:.75rem;

    font-weight:700;

}


.rv-badge--pending{

    background:#fef3c7;

    color:#92400e;

}


.rv-badge--approved{

    background:#dcfce7;

    color:#166534;

}


.rv-badge--rejected{

    background:#fee2e2;

    color:#991b1b;

}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width:1200px){

    .rv-transfer-dashboard{

        grid-template-columns:1fr;

    }

}


@media (max-width:700px){

    .rv-transfer-dashboard{

        gap:1rem;

    }


    /* ===============================================
       SELECTED REQUEST CARD
    =============================================== */

    .rv-transfer-column--detail .rv-card__header{

        padding:1rem 1rem .5rem;

    }


    .rv-transfer-column--detail .rv-card__body{

        padding: .5rem 1rem 1rem;

    }


    .rv-transfer-column--detail .rv-card__title{

        font-size:1.35rem;

        line-height:1.2;

    }


    /* ===============================================
       REQUEST SUMMARY
    =============================================== */

    .rv-transfer-summary{

        grid-template-columns:repeat(2,minmax(0,1fr));

        gap:.75rem 1rem;

        margin-bottom:1rem;

    }


    .rv-transfer-summary__label{

        font-size:.65rem;

    }


    .rv-transfer-summary__value{

        font-size:.85rem;

        white-space:normal;

    }


    /* ===============================================
       PRODUCTS TABLE
    =============================================== */

    .rv-transfer-column--detail .rv-table{

        display:block;

        width:100%;

        margin:0;

    }


    .rv-transfer-column--detail .rv-table thead{

        display:block;

    }


    .rv-transfer-column--detail .rv-table tbody{

        display:block;

    }


    .rv-transfer-column--detail .rv-table tr{

        display:grid;

        grid-template-columns:minmax(0,1fr) 52px;

        align-items:center;

        width:100%;

        border-bottom:1px solid var(--color-border);

    }


    .rv-transfer-column--detail .rv-table th,
    .rv-transfer-column--detail .rv-table td{

        display:block;

        width:auto;

        padding:.7rem .75rem;

        border:0;

    }


    .rv-transfer-column--detail .rv-table th:last-child,
    .rv-transfer-column--detail .rv-table td:last-child{

        text-align:right;

    }


    .rv-transfer-column--detail .rv-table td:first-child{

        min-width:0;

        overflow-wrap:anywhere;

        font-size:.88rem;

        font-weight:600;

        line-height:1.35;

    }


    .rv-transfer-column--detail .rv-table td:last-child{

        font-size:.88rem;

        font-weight:700;

    }


    /* ===============================================
       PROCESSING HISTORY
    =============================================== */

    .rv-transfer-history{

        gap:.4rem;

        margin-top:1rem;

        padding-top:.75rem;

        font-size:.88rem;

    }

}


/* ====================================== */
/* DISCOUNTS SEARCH */
/* ====================================== */

.rv-discounts-toolbar{
    margin-bottom: 16px;
}

.rv-discounts-toolbar .rv-discounts-search{
    display: block;

    width: 100%;
    max-width: 420px;
    height: 44px;

    padding: 0 14px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    background: var(--color-surface);
    color: var(--color-text);

    font-family: inherit;
    font-size: 14px;

    outline: none;
    box-shadow: var(--shadow-xs);

    transition: var(--transition-fast);
}

.rv-discounts-toolbar .rv-discounts-search::placeholder{
    color: var(--color-muted);
}

.rv-discounts-toolbar .rv-discounts-search:hover{
    border-color: var(--color-border-strong);
}

.rv-discounts-toolbar .rv-discounts-search:focus{
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}


.rv-transfer-request__content{

    min-width: 0;

}


.rv-transfer-request__right{

    display: flex;

    flex-direction: column;

    align-items: flex-end;

    justify-content: flex-start;

    gap: 12px;

    flex-shrink: 0;

}


.rv-transfer-request__view{

    min-width: 64px;

    padding: 7px 14px;

}


/* ====================================================== */
/* SELLER INVENTORY — UNLOAD ALL BUTTON */
/* ====================================================== */

.unload-form .unload-all {

    width: auto;
    min-width: max-content;
    height: 38px;

    padding: 0 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    border: 1px solid #d6dce5;
    border-radius: 8px;

    background: #f8fafc;
    color: #334155;

    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;

    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}


.unload-form .unload-all:hover {

    background: #eef2f7;
    border-color: #b8c2cf;
    color: #0f172a;

    transform: translateY(-1px);

}


.unload-form .unload-all:active {

    transform: translateY(0);

}


.unload-form .unload-all:focus-visible {

    outline: none;

    box-shadow:
        0 0 0 3px rgba(71, 85, 105, 0.16);

}


/* =========================================================
   📍 ROUTES ADMINISTRATION
========================================================= */

.rv-routes-admin{
    display:flex;
    flex-direction:column;
    gap:22px;
    width:100%;
}


/* =========================================================
   PAGE HEADER
========================================================= */

.rv-routes-page-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:24px;

    padding:22px 24px;

    background:var(--color-surface);
    border:1px solid var(--color-border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
}

.rv-routes-page-header__info{
    min-width:0;
}

.rv-routes-page-eyebrow{
    margin-bottom:6px;

    color:var(--color-primary);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.rv-routes-page-title{
    margin:0;

    color:var(--color-text);
    font-size:30px;
    font-weight:800;
    line-height:1.15;
}

.rv-routes-page-subtitle{
    max-width:680px;
    margin:8px 0 0;

    color:var(--color-muted);
    font-size:14px;
    line-height:1.5;
}

.rv-routes-page-header__actions{
    flex-shrink:0;
}

.rv-route-create-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;

    font-weight:700;
    box-shadow:var(--shadow-sm);
    transition:var(--transition);
}

.rv-route-create-button:hover{
    background:var(--color-primary-hover);
    transform:translateY(-1px);
}


/* =========================================================
   STATUS FILTERS
========================================================= */

.rv-route-status-filters{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.rv-route-status-filter{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-width:90px;
    padding:9px 15px;

    border:1px solid var(--color-border);
    border-radius:999px;

    background:var(--color-surface);
    color:var(--color-muted);

    font-size:13px;
    font-weight:700;
    text-decoration:none;

    transition:var(--transition-fast);
}

.rv-route-status-filter:hover{
    border-color:var(--color-primary);
    color:var(--color-primary);
}

.rv-route-status-filter--active{
    border-color:var(--color-primary);
    background:var(--color-primary-soft);
    color:var(--color-primary);
}


/* =========================================================
   ROUTE CARD
========================================================= */

.rv-route-card{
    min-width:0;
    overflow:hidden;

    transition:var(--transition);
}

.rv-route-card:hover{
    transform:translateY(-2px);
    box-shadow:var(--shadow-lg);
}

.rv-route-card:target{
    border-color:var(--color-primary);
    box-shadow:
        0 0 0 3px var(--color-primary-soft),
        var(--shadow-lg);
}

.rv-route-card--inactive{
    opacity:.78;
    border-style:dashed;
}

.rv-route-title-row{
    display:flex;
    align-items:center;
    gap:9px;
    flex-wrap:wrap;
}

.rv-route-code{
    display:inline-flex;
    align-items:center;

    padding:4px 8px;

    border:1px solid var(--color-border);
    border-radius:999px;

    background:var(--color-surface-alt);
    color:var(--color-text-light);

    font-size:11px;
    font-weight:800;
    letter-spacing:.05em;
}

.rv-route-header__right{
    display:flex;
    align-items:flex-end;
    flex-direction:column;
    gap:7px;
}

.rv-route-badge--inactive{
    background:var(--color-surface-alt);
    color:var(--color-muted);
}


/* =========================================================
   ROUTE METADATA
========================================================= */

.rv-route-meta-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;

    margin-bottom:15px;
}

.rv-route-meta-item{
    display:flex;
    flex-direction:column;
    gap:5px;

    min-width:0;
    padding:11px 12px;

    border:1px solid var(--color-border);
    border-radius:var(--radius-sm);

    background:var(--color-surface-alt);
}

.rv-route-meta-label{
    color:var(--color-muted);
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.rv-route-meta-value{
    overflow-wrap:anywhere;

    color:var(--color-text);
    font-size:13px;
    font-weight:650;
    line-height:1.35;
}

.rv-route-availability--available{
    color:var(--color-success);
}

.rv-route-availability--waiting{
    color:var(--color-primary);
}


/* =========================================================
   ROUTE ACTIONS
========================================================= */

.rv-route-card-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;

    margin-bottom:14px;
}

.rv-route-card-actions .rv-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;

    font-weight:700;
}

.rv-route-card-actions .rv-btn:disabled{
    transform:none;
}


/* =========================================================
   CUSTOMER TABLE
========================================================= */

.rv-route-customers-scroll{
    max-height:340px;
}

.rv-routes-table{
    margin-top:0;
}

.rv-routes-table td:first-child{
    width:42%;
}

.rv-route-empty-customers{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:7px;

    min-height:180px;
    padding:24px 16px;

    text-align:center;
}

.rv-route-empty-icon{
    font-size:28px;
}

.rv-route-empty-title{
    color:var(--color-text);
    font-weight:800;
}

.rv-route-empty-text{
    max-width:340px;

    color:var(--color-muted);
    font-size:13px;
    line-height:1.45;
}

.rv-route-empty-customers .rv-btn{
    margin-top:6px;
}


/* =========================================================
   PAGE EMPTY STATE
========================================================= */

.rv-routes-empty-page{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;

    min-height:360px;

    text-align:center;
}

.rv-routes-empty-page__icon{
    font-size:42px;
}

.rv-routes-empty-page__title{
    color:var(--color-text);
    font-size:20px;
    font-weight:800;
}

.rv-routes-empty-page__text{
    max-width:440px;
    margin-bottom:8px;

    color:var(--color-muted);
    line-height:1.5;
}


/* =========================================================
   MODAL GENERAL
========================================================= */

body.rv-modal-open{
    overflow:hidden;
}

.rv-route-modal__content{
    width:calc(100% - 32px);
    max-width:680px;
    max-height:calc(100vh - 40px);

    padding:0;
    overflow-y:auto;

    text-align:left;
}

.rv-route-modal__content--customers{
    max-width:780px;
}

.rv-route-modal-header{
    position:sticky;
    top:0;
    z-index:5;

    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;

    padding:22px 24px 18px;

    border-bottom:1px solid var(--color-border);
    background:var(--color-surface);
}

.rv-route-modal-eyebrow{
    margin-bottom:4px;

    color:var(--color-primary);
    font-size:11px;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.rv-route-modal-title{
    margin:0;

    color:var(--color-text);
    font-size:22px;
    font-weight:800;
}

.rv-route-modal-subtitle{
    margin:6px 0 0;

    color:var(--color-muted);
    font-size:13px;
    line-height:1.45;
}

.rv-route-modal-close{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;

    width:36px;
    height:36px;

    padding:0;

    border:1px solid var(--color-border);
    border-radius:50%;

    background:var(--color-surface-alt);
    color:var(--color-text);

    font-size:25px;
    line-height:1;
    cursor:pointer;

    transition:var(--transition-fast);
}

.rv-route-modal-close:hover{
    border-color:var(--color-primary);
    background:var(--color-primary-soft);
    color:var(--color-primary);
}

.rv-route-modal-actions{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:10px;
}

.rv-route-modal-actions .rv-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-width:110px;
    font-weight:700;
}


/* =========================================================
   CREATE ROUTE FORM
========================================================= */

.rv-route-form{
    padding:22px 24px 24px;
}

.rv-route-form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
}

.rv-route-form-full{
    grid-column:1 / -1;
}

.rv-route-form-input{
    width:100%;
    min-width:0;
    height:44px;

    padding:0 12px;

    border:1px solid var(--color-border);
    border-radius:var(--radius-sm);

    background:var(--color-surface);
    color:var(--color-text);

    font:inherit;
    font-size:14px;
    text-align:left;

    outline:none;
    transition:var(--transition-fast);
}

.rv-route-form-input:focus{
    border-color:var(--color-primary);
    box-shadow:0 0 0 3px var(--color-primary-soft);
}

.rv-route-form-input::placeholder{
    color:var(--color-muted);
}

.rv-route-form-help{
    margin-top:3px;

    color:var(--color-muted);
    font-size:12px;
    line-height:1.4;
}

.rv-route-checkbox-row{
    position:relative;

    display:flex;
    align-items:flex-start;
    gap:11px;

    padding:14px;

    border:1px solid var(--color-border);
    border-radius:var(--radius);

    background:var(--color-surface-alt);
    cursor:pointer;
}

.rv-route-checkbox-row > input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.rv-route-checkbox-control{
    position:relative;

    width:21px;
    height:21px;
    flex-shrink:0;

    border:2px solid var(--color-border-strong);
    border-radius:6px;

    background:var(--color-surface);
    transition:var(--transition-fast);
}

.rv-route-checkbox-row > input:checked
+ .rv-route-checkbox-control{
    border-color:var(--color-primary);
    background:var(--color-primary);
}

.rv-route-checkbox-row > input:checked
+ .rv-route-checkbox-control::after{
    content:"✓";

    position:absolute;
    inset:0;

    display:flex;
    align-items:center;
    justify-content:center;

    color:white;
    font-size:13px;
    font-weight:900;
}

.rv-route-checkbox-row strong{
    display:block;

    color:var(--color-text);
    font-size:14px;
}

.rv-route-checkbox-row small{
    display:block;
    margin-top:3px;

    color:var(--color-muted);
    font-size:12px;
    line-height:1.35;
}

.rv-route-form .rv-route-modal-actions{
    margin-top:22px;
    padding-top:18px;

    border-top:1px solid var(--color-border);
}


/* =========================================================
   CUSTOMER CANDIDATE FILTERS
========================================================= */

.rv-route-candidate-tabs{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;

    padding:18px 24px 0;
}

.rv-route-candidate-tab{
    min-height:42px;
    padding:8px 12px;

    border:1px solid var(--color-border);
    border-radius:var(--radius-sm);

    background:var(--color-surface);
    color:var(--color-muted);

    font:inherit;
    font-size:13px;
    font-weight:800;
    cursor:pointer;

    transition:var(--transition-fast);
}

.rv-route-candidate-tab:hover{
    border-color:var(--color-primary);
    color:var(--color-primary);
}

.rv-route-candidate-tab--active{
    border-color:var(--color-primary);
    background:var(--color-primary-soft);
    color:var(--color-primary);
}

.rv-route-transfer-warning{
    margin:14px 24px 0;
    padding:11px 13px;

    border:1px solid var(--color-warning);
    border-radius:var(--radius-sm);

    background:var(--color-warning-soft);
    color:var(--color-text-light);

    font-size:13px;
    line-height:1.45;
}


/* =========================================================
   CUSTOMER SEARCH
========================================================= */

.rv-route-candidate-search{
    position:relative;

    margin:14px 24px;
}

.rv-route-candidate-search__icon{
    position:absolute;
    top:50%;
    left:13px;

    transform:translateY(-50%);
    pointer-events:none;
}

.rv-route-candidate-search__input{
    width:100%;
    height:44px;

    padding:0 14px 0 42px;

    border:1px solid var(--color-border);
    border-radius:var(--radius);

    background:var(--color-surface);
    color:var(--color-text);

    font:inherit;
    font-size:14px;
    outline:none;

    transition:var(--transition-fast);
}

.rv-route-candidate-search__input:focus{
    border-color:var(--color-primary);
    box-shadow:0 0 0 3px var(--color-primary-soft);
}


/* =========================================================
   CUSTOMER CANDIDATE LIST
========================================================= */

.rv-route-candidate-list{
    display:flex;
    flex-direction:column;
    gap:9px;

    max-height:390px;
    margin:0 24px;
    padding:2px 4px 2px 0;

    overflow-y:auto;
}

.rv-route-candidate-item{
    display:flex;
    align-items:flex-start;
    gap:12px;

    padding:13px 14px;

    border:1px solid var(--color-border);
    border-radius:var(--radius);

    background:var(--color-surface);
    cursor:pointer;

    transition:var(--transition-fast);
}

.rv-route-candidate-item:hover{
    border-color:var(--color-primary);
    background:var(--color-primary-soft);
}

.rv-route-candidate-item--selected{
    border-color:var(--color-primary);
    background:var(--color-primary-soft);
    box-shadow:0 0 0 1px var(--color-primary);
}

.rv-route-candidate-checkbox{
    width:19px;
    height:19px;
    margin-top:2px;

    accent-color:var(--color-primary);
    cursor:pointer;
    flex-shrink:0;
}

.rv-route-candidate-content{
    display:flex;
    flex-direction:column;
    gap:4px;

    min-width:0;
}

.rv-route-candidate-name{
    color:var(--color-text);
    font-size:14px;
    font-weight:800;
}

.rv-route-candidate-meta{
    color:var(--color-text-light);
    font-size:12px;
}

.rv-route-candidate-address{
    color:var(--color-muted);
    font-size:12px;
    line-height:1.4;
}

.rv-route-current-route{
    display:inline-flex;
    align-self:flex-start;

    margin-top:3px;
    padding:4px 8px;

    border-radius:999px;

    background:var(--color-warning-soft);
    color:var(--color-primary);

    font-size:11px;
    font-weight:800;
}

.rv-route-candidate-state{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;

    min-height:190px;
    margin:0 24px;

    color:var(--color-muted);
    text-align:center;
}

.rv-route-candidate-state--error{
    color:var(--color-danger);
}

.rv-route-loader{
    width:19px;
    height:19px;

    border:3px solid var(--color-border);
    border-top-color:var(--color-primary);
    border-radius:50%;

    animation:rvRouteSpin .7s linear infinite;
}

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


/* =========================================================
   CUSTOMER SELECTION FOOTER
========================================================= */

.rv-route-selection-footer{
    position:sticky;
    bottom:0;

    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;

    margin-top:18px;
    padding:17px 24px;

    border-top:1px solid var(--color-border);

    background:var(--color-surface);
    box-shadow:0 -6px 14px rgba(15,23,42,.05);
}

.rv-route-selection-count{
    color:var(--color-muted);
    font-size:13px;
}

.rv-route-selection-count strong{
    color:var(--color-primary);
    font-size:17px;
}


/* =========================================================
   SCROLLBAR
========================================================= */

.rv-route-candidate-list::-webkit-scrollbar,
.rv-route-modal__content::-webkit-scrollbar,
.rv-route-customers-scroll::-webkit-scrollbar{
    width:8px;
}

.rv-route-candidate-list::-webkit-scrollbar-thumb,
.rv-route-modal__content::-webkit-scrollbar-thumb,
.rv-route-customers-scroll::-webkit-scrollbar-thumb{
    background:var(--color-border-strong);
    border-radius:999px;
}

.rv-route-candidate-list::-webkit-scrollbar-track,
.rv-route-modal__content::-webkit-scrollbar-track,
.rv-route-customers-scroll::-webkit-scrollbar-track{
    background:transparent;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width:1100px){

    .rv-route-meta-grid{
        grid-template-columns:1fr;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width:768px){

    .rv-routes-admin{
        gap:16px;
    }

    .rv-routes-page-header{
        flex-direction:column;
        padding:18px;
    }

    .rv-routes-page-header__actions,
    .rv-route-create-button{
        width:100%;
    }

    .rv-routes-page-title{
        font-size:25px;
    }

    .rv-route-status-filters{
        display:grid;
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:6px;
    }

    .rv-route-status-filter{
        min-width:0;
        padding:9px 7px;
    }

    .rv-route-header__right{
        flex-direction:row;
        align-items:center;
        flex-wrap:wrap;
    }

    .rv-route-meta-grid{
        grid-template-columns:1fr;
    }

    .rv-route-card-actions,
    .rv-route-card-actions .rv-btn{
        width:100%;
    }

    /*
    Override de la transformación móvil genérica de .rv-table.
    Esta tabla tiene solamente Cliente y Dirección.
    */

    .rv-routes-table tbody tr{
        display:block;
        padding:14px;
    }

    .rv-routes-table tbody td{
        display:block;
        width:100%;
        padding:0;
        color:var(--color-text);
    }

    .rv-routes-table tbody td:nth-child(1){
        font-size:15px;
        font-weight:400;
    }

    .rv-routes-table tbody td:nth-child(2){
        display:block;
        margin-top:10px;
        color:var(--color-text-light);
        font-size:13px;
        font-weight:400;
    }

    .rv-routes-table tbody td:nth-child(2)::before{
        content:"📍 Dirección";
        display:block;

        margin-bottom:5px;

        color:var(--color-muted);
        font-size:11px;
        font-weight:800;
        text-transform:uppercase;
        letter-spacing:.04em;
    }

    .rv-route-modal__content{
        width:calc(100% - 20px);
        max-height:calc(100vh - 20px);
    }

    .rv-route-modal-header{
        padding:18px;
    }

    .rv-route-form{
        padding:18px;
    }

    .rv-route-form-grid{
        grid-template-columns:1fr;
    }

    .rv-route-form-full{
        grid-column:auto;
    }

    .rv-route-candidate-tabs{
        padding:15px 18px 0;
    }

    .rv-route-transfer-warning{
        margin:12px 18px 0;
    }

    .rv-route-candidate-search{
        margin:12px 18px;
    }

    .rv-route-candidate-list{
        max-height:330px;
        margin:0 18px;
    }

    .rv-route-selection-footer{
        flex-direction:column;
        align-items:stretch;

        padding:15px 18px;
    }

    .rv-route-selection-count{
        text-align:center;
    }

    .rv-route-selection-footer
    .rv-route-modal-actions{
        display:grid;
        grid-template-columns:1fr 1fr;
        width:100%;
    }

    .rv-route-selection-footer
    .rv-route-modal-actions
    .rv-btn{
        width:100%;
        min-width:0;
    }

    .rv-route-form
    .rv-route-modal-actions{
        display:grid;
        grid-template-columns:1fr 1fr;
    }

    .rv-route-form
    .rv-route-modal-actions
    .rv-btn{
        width:100%;
        min-width:0;
    }

}


/* =========================================================
   ROUTE CUSTOMER MODAL STATE VISIBILITY
========================================================= */

.rv-route-candidate-list[hidden],
.rv-route-candidate-state[hidden]{
    display:none !important;
}



/* =========================================================
   ROUTE CUSTOMER TABLE SCROLL + PAGINATION
========================================================= */

/*
Cada página contiene 10 registros.
La altura permite ver aproximadamente 5 filas,
y el resto se consulta mediante scroll.
*/

.rv-route-customers-scroll{
    max-height:350px;
    overflow:auto;
    scrollbar-gutter:stable;
}

.rv-route-customers-scroll .rv-table{
    margin-top:0;
}

.rv-route-customers-scroll .rv-table thead{
    position:sticky;
    top:0;
    z-index:4;
}

.rv-route-customers-scroll .rv-table thead th{
    background:var(--color-surface);
}


/* Ocultar correctamente filas paginadas */

.js-route-customer-row[hidden]{
    display:none !important;
}


/* =========================================================
   PAGINATION CONTAINER
========================================================= */

.rv-route-pagination{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:7px;
    flex-wrap:wrap;

    margin-top:12px;
    padding-top:12px;

    border-top:1px solid var(--color-border);
}

.rv-route-pagination[hidden]{
    display:none !important;
}


/* =========================================================
   PAGINATION SUMMARY
========================================================= */

.rv-route-pagination__summary{
    margin-right:auto;

    color:var(--color-muted);
    font-size:12px;
    font-weight:600;
}


/* =========================================================
   PAGE NUMBERS
========================================================= */

.rv-route-pagination__pages{
    display:flex;
    align-items:center;
    gap:5px;
    flex-wrap:wrap;
}

.rv-route-page-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-width:32px;
    height:32px;
    padding:0 8px;

    border:1px solid var(--color-border);
    border-radius:var(--radius-sm);

    background:var(--color-surface);
    color:var(--color-text-light);

    font:inherit;
    font-size:12px;
    font-weight:700;

    cursor:pointer;
    transition:var(--transition-fast);
}

.rv-route-page-button:hover:not(:disabled){
    border-color:var(--color-primary);
    background:var(--color-primary-soft);
    color:var(--color-primary);
}

.rv-route-page-button--active{
    border-color:var(--color-primary);
    background:var(--color-primary);
    color:white;
}

.rv-route-page-button:disabled{
    opacity:.45;
    cursor:not-allowed;
}

.rv-route-page-ellipsis{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-width:22px;
    height:32px;

    color:var(--color-muted);
    font-size:13px;
    font-weight:700;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width:768px){

    .rv-route-customers-scroll{
        max-height:430px;
    }

    .rv-route-pagination{
        justify-content:center;
    }

    .rv-route-pagination__summary{
        width:100%;
        margin-right:0;
        text-align:center;
    }

    .rv-route-pagination__pages{
        justify-content:center;
    }

}



/* =========================================================
   ROUTE CUSTOMER TABLE SEARCH
========================================================= */

.rv-route-table-search{
    position:relative;
    margin-bottom:12px;
}

.rv-route-table-search__icon{
    position:absolute;
    top:50%;
    left:13px;

    transform:translateY(-50%);

    font-size:14px;
    pointer-events:none;
}

.rv-route-table-search__input{
    width:100%;
    height:42px;

    padding:0 14px 0 40px;

    border:1px solid var(--color-border);
    border-radius:var(--radius);

    background:var(--color-surface);
    color:var(--color-text);

    font:inherit;
    font-size:13px;

    outline:none;
    transition:var(--transition-fast);
}

.rv-route-table-search__input::placeholder{
    color:var(--color-muted);
}

.rv-route-table-search__input:focus{
    border-color:var(--color-primary);
    box-shadow:0 0 0 3px var(--color-primary-soft);
}


/* =========================================================
   ROUTE CUSTOMER SEARCH EMPTY STATE
========================================================= */

.rv-route-table-no-results{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;

    min-height:170px;
    margin-top:12px;
    padding:24px;

    border:1px dashed var(--color-border);
    border-radius:var(--radius);

    background:var(--color-surface-alt);
    text-align:center;
}

.rv-route-table-no-results[hidden]{
    display:none !important;
}

.rv-route-table-no-results__icon{
    font-size:26px;
}

.rv-route-table-no-results__title{
    color:var(--color-text);
    font-size:14px;
    font-weight:800;
}

.rv-route-table-no-results__text{
    color:var(--color-muted);
    font-size:12px;
    line-height:1.4;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width:768px){

    .rv-route-table-search__input{
        height:44px;
        font-size:14px;
    }

    .rv-route-table-no-results{
        min-height:150px;
        padding:20px 16px;
    }

}


/* =========================================================
   ROUTES DASHBOARD — MOBILE
========================================================= */

@media (max-width: 768px) {

    /* -----------------------------------------------------
       PAGE AND CARDS
    ----------------------------------------------------- */

    .rv-routes-admin {
        width: 100%;
        min-width: 0;
    }

    .rv-routes-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .rv-route-card {
        width: 100%;
        min-width: 0;
        padding: 16px;
        overflow: hidden;
    }


    /* -----------------------------------------------------
       ROUTE HEADER
    ----------------------------------------------------- */

    .rv-route-header {
        align-items: flex-start;
        gap: 12px;
    }

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

    .rv-route-title-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .rv-route-title {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .rv-route-header__right {
        flex-shrink: 0;
    }

    .rv-route-seller {
        flex-wrap: wrap;
        overflow-wrap: anywhere;
    }


    /* -----------------------------------------------------
       ROUTE META
    ----------------------------------------------------- */

    .rv-route-meta-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .rv-route-meta-item {
        min-width: 0;
    }

    .rv-route-meta-value {
        overflow-wrap: anywhere;
    }


    /* -----------------------------------------------------
       ACTION BUTTONS
    ----------------------------------------------------- */

    .rv-route-card-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        width: 100%;
    }

    .rv-route-card-actions .rv-btn {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 10px 12px;
        white-space: normal;
        line-height: 1.2;
        text-align: center;
        overflow-wrap: anywhere;
    }


    /* -----------------------------------------------------
       CUSTOMER SEARCH
    ----------------------------------------------------- */

    .rv-route-table-search {
        width: 100%;
        min-width: 0;
    }

    .rv-route-table-search__input {
        width: 100%;
        min-width: 0;
    }


    /* -----------------------------------------------------
       CUSTOMER TABLE
    ----------------------------------------------------- */

    .rv-route-customers-scroll {
        width: 100%;
        min-width: 0;
    }

    .rv-routes-table {
        width: 100%;
        min-width: 0;
    }

    .rv-routes-table td {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: normal;
    }


    /* -----------------------------------------------------
       EMPTY ROUTE STATE
    ----------------------------------------------------- */

    .rv-route-empty-customers {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
        padding: 28px 16px;
        text-align: center;
    }

    .rv-route-empty-icon,
    .rv-route-empty-title,
    .rv-route-empty-text {
        width: 100%;
        max-width: 340px;
    }

    .rv-route-empty-title,
    .rv-route-empty-text {
        overflow-wrap: normal;
        word-break: normal;
    }

    .rv-route-empty-customers .rv-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        max-width: 100%;
        min-width: 220px;
        margin-top: 14px;
        padding: 10px 16px;
        white-space: normal;
        line-height: 1.25;
        text-align: center;
    }


    /* -----------------------------------------------------
       FILTERS
    ----------------------------------------------------- */

    .rv-route-status-filters {
        display: flex;
        width: 100%;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .rv-route-status-filter {
        flex: 0 0 auto;
    }

}


@media (max-width: 768px) {

    .rv-route-empty-customers {
        min-height: 260px;
    }

    .rv-route-empty-customers .js-open-customer-modal {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 100%;
        max-width: 260px;
        min-width: 0;

        margin: 16px auto 0;

        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }

    .rv-routes-table td[colspan="2"] {
        display: table-cell;
        width: 100%;
        padding: 0;
    }

}



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

.rv-prints {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* ==========================================================
   HEADER
========================================================== */

.rv-prints-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.rv-prints-header__status {
    flex-shrink: 0;
}

.rv-prints-alert {
    margin: 0;
}


/* ==========================================================
   MAIN LAYOUT
========================================================== */

.rv-prints-layout {
    display: grid;
    grid-template-columns:
        minmax(340px, 0.8fr)
        minmax(0, 1.4fr);

    gap: 22px;
    align-items: start;
}


/* ==========================================================
   CARD HEADER
========================================================== */

.rv-prints-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 16px;
    margin-bottom: 20px;
}


/* ==========================================================
   PRINTER CARD
========================================================== */

.rv-prints-printer-card {
    position: sticky;
    top: 20px;
}

.rv-printer-indicator {
    width: 14px;
    height: 14px;

    flex-shrink: 0;

    border-radius: 50%;
    background: var(--color-border-strong);

    box-shadow:
        0 0 0 5px
        var(--color-surface-alt);

    transition: var(--transition);
}

.rv-printer-indicator.is-available {
    background: var(--color-warning);
}

.rv-printer-indicator.is-connected {
    background: var(--color-success);

    box-shadow:
        0 0 0 5px
        var(--color-success-soft);
}


/* ==========================================================
   STATUS GRID
========================================================== */

.rv-printer-status-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
    margin-bottom: 20px;
}

.rv-printer-status-item {
    min-width: 0;

    padding: 14px;

    border: 1px solid
        var(--color-border);

    border-radius: var(--radius);

    background:
        var(--color-surface-alt);

    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rv-printer-status-label {
    font-size: 12px;
    font-weight: 700;

    color: var(--color-muted);

    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rv-printer-status-value {
    color: var(--color-text);

    font-size: 14px;
    overflow-wrap: anywhere;
}


/* ==========================================================
   PRINTER NAME
========================================================== */

.rv-prints-printer-name {
    margin-bottom: 20px;
}

.rv-prints-printer-name .rv-form-input {
    width: 100%;
    height: 44px;

    padding: 0 12px;

    border: 1px solid
        var(--color-border);

    border-radius: var(--radius-sm);

    background:
        var(--color-surface);

    color: var(--color-text);

    font-size: 14px;
    text-align: left;

    transition: var(--transition);
}

.rv-prints-printer-name
.rv-form-input:focus {
    outline: none;

    border-color:
        var(--color-primary);

    box-shadow:
        0 0 0 3px
        var(--color-primary-soft);
}

.rv-prints-printer-name small {
    display: block;
    margin-top: 6px;
}


/* ==========================================================
   ACTIONS
========================================================== */

.rv-printer-actions {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;
}

.rv-printer-actions .rv-btn {
    width: 100%;
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    font-weight: 600;

    transition: var(--transition);
}

.rv-printer-actions .rv-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}


/* ==========================================================
   BADGE DANGER
========================================================== */

.rv-badge--danger {
    background: var(--color-danger);
    color: white;
}


/* ==========================================================
   HISTORY
========================================================== */

.rv-prints-history-card {
    min-width: 0;
    overflow: hidden;
}

.rv-print-history {
    min-width: 0;
}

.rv-print-history-scroll {
    max-height: 560px;
    overflow: auto;
}

.rv-print-history-table {
    min-width: 760px;
}

.rv-print-date {
    font-weight: 700;
    white-space: nowrap;
}

.rv-print-error {
    color: var(--color-danger);
    font-weight: 700;
}

.rv-print-history-empty {
    min-height: 260px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    border: 1px dashed
        var(--color-border-strong);

    border-radius: var(--radius);

    background:
        var(--color-surface-alt);
}

.rv-print-history-empty p {
    margin: 0;
}

.rv-print-empty-icon {
    font-size: 36px;
}

.rv-print-empty-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-text);
}


/* ==========================================================
   TABLE SCROLLBAR
========================================================== */

.rv-print-history-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.rv-print-history-scroll::-webkit-scrollbar-thumb {
    background:
        var(--color-border-strong);

    border-radius: 999px;
}

.rv-print-history-scroll::-webkit-scrollbar-track {
    background: transparent;
}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1100px) {

    .rv-prints-layout {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .rv-prints-printer-card {
        position: static;
    }

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 768px) {

    .rv-prints {
        gap: 16px;
    }

    .rv-prints-header {
        flex-direction: column;
        align-items: stretch;
    }

    .rv-prints-header__status {
        align-self: flex-start;
    }

    .rv-prints-card-header {
        align-items: flex-start;
    }

    .rv-printer-status-grid {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .rv-printer-actions {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .rv-printer-actions .rv-btn {
        min-height: 46px;
    }

    .rv-print-history-scroll {
        max-height: none;
        overflow: visible;
        border: none;
    }

    .rv-print-history-table {
        min-width: 0;
        width: 100%;
    }

    .rv-print-history-table thead {
        display: none;
    }

    .rv-print-history-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .rv-print-history-table tbody tr {
        display: block;

        padding: 14px;

        border: 1px solid
            var(--color-border);

        border-radius: var(--radius);

        background:
            var(--color-surface);

        box-shadow:
            var(--shadow-xs);
    }

    .rv-print-history-table tbody td {
        display: block;

        padding: 7px 0;
        border: none;
    }

    .rv-print-history-table
    tbody td::before {
        display: block;

        margin-bottom: 4px;

        font-size: 11px;
        font-weight: 700;

        text-transform: uppercase;
        letter-spacing: 0.04em;

        color: var(--color-muted);
    }

    .rv-print-history-table
    tbody td:nth-child(1)::before {
        content: "Fecha";
    }

    .rv-print-history-table
    tbody td:nth-child(2)::before {
        content: "Tipo";
    }

    .rv-print-history-table
    tbody td:nth-child(3)::before {
        content: "Impresora";
    }

    .rv-print-history-table
    tbody td:nth-child(4)::before {
        content: "Estado";
    }

    .rv-print-history-table
    tbody td:nth-child(5)::before {
        content: "Detalle";
    }

}


/* ==========================================================
   PRINT JOB MODAL
========================================================== */

.rv-print-modal-card {
    max-width: 720px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    text-align: left;
}

.rv-print-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.rv-print-modal-header h3 {
    margin: 0;
}

.rv-print-modal-meta {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;
}

.rv-print-modal-meta__item {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 5px;

    padding: 12px;

    border: 1px solid
        var(--color-border);

    border-radius:
        var(--radius-sm);

    background:
        var(--color-surface-alt);
}

.rv-print-modal-meta__item span {
    font-size: 11px;
    font-weight: 700;

    color:
        var(--color-muted);

    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rv-print-modal-meta__item strong {
    overflow-wrap: anywhere;
}

.rv-print-modal-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rv-print-preview {
    width: 100%;
    max-height: 360px;
    overflow: auto;

    margin: 0;
    padding: 18px;

    border: 1px solid
        var(--color-border);

    border-radius:
        var(--radius);

    background: #111827;
    color: #F8FAFC;

    font-family:
        "Courier New",
        monospace;

    font-size: 14px;
    line-height: 1.45;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.rv-print-modal-error {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rv-print-modal-error[hidden] {
    display: none !important;
}

.rv-modal-actions .rv-btn {
    min-width: 120px;
}


/* ==========================================================
   PRINT HISTORY ACTION
========================================================== */

.rv-print-history-table
.js-view-print-job {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 768px) {

    .rv-print-modal-card {
        width: calc(100% - 24px);
        max-height: calc(100vh - 24px);
        padding: 18px;
    }

    .rv-print-modal-meta {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .rv-print-preview {
        max-height: 300px;
        padding: 14px;
        font-size: 13px;
    }

    .rv-print-history-table
    tbody td:nth-child(6)::before {
        content: "Acción";
    }

    .rv-print-history-table
    .js-view-print-job {
        width: 100%;
        min-height: 42px;
    }

}

@media (max-width: 480px) {

    .rv-print-modal-meta {
        grid-template-columns:
            minmax(0, 1fr);
    }

}


/* =========================================
   INVOICE DETAIL — INFORMATION-FIRST DESIGN
========================================= */

.rv-invoice-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rv-invoice-shell {
    max-width: none;
    padding: 0;
    overflow: hidden;
}


/* =========================================
   HERO
========================================= */

.rv-invoice-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 24px;
    background:
        linear-gradient(
            135deg,
            var(--color-surface) 0%,
            var(--color-primary-soft) 100%
        );
    border-bottom: 1px solid var(--color-border);
}

.rv-invoice-hero__identity {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.rv-invoice-hero__icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    font-size: 25px;
}

.rv-invoice-hero__eyebrow {
    margin-bottom: 4px;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rv-invoice-hero__title {
    margin: 0;
    color: var(--color-text);
    font-size: 28px;
    line-height: 1.15;
}

.rv-invoice-hero__date {
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 14px;
}

.rv-invoice-hero__status {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 10px;
}


/* =========================================
   CUSTOMER
========================================= */

.rv-invoice-customer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 24px;
    padding: 18px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface-alt);
}

.rv-invoice-customer__main {
    min-width: 0;
}

.rv-invoice-customer__name {
    margin-top: 3px;
    color: var(--color-text);
    font-size: 20px;
    font-weight: 800;
}

.rv-invoice-customer__address {
    margin-top: 6px;
    color: var(--color-text-light);
    line-height: 1.45;
}

.rv-invoice-customer__reference {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.rv-invoice-customer__reference span {
    color: var(--color-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.rv-invoice-customer__reference strong {
    color: var(--color-primary);
    font-size: 21px;
}


/* =========================================
   GENERAL SECTIONS
========================================= */

.rv-invoice-section,
.rv-invoice-financial {
    padding: 0 24px 24px;
}

.rv-invoice-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.rv-invoice-section__title {
    color: var(--color-text);
    font-size: 18px;
    font-weight: 800;
}

.rv-invoice-block-label {
    margin-bottom: 12px;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}


/* =========================================
   PRODUCTS
========================================= */

.rv-invoice-products {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.rv-invoice-products__table {
    margin-top: 0;
}

.rv-invoice-products__table thead th {
    background: var(--color-surface-alt);
}

.rv-invoice-products__table tbody tr:hover {
    background: var(--color-primary-soft);
}

.rv-invoice-product-name {
    color: var(--color-text);
    font-weight: 750;
}

.rv-invoice-cell--center {
    text-align: center !important;
}

.rv-invoice-cell--right {
    text-align: right !important;
}

.rv-invoice-quantity {
    display: inline-flex;
    min-width: 36px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    font-weight: 800;
}

.rv-invoice-old-price {
    color: var(--color-muted);
    font-size: 12px;
    text-decoration: line-through;
}

.rv-invoice-current-price {
    color: var(--color-text);
    font-weight: 700;
}


/* =========================================
   COMMERCIAL SUMMARY
========================================= */

.rv-invoice-summary {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(300px, 380px);
    gap: 24px;
    padding: 24px;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: #fafcff;
}

.rv-invoice-adjustments {
    min-width: 0;
}

.rv-invoice-adjustment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--color-border);
}

.rv-invoice-adjustment:last-child {
    border-bottom: none;
}

.rv-invoice-adjustment__identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.rv-invoice-adjustment__icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--color-danger-soft);
}

.rv-invoice-adjustment__amount {
    flex: 0 0 auto;
    color: var(--color-danger);
}

.rv-invoice-empty-note {
    padding: 16px;
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius);
    color: var(--color-muted);
    background: var(--color-surface);
    text-align: center;
}

.rv-invoice-totals-card {
    align-self: start;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.rv-invoice-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    color: var(--color-text-light);
    border-bottom: 1px solid var(--color-border);
}

.rv-invoice-total-row--deduction {
    color: var(--color-danger);
}

.rv-invoice-total-row--grand {
    margin-top: 6px;
    padding-top: 16px;
    border-bottom: none;
    color: var(--color-text);
    font-size: 21px;
    font-weight: 800;
}


/* =========================================
   FINANCIAL OVERVIEW
========================================= */

.rv-invoice-financial {
    padding-top: 24px;
}

.rv-invoice-credit-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.rv-invoice-metric {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 105px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface-alt);
}

.rv-invoice-metric--featured {
    background: var(--color-warning-soft);
    border-color: var(--color-warning);
}

.rv-invoice-metric__label {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.rv-invoice-metric__value {
    margin-top: auto;
    color: var(--color-text);
    font-size: 22px;
    font-weight: 850;
}

.rv-invoice-metric__value--text {
    font-size: 18px;
}


/* =========================================
   PAYMENT TIMELINE
========================================= */

.rv-invoice-payment-history {
    margin-bottom: 24px;
}

.rv-invoice-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rv-invoice-timeline::before {
    content: "";
    position: absolute;
    top: 22px;
    bottom: 22px;
    left: 18px;
    width: 2px;
    background: var(--color-border);
}

.rv-invoice-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
}

.rv-invoice-timeline-item__marker {
    position: relative;
    z-index: 1;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-success);
    color: white;
    border: 4px solid var(--color-surface);
    font-weight: 900;
}

.rv-invoice-timeline-item__content {
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
}

.rv-invoice-timeline-item__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.rv-invoice-timeline-item__amount {
    flex: 0 0 auto;
    color: var(--color-success);
    font-size: 18px;
}

.rv-invoice-timeline-item__method {
    margin-top: 8px;
    color: var(--color-text-light);
    font-size: 14px;
}


/* =========================================
   SUPPORTS
========================================= */

.rv-invoice-supports {
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.rv-invoice-supports__list {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rv-invoice-support {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface-alt);
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
}

.rv-invoice-support:hover {
    transform: translateY(-1px);
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    box-shadow: var(--shadow-sm);
}

.rv-invoice-supports__action {
    display: inline-flex;
    margin-top: 14px;
}


/* =========================================
   PAID / PENDING PANELS
========================================= */

.rv-invoice-paid-panel,
.rv-invoice-pending-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius);
}

.rv-invoice-paid-panel {
    background: var(--color-success-soft);
    border: 1px solid var(--color-success);
}

.rv-invoice-pending-panel {
    background: var(--color-warning-soft);
    border: 1px solid var(--color-warning);
}

.rv-invoice-paid-panel__icon,
.rv-invoice-pending-panel__icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-surface);
    font-size: 22px;
    font-weight: 900;
}

.rv-invoice-paid-panel__title {
    font-size: 18px;
    font-weight: 800;
}

.rv-invoice-paid-panel__amount {
    margin-left: auto;
    color: var(--color-success);
    font-size: 23px;
}


/* =========================================
   ACTIONS
========================================= */

.rv-invoice-actions-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}


/* =========================================
   TABLET + MOBILE
========================================= */

@media (max-width: 900px) {

    .rv-invoice-summary {
        grid-template-columns: 1fr;
    }

    .rv-invoice-credit-overview {
        grid-template-columns: 1fr;
    }

    .rv-invoice-supports__list {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 768px) {

    /* =========================================
       MOBILE PAGE
    ========================================= */

    .rv-invoice-page {
        width: 100%;
        max-width: 100%;
        gap: 14px;
        overflow: hidden;
    }

    .rv-invoice-shell {
        width: 100%;
        max-width: 100%;
        border-radius: var(--radius-sm);
        overflow: hidden;
    }


    /* =========================================
       MOBILE HERO
    ========================================= */

    .rv-invoice-hero {
        flex-direction: column;
        gap: 16px;
        padding: 18px 16px;
    }

    .rv-invoice-hero__identity {
        width: 100%;
        align-items: flex-start;
    }

    .rv-invoice-hero__icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        font-size: 21px;
    }

    .rv-invoice-hero__identity > div:last-child {
        min-width: 0;
    }

    .rv-invoice-hero__title {
        font-size: 23px;
        overflow-wrap: anywhere;
    }

    .rv-invoice-hero__date {
        line-height: 1.45;
    }

    .rv-invoice-hero__status {
        width: 100%;
        align-items: stretch;
    }

    .rv-invoice-hero__status .rv-btn,
    .rv-invoice-hero__status .rv-badge {
        width: 100%;
        text-align: center;
    }


    /* =========================================
       CUSTOMER MOBILE
    ========================================= */

    .rv-invoice-customer {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        margin: 16px;
        padding: 16px;
    }

    .rv-invoice-customer__main {
        width: 100%;
        min-width: 0;
    }

    .rv-invoice-customer__name {
        font-size: 19px;
    }

    .rv-invoice-customer__address {
        width: 100%;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.5;
    }

    .rv-invoice-customer__reference {
        width: 100%;
        align-items: flex-start;
        padding-top: 14px;
        border-top: 1px solid var(--color-border);
    }


    /* =========================================
       MOBILE SECTIONS
    ========================================= */

    .rv-invoice-section,
    .rv-invoice-financial {
        padding-left: 16px;
        padding-right: 16px;
    }

    .rv-invoice-section__header {
        align-items: flex-start;
    }

    .rv-invoice-section__header > .rv-badge {
        flex: 0 0 auto;
    }


    /* =========================================
       PRODUCT TABLE → MOBILE CARDS
    ========================================= */

    .rv-invoice-products {
        overflow: visible;
        border: none;
        background: transparent;
    }

    .rv-invoice-products__table {
        min-width: 0;
        width: 100%;
        margin: 0;
    }

    .rv-invoice-products__table thead {
        display: none;
    }

    .rv-invoice-products__table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .rv-invoice-products__table tbody tr {
        display: grid;
        grid-template-columns:
            minmax(0, 1fr)
            minmax(120px, auto);
        gap: 12px 16px;

        padding: 16px;

        border: 1px solid var(--color-border);
        border-radius: var(--radius);

        background: var(--color-surface);
        box-shadow: var(--shadow-xs);
    }

    .rv-invoice-products__table tbody tr:hover {
        background: var(--color-surface);
    }

    .rv-invoice-products__table tbody td {
        display: block;
        padding: 0;
        border: none;
        min-width: 0;
    }

    /* Producto */
    .rv-invoice-products__table tbody td:nth-child(1) {
        grid-column: 1 / -1;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--color-border);
    }

    /* Cantidad */
    .rv-invoice-products__table tbody td:nth-child(2) {
        grid-column: 1;
        text-align: left !important;
    }

    .rv-invoice-products__table tbody td:nth-child(2)::before {
        content: "Cantidad";
        display: block;
        margin-bottom: 6px;

        color: var(--color-muted);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    /* Precio */
    .rv-invoice-products__table tbody td:nth-child(3) {
        grid-column: 2;
        text-align: right !important;
    }

    .rv-invoice-products__table tbody td:nth-child(3)::before {
        content: "Precio unitario";
        display: block;
        margin-bottom: 6px;

        color: var(--color-muted);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    /* Subtotal */
    .rv-invoice-products__table tbody td:nth-child(4) {
        grid-column: 1 / -1;

        display: flex;
        align-items: center;
        justify-content: space-between;

        padding-top: 12px;
        border-top: 1px solid var(--color-border);

        text-align: right !important;
    }

    .rv-invoice-products__table tbody td:nth-child(4)::before {
        content: "Subtotal";

        color: var(--color-muted);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .rv-invoice-product-name {
        font-size: 16px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .rv-invoice-quantity {
        min-width: 38px;
    }


    /* =========================================
       ADJUSTMENTS + TOTALS
    ========================================= */

    .rv-invoice-summary {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px 16px;
    }

    .rv-invoice-adjustment {
        align-items: flex-start;
    }

    .rv-invoice-adjustment__identity {
        align-items: flex-start;
    }

    .rv-invoice-adjustment__amount {
        padding-top: 7px;
        white-space: nowrap;
    }

    .rv-invoice-totals-card {
        width: 100%;
    }


    /* =========================================
       FINANCIAL METRICS
    ========================================= */

    .rv-invoice-credit-overview {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .rv-invoice-metric {
        min-height: 90px;
    }

    .rv-invoice-metric__value {
        font-size: 20px;
        overflow-wrap: anywhere;
    }


    /* =========================================
       PAYMENT HISTORY
    ========================================= */

    .rv-invoice-timeline::before {
        left: 16px;
    }

    .rv-invoice-timeline-item {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
    }

    .rv-invoice-timeline-item__marker {
        width: 34px;
        height: 34px;
    }

    .rv-invoice-timeline-item__content {
        min-width: 0;
        padding: 13px;
    }

    .rv-invoice-timeline-item__header {
        flex-direction: column;
        gap: 8px;
    }

    .rv-invoice-timeline-item__amount {
        font-size: 17px;
    }


    /* =========================================
       SUPPORTS
    ========================================= */

    .rv-invoice-supports__list {
        grid-template-columns: 1fr;
    }

    .rv-invoice-support {
        min-width: 0;
    }

    .rv-invoice-support > div {
        min-width: 0;
    }

    .rv-invoice-support strong,
    .rv-invoice-support .rv-product-meta {
        overflow-wrap: anywhere;
    }

    .rv-invoice-supports__action {
        width: 100%;
        justify-content: center;
    }


    /* =========================================
       PAID / PENDING
    ========================================= */

    .rv-invoice-paid-panel,
    .rv-invoice-pending-panel {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .rv-invoice-paid-panel__amount {
        width: 100%;
        margin-left: 0;
        padding-top: 12px;
        border-top: 1px solid var(--color-border);
    }


    /* =========================================
       ACTIONS
    ========================================= */

    .rv-invoice-actions-heading {
        margin-bottom: 14px;
    }

    .rv-actions-card {
        padding: 16px;
    }

}

/* =========================================
   PRINT PRESERVATION
========================================= */

@media print {

    .rv-invoice-hero,
    .rv-invoice-customer,
    .rv-invoice-summary,
    .rv-invoice-financial {
        background: white !important;
    }

    .rv-invoice-timeline-item__content,
    .rv-invoice-metric,
    .rv-invoice-totals-card {
        box-shadow: none !important;
    }

}



/* =========================================
   CUSTOMER DETAIL — INFORMATION-FIRST UI
   Add this block at the end of core_clean.css
========================================= */

.rv-customer-detail {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    gap: 20px;
}

/* =========================================
   CUSTOMER PROFILE
========================================= */

.rv-customer-profile-card {
    padding: 0;
    overflow: hidden;
}

.rv-customer-profile-card .rv-customer-header {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(180px, 0.65fr));
    gap: 14px;
    align-items: stretch;
    padding: 24px;
    background:
        linear-gradient(
            135deg,
            var(--color-surface) 0%,
            var(--color-primary-soft) 100%
        );
}

.rv-customer-profile-card .rv-customer-header__info {
    min-width: 0;
    padding-right: 20px;
}

.rv-customer-profile-card .rv-page-title {
    margin: 0 0 4px;
    font-size: 30px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.rv-customer-profile-card .rv-customer-header__info > .rv-text-muted {
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.rv-customer-profile-card .rv-stack-sm {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.76);
}

.rv-customer-profile-card .rv-stack-sm > div {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-light);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.rv-customer-profile-card .rv-stack-sm > div:last-child {
    border-bottom: none;
}

.rv-customer-profile-card .rv-stack-sm strong {
    color: var(--color-muted);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rv-customer-profile-card .rv-customer-header__credit {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-xs);
}

.rv-customer-profile-card .rv-customer-header__credit .rv-text-muted {
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}

.rv-customer-profile-card .rv-credit {
    margin-top: auto;
    color: var(--color-primary);
    font-size: 23px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

/* =========================================
   ACTIONS
========================================= */

.rv-customer-actions-card {
    padding: 20px;
}

.rv-customer-actions-card .rv-card__header {
    margin-bottom: 14px;
    font-size: 18px;
    font-weight: 850;
}

.rv-customer-actions-card .rv-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    justify-content: stretch;
}

.rv-customer-actions-card .rv-actions > form {
    display: contents;
}

.rv-customer-actions-card .rv-actions .rv-btn {
    width: 100%;
    min-height: 50px;
    justify-content: center;
    white-space: normal;
    text-align: center;
}

/* =========================================
   HISTORY CARDS
========================================= */

.rv-customer-invoices-card,
.rv-customer-returns-card,
.rv-customer-visits-card {
    padding: 20px;
    overflow: hidden;
}

.rv-customer-invoices-card > .rv-card__header,
.rv-customer-visits-card > .rv-card__header,
.rv-customer-returns-card .rv-section-title {
    margin-bottom: 14px;
    color: var(--color-text);
    font-size: 18px;
    font-weight: 850;
}

.rv-customer-invoices-card .rv-table-scroll,
.rv-customer-returns-card .rv-table-scroll,
.rv-customer-visits-card .rv-table-scroll {
    margin-top: 0;
    border-radius: var(--radius);
}

.rv-customer-invoices-card .rv-table,
.rv-customer-returns-card .rv-table,
.rv-customer-visits-card .rv-table {
    margin-top: 0;
}

.rv-customer-invoices-card .rv-table tbody tr,
.rv-customer-returns-card .rv-table tbody tr,
.rv-customer-visits-card .rv-table tbody tr {
    transition: var(--transition-fast);
}

.rv-customer-invoices-card .rv-table tbody tr:hover,
.rv-customer-returns-card .rv-table tbody tr:hover,
.rv-customer-visits-card .rv-table tbody tr:hover {
    background: var(--color-primary-soft);
}

.rv-customer-returns-card .rv-split {
    gap: 22px;
}

.rv-customer-returns-card .rv-split > div {
    min-width: 0;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1100px) {

    .rv-customer-profile-card .rv-customer-header {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rv-customer-profile-card .rv-customer-header__info {
        grid-column: 1 / -1;
        padding-right: 0;
    }

    .rv-customer-actions-card .rv-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .rv-customer-detail {
        gap: 14px;
        overflow: hidden;
    }

    .rv-customer-profile-card,
    .rv-customer-actions-card,
    .rv-customer-invoices-card,
    .rv-customer-returns-card,
    .rv-customer-visits-card {
        width: 100%;
        max-width: 100%;
    }

    .rv-customer-profile-card .rv-customer-header {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 18px 16px;
    }

    .rv-customer-profile-card .rv-customer-header__info {
        grid-column: auto;
    }

    .rv-customer-profile-card .rv-page-title {
        font-size: 24px;
    }

    .rv-customer-profile-card .rv-stack-sm > div {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px;
    }

    .rv-customer-profile-card .rv-customer-header__credit {
        min-height: 88px;
        border-top: 1px solid var(--color-border);
        text-align: left;
    }

    .rv-customer-profile-card .rv-credit {
        font-size: 21px;
    }

    .rv-customer-actions-card,
    .rv-customer-invoices-card,
    .rv-customer-returns-card,
    .rv-customer-visits-card {
        padding: 16px;
    }

    .rv-customer-actions-card .rv-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .rv-customer-actions-card .rv-actions .rv-btn {
        min-height: 48px;
    }

    .rv-customer-invoices-card .rv-table-scroll,
    .rv-customer-returns-card .rv-table-scroll,
    .rv-customer-visits-card .rv-table-scroll {
        max-height: 520px;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 4px;
        border: none;
        background: transparent;
    }


    .rv-customer-invoices-card .rv-table-scroll::-webkit-scrollbar,
    .rv-customer-returns-card .rv-table-scroll::-webkit-scrollbar,
    .rv-customer-visits-card .rv-table-scroll::-webkit-scrollbar {
        width: 7px;
    }

    .rv-customer-invoices-card .rv-table-scroll::-webkit-scrollbar-thumb,
    .rv-customer-returns-card .rv-table-scroll::-webkit-scrollbar-thumb,
    .rv-customer-visits-card .rv-table-scroll::-webkit-scrollbar-thumb {
        background: var(--color-border-strong);
        border-radius: 999px;
    }

    .rv-customer-invoices-card .rv-table-scroll::-webkit-scrollbar-track,
    .rv-customer-returns-card .rv-table-scroll::-webkit-scrollbar-track,
    .rv-customer-visits-card .rv-table-scroll::-webkit-scrollbar-track {
        background: transparent;
    }


    .rv-customer-invoices-card .rv-table-scroll {
        max-height: 540px;
    }

    .rv-customer-returns-card .rv-table-scroll {
        max-height: 430px;
    }

    .rv-customer-visits-card .rv-table-scroll {
        max-height: 480px;
    }

    .rv-customer-invoices-card .rv-table thead,
    .rv-customer-returns-card .rv-table thead,
    .rv-customer-visits-card .rv-table thead {
        display: none;
    }

    .rv-customer-invoices-card .rv-table tbody,
    .rv-customer-returns-card .rv-table tbody,
    .rv-customer-visits-card .rv-table tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .rv-customer-invoices-card .rv-table tbody tr,
    .rv-customer-returns-card .rv-table tbody tr,
    .rv-customer-visits-card .rv-table tbody tr {
        display: block;
        padding: 14px;
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
        background: var(--color-surface);
        box-shadow: var(--shadow-xs);
    }

    .rv-customer-invoices-card .rv-table tbody td,
    .rv-customer-returns-card .rv-table tbody td,
    .rv-customer-visits-card .rv-table tbody td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 14px;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid var(--color-border);
        text-align: right;
        overflow-wrap: anywhere;
    }

    .rv-customer-invoices-card .rv-table tbody td:last-child,
    .rv-customer-returns-card .rv-table tbody td:last-child,
    .rv-customer-visits-card .rv-table tbody td:last-child {
        border-bottom: none;
    }

    .rv-customer-invoices-card .rv-table tbody td::before,
    .rv-customer-returns-card .rv-table tbody td::before,
    .rv-customer-visits-card .rv-table tbody td::before {
        flex: 0 0 102px;
        color: var(--color-muted);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-align: left;
        text-transform: uppercase;
    }

    .rv-customer-invoices-card .rv-table td:nth-child(1)::before {
        content: "Factura";
    }

    .rv-customer-invoices-card .rv-table td:nth-child(2)::before {
        content: "Fecha";
    }

    .rv-customer-invoices-card .rv-table td:nth-child(3)::before {
        content: "Total";
    }

    .rv-customer-invoices-card .rv-table td:nth-child(4)::before {
        content: "Estado";
    }

    .rv-customer-invoices-card .rv-table td:nth-child(5)::before {
        content: "Acción";
    }

    .rv-returns-table td:nth-child(1)::before {
        content: "Producto";
    }

    .rv-returns-table td:nth-child(2)::before {
        content: "Fecha";
    }

    .rv-returns-table td:nth-child(3)::before {
        content: "Cantidad";
    }

    .rv-returns-table td:nth-child(4)::before {
        content: "Total";
    }

    .rv-returns-table td:nth-child(5)::before {
        content: "Acción";
    }

    .rv-credits-table td:nth-child(1)::before {
        content: "Monto";
    }

    .rv-credits-table td:nth-child(2)::before {
        content: "Devolución";
    }

    .rv-credits-table td:nth-child(3)::before {
        content: "Factura";
    }

    .rv-credits-table td:nth-child(4)::before {
        content: "Fecha";
    }

    .rv-credits-table td:nth-child(5)::before {
        content: "Acción";
    }

    .rv-visits-table td:nth-child(1)::before {
        content: "Inicio";
    }

    .rv-visits-table td:nth-child(2)::before {
        content: "Vendedor";
    }

    .rv-visits-table td:nth-child(3)::before {
        content: "Estado";
    }

    .rv-customer-invoices-card .rv-empty-state,
    .rv-customer-returns-card .rv-empty-state,
    .rv-customer-visits-card .rv-empty-state {
        display: block !important;
        padding: 20px !important;
        border: none !important;
        text-align: center !important;
    }

    .rv-customer-invoices-card .rv-empty-state::before,
    .rv-customer-returns-card .rv-empty-state::before,
    .rv-customer-visits-card .rv-empty-state::before {
        content: none !important;
    }

    .rv-customer-invoices-card .rv-table td:last-child .rv-btn,
    .rv-customer-returns-card .rv-table td:last-child .rv-btn {
        width: auto;
        min-width: 76px;
    }

    .rv-customer-returns-card .rv-split {
        gap: 18px;
    }

}


/* =========================================
   ELECTRONIC INVOICE — COMING SOON
========================================= */

.rv-coming-soon-page {
    position: relative;

    width: 100%;
    min-height: calc(100vh - 40px);

    overflow: hidden;

    border-radius: 18px;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(245, 158, 11, 0.14),
            transparent 34%
        ),
        radial-gradient(
            circle at 90% 85%,
            rgba(180, 83, 9, 0.11),
            transparent 32%
        ),
        var(--color-bg);
}


/* =========================================
   PAGE LAYOUT
========================================= */

.rv-coming-soon {
    position: relative;
    isolation: isolate;

    min-height: calc(100vh - 40px);
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 48px 24px 28px;
    overflow: hidden;
}


/* =========================================
   AMBIENT BACKGROUND
========================================= */

.rv-coming-soon__ambient {
    position: absolute;
    inset: 0;
    z-index: -1;

    overflow: hidden;
    pointer-events: none;
}

.rv-coming-soon__orb {
    position: absolute;
    display: block;

    border-radius: 999px;
    filter: blur(2px);

    opacity: 0.7;
}

.rv-coming-soon__orb--one {
    top: -180px;
    right: -130px;

    width: 480px;
    height: 480px;

    background:
        radial-gradient(
            circle at 35% 35%,
            rgba(251, 191, 36, 0.34),
            rgba(245, 158, 11, 0.08) 50%,
            transparent 72%
        );

    animation:
        rv-coming-soon-float-one
        12s ease-in-out infinite;
}

.rv-coming-soon__orb--two {
    bottom: -210px;
    left: -170px;

    width: 520px;
    height: 520px;

    background:
        radial-gradient(
            circle at 58% 42%,
            rgba(180, 83, 9, 0.2),
            rgba(245, 158, 11, 0.06) 52%,
            transparent 74%
        );

    animation:
        rv-coming-soon-float-two
        14s ease-in-out infinite;
}

.rv-coming-soon__grid {
    position: absolute;
    inset: 0;

    opacity: 0.23;

    background-image:
        linear-gradient(
            rgba(148, 163, 184, 0.18) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(148, 163, 184, 0.18) 1px,
            transparent 1px
        );

    background-size: 42px 42px;

    mask-image:
        radial-gradient(
            circle at center,
            black 10%,
            transparent 76%
        );
}


/* =========================================
   MAIN CARD
========================================= */

.rv-coming-soon__card {
    position: relative;

    width: min(100%, 1080px);
    padding: 0;
    overflow: hidden;

    display: grid;
    grid-template-columns:
        minmax(300px, 0.82fr)
        minmax(0, 1.45fr);

    border:
        1px solid
        rgba(255, 255, 255, 0.78);

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.97),
            rgba(255, 255, 255, 0.9)
        );

    box-shadow:
        0 32px 80px rgba(15, 23, 42, 0.16),
        0 8px 24px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    animation:
        rv-coming-soon-enter
        0.65s cubic-bezier(0.2, 0.8, 0.2, 1)
        both;
}

.rv-coming-soon__card::before {
    content: "";

    position: absolute;
    inset: 0 0 auto 0;

    height: 4px;

    background:
        linear-gradient(
            90deg,
            var(--color-primary),
            var(--color-accent),
            var(--color-warning),
            var(--color-primary)
        );

    background-size: 220% 100%;

    animation:
        rv-coming-soon-shimmer
        5s linear infinite;
}


/* =========================================
   VISUAL PANEL
========================================= */

.rv-coming-soon__visual {
    position: relative;
    min-height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 52px 34px;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            var(--color-primary-hover),
            var(--color-primary) 56%,
            var(--color-accent)
        );
}

.rv-coming-soon__visual::before,
.rv-coming-soon__visual::after {
    content: "";

    position: absolute;
    border-radius: 999px;

    pointer-events: none;
}

.rv-coming-soon__visual::before {
    width: 320px;
    height: 320px;

    top: -145px;
    right: -115px;

    border:
        54px solid
        rgba(255, 255, 255, 0.09);
}

.rv-coming-soon__visual::after {
    width: 230px;
    height: 230px;

    bottom: -115px;
    left: -95px;

    background:
        rgba(255, 255, 255, 0.08);

    box-shadow:
        0 0 0 38px rgba(255, 255, 255, 0.035);
}


/* =========================================
   MAIN ICON
========================================= */

.rv-coming-soon__icon-shell {
    position: relative;
    z-index: 2;

    width: 168px;
    height: 168px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid
        rgba(255, 255, 255, 0.36);

    border-radius: 42px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.24),
            rgba(255, 255, 255, 0.1)
        );

    box-shadow:
        0 28px 50px rgba(74, 35, 4, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.34);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transform: rotate(-4deg);

    animation:
        rv-coming-soon-icon-float
        5s ease-in-out infinite;
}

.rv-coming-soon__icon-ring {
    position: absolute;
    inset: -20px;

    border:
        1px solid
        rgba(255, 255, 255, 0.2);

    border-radius: 52px;

    animation:
        rv-coming-soon-ring
        3.8s ease-in-out infinite;
}

.rv-coming-soon__icon {
    width: 76px;
    height: 76px;

    color: #ffffff;

    filter:
        drop-shadow(
            0 12px 15px
            rgba(74, 35, 4, 0.24)
        );
}


/* =========================================
   SIGNAL DECORATION
========================================= */

.rv-coming-soon__signal {
    position: absolute;
    z-index: 3;

    left: 50%;
    bottom: 34px;

    display: flex;
    align-items: flex-end;
    gap: 6px;

    transform: translateX(-50%);
}

.rv-coming-soon__signal span {
    width: 6px;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.76);

    animation:
        rv-coming-soon-signal
        1.3s ease-in-out infinite;
}

.rv-coming-soon__signal span:nth-child(1) {
    height: 10px;
}

.rv-coming-soon__signal span:nth-child(2) {
    height: 18px;
    animation-delay: 0.15s;
}

.rv-coming-soon__signal span:nth-child(3) {
    height: 26px;
    animation-delay: 0.3s;
}


/* =========================================
   CONTENT
========================================= */

.rv-coming-soon__content {
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 54px 56px 46px;
}

.rv-coming-soon__badge {
    width: fit-content;

    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 22px;
    padding: 8px 13px;

    border:
        1px solid
        rgba(245, 158, 11, 0.28);

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            var(--color-accent-soft),
            rgba(254, 243, 199, 0.48)
        );

    color: var(--color-primary-hover);

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.rv-coming-soon__badge-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--color-accent);

    box-shadow:
        0 0 0 5px
        rgba(245, 158, 11, 0.14);

    animation:
        rv-coming-soon-pulse
        2s ease-in-out infinite;
}

.rv-coming-soon__eyebrow {
    margin: 0 0 10px;

    color: var(--color-primary);

    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rv-coming-soon__title {
    margin: 0;

    color: var(--color-text);

    font-size:
        clamp(
            36px,
            4.4vw,
            58px
        );

    font-weight: 850;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.rv-coming-soon__title span {
    display: block;

    background:
        linear-gradient(
            90deg,
            var(--color-primary),
            var(--color-accent-hover)
        );

    background-clip: text;
    -webkit-background-clip: text;

    color: transparent;
    -webkit-text-fill-color: transparent;
}

.rv-coming-soon__description {
    max-width: 650px;

    margin: 22px 0 0;

    color: var(--color-text-light);

    font-size: 17px;
    line-height: 1.7;
}


/* =========================================
   FEATURE GRID
========================================= */

.rv-coming-soon__features {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;

    margin-top: 30px;
}

.rv-coming-soon__feature {
    min-width: 0;

    padding: 15px;

    border:
        1px solid
        var(--color-border);

    border-radius: 14px;

    background:
        rgba(248, 250, 252, 0.72);

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.rv-coming-soon__feature:hover {
    transform: translateY(-3px);

    border-color:
        rgba(245, 158, 11, 0.42);

    background: var(--color-surface);

    box-shadow: var(--shadow-sm);
}

.rv-coming-soon__feature-icon {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 11px;

    border-radius: 9px;

    background: var(--color-primary-soft);
    color: var(--color-primary);

    font-size: 15px;
    font-weight: 900;
}

.rv-coming-soon__feature strong {
    display: block;

    margin-bottom: 5px;

    color: var(--color-text);

    font-size: 13px;
    font-weight: 800;
}

.rv-coming-soon__feature span {
    display: block;

    color: var(--color-muted);

    font-size: 12px;
    line-height: 1.45;
}


/* =========================================
   STATUS
========================================= */

.rv-coming-soon__status {
    margin-top: 26px;
    padding: 16px 18px;

    border:
        1px solid
        rgba(245, 158, 11, 0.22);

    border-radius: 15px;

    background:
        linear-gradient(
            90deg,
            rgba(254, 243, 199, 0.7),
            rgba(255, 255, 255, 0.72)
        );
}

.rv-coming-soon__status-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.rv-coming-soon__status-label {
    color: var(--color-muted);

    font-size: 12px;
    font-weight: 700;
}

.rv-coming-soon__status-copy strong {
    color: var(--color-primary-hover);

    font-size: 13px;
    font-weight: 850;
}

.rv-coming-soon__progress {
    height: 7px;

    margin-top: 12px;
    overflow: hidden;

    border-radius: 999px;

    background:
        rgba(148, 163, 184, 0.2);
}

.rv-coming-soon__progress span {
    display: block;

    width: 68%;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--color-primary),
            var(--color-accent),
            var(--color-warning)
        );

    background-size: 180% 100%;

    animation:
        rv-coming-soon-progress
        3.6s linear infinite;
}


/* =========================================
   ACTIONS
========================================= */

.rv-coming-soon__actions {
    margin-top: 28px;
}

.rv-coming-soon__cta {
    min-height: 56px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 15px 22px;

    border-radius: 13px;

    box-shadow:
        0 13px 24px
        rgba(217, 119, 6, 0.22);

    color: #ffffff;

    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.rv-coming-soon__cta:hover {
    background: var(--color-accent-hover);

    transform: translateY(-2px);

    box-shadow:
        0 17px 30px
        rgba(180, 83, 9, 0.27);
}

.rv-coming-soon__cta:active {
    transform: translateY(0);
}

.rv-coming-soon__cta:focus-visible {
    outline:
        4px solid
        rgba(245, 158, 11, 0.25);

    outline-offset: 3px;
}

.rv-coming-soon__helper {
    margin: 13px 0 0;

    color: var(--color-muted);

    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}


/* =========================================
   FOOTER
========================================= */

.rv-coming-soon__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin-top: 22px;

    color: var(--color-muted);

    font-size: 12px;
    font-weight: 600;
}


/* =========================================
   ANIMATIONS
========================================= */

@keyframes rv-coming-soon-enter {
    from {
        opacity: 0;
        transform:
            translateY(24px)
            scale(0.985);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}

@keyframes rv-coming-soon-shimmer {
    from {
        background-position: 0% 50%;
    }

    to {
        background-position: 220% 50%;
    }
}

@keyframes rv-coming-soon-icon-float {
    0%,
    100% {
        transform:
            translateY(0)
            rotate(-4deg);
    }

    50% {
        transform:
            translateY(-10px)
            rotate(1deg);
    }
}

@keyframes rv-coming-soon-ring {
    0%,
    100% {
        opacity: 0.48;
        transform: scale(0.96);
    }

    50% {
        opacity: 0.14;
        transform: scale(1.08);
    }
}

@keyframes rv-coming-soon-pulse {
    0%,
    100% {
        box-shadow:
            0 0 0 5px
            rgba(245, 158, 11, 0.12);
    }

    50% {
        box-shadow:
            0 0 0 9px
            rgba(245, 158, 11, 0.04);
    }
}

@keyframes rv-coming-soon-signal {
    0%,
    100% {
        opacity: 0.46;
        transform: scaleY(0.74);
    }

    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes rv-coming-soon-progress {
    from {
        background-position: 0% 50%;
    }

    to {
        background-position: 180% 50%;
    }
}

@keyframes rv-coming-soon-float-one {
    0%,
    100% {
        transform:
            translate3d(0, 0, 0)
            scale(1);
    }

    50% {
        transform:
            translate3d(-24px, 28px, 0)
            scale(1.04);
    }
}

@keyframes rv-coming-soon-float-two {
    0%,
    100% {
        transform:
            translate3d(0, 0, 0)
            scale(1);
    }

    50% {
        transform:
            translate3d(30px, -20px, 0)
            scale(1.06);
    }
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 980px) {

    .rv-coming-soon {
        justify-content: flex-start;
        padding-top: 32px;
    }

    .rv-coming-soon__card {
        grid-template-columns: 1fr;
        max-width: 760px;
    }

    .rv-coming-soon__visual {
        min-height: 250px;
        padding: 44px 30px;
    }

    .rv-coming-soon__icon-shell {
        width: 138px;
        height: 138px;
        border-radius: 34px;
    }

    .rv-coming-soon__icon-ring {
        border-radius: 43px;
    }

    .rv-coming-soon__icon {
        width: 62px;
        height: 62px;
    }

    .rv-coming-soon__content {
        padding: 40px;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 680px) {

    .rv-coming-soon {
        min-height: calc(100svh - 32px);
        padding: 16px 14px 20px;
    }

    .rv-coming-soon__card {
        border-radius: 22px;
    }

    .rv-coming-soon__visual {
        min-height: 190px;
        padding: 32px 20px;
    }

    .rv-coming-soon__icon-shell {
        width: 108px;
        height: 108px;

        border-radius: 28px;
    }

    .rv-coming-soon__icon-ring {
        inset: -13px;
        border-radius: 34px;
    }

    .rv-coming-soon__icon {
        width: 49px;
        height: 49px;
    }

    .rv-coming-soon__signal {
        bottom: 20px;
    }

    .rv-coming-soon__content {
        padding: 30px 20px 26px;
    }

    .rv-coming-soon__badge {
        margin-bottom: 18px;

        font-size: 10px;
        letter-spacing: 0.035em;
    }

    .rv-coming-soon__eyebrow {
        font-size: 11px;
    }

    .rv-coming-soon__title {
        font-size: 35px;
        letter-spacing: -0.04em;
    }

    .rv-coming-soon__description {
        margin-top: 17px;

        font-size: 15px;
        line-height: 1.62;
    }

    .rv-coming-soon__features {
        grid-template-columns: 1fr;
        gap: 9px;

        margin-top: 24px;
    }

    .rv-coming-soon__feature {
        display: grid;
        grid-template-columns: 36px 1fr;
        column-gap: 11px;

        padding: 13px;
    }

    .rv-coming-soon__feature-icon {
        grid-row: 1 / span 2;

        margin: 0;
    }

    .rv-coming-soon__feature strong {
        align-self: end;
    }

    .rv-coming-soon__status {
        margin-top: 22px;
        padding: 14px;
    }

    .rv-coming-soon__status-copy {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .rv-coming-soon__cta {
        min-height: 58px;

        padding: 14px 16px;

        font-size: 14px;
    }

    .rv-coming-soon__footer {
        flex-wrap: wrap;

        margin-top: 16px;

        text-align: center;
    }

}


/* =========================================
   ACCESSIBILITY — REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    .rv-coming-soon__card,
    .rv-coming-soon__orb,
    .rv-coming-soon__icon-shell,
    .rv-coming-soon__icon-ring,
    .rv-coming-soon__badge-dot,
    .rv-coming-soon__signal span,
    .rv-coming-soon__progress span {
        animation: none !important;
    }

    .rv-coming-soon__feature,
    .rv-coming-soon__cta {
        transition: none;
    }

}

/* ==========================================================
   🧾 CREATE ORDER / POS UPGRADE
   Visual-only layer
========================================================== */


/* ==========================================================
   PAGE
========================================================== */

.rv-order-builder {
    max-width: 1280px;
    margin: 0 auto;
    gap: 18px;
}


/* ==========================================================
   HERO
========================================================== */

.rv-order-builder__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 22px 24px;
}

.rv-order-builder__hero-main {
    min-width: 0;
}

.rv-order-builder__eyebrow,
.rv-order-panel-eyebrow {
    margin-bottom: 4px;

    color: var(--color-muted);

    font-size: 11px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: .08em;
}

.rv-order-builder__title {
    margin-bottom: 4px;
}

.rv-order-builder__customer {
    color: var(--color-text-light);
    font-size: 15px;
    font-weight: 600;
}


/* ==========================================================
   BENEFITS
========================================================== */

.rv-order-builder__benefits {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.rv-order-benefit {
    min-width: 145px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;

    padding: 10px 14px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    background: var(--color-accent-soft);
}

.rv-order-benefit__label {
    color: var(--color-muted);

    font-size: 11px;
    font-weight: 700;
}

.rv-order-benefit__value {
    color: var(--color-primary);

    font-size: 18px;
    font-weight: 900;
}


/* ==========================================================
   WORKSPACE
========================================================== */

.rv-order-workspace {
    display: grid;

    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(360px, .85fr);

    align-items: start;

    gap: 18px;
}


/* ==========================================================
   PANELS
========================================================== */

.rv-order-catalog,
.rv-order-cart {
    min-width: 0;
}

.rv-order-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 16px;
}

.rv-order-panel-title {
    margin: 0;

    font-size: 18px;
}

.rv-order-click-hint {
    flex: 0 0 auto;

    padding: 7px 10px;

    border-radius: 999px;

    background: var(--color-accent-soft);
    color: var(--color-primary);

    font-size: 12px;
    font-weight: 800;
}


/* ==========================================================
   SEARCH
========================================================== */

.rv-order-search {
    margin-bottom: 14px;
}

.rv-order-search .rv-form-input {
    width: 100%;

    min-height: 44px;

    text-align: left;

    font-size: 14px;
}


/* ==========================================================
   PRODUCT LIST
========================================================== */

.rv-order-product-list {
    max-height: 560px;

    margin-top: 0;
    padding-right: 5px;

    overflow-y: auto;
    overflow-x: hidden;
}

.rv-order-product-list::-webkit-scrollbar {
    width: 7px;
}

.rv-order-product-list::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: 999px;
}

.rv-order-product-list::-webkit-scrollbar-track {
    background: transparent;
}


/* ==========================================================
   PRODUCT
========================================================== */

.product-item.rv-order-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 9px;
    padding: 14px 15px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    background: var(--color-surface);

    box-shadow: var(--shadow-xs);

    cursor: pointer;

    user-select: none;

    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast),
        box-shadow var(--transition-fast);
}

.product-item.rv-order-product:hover {
    border-color: var(--color-primary);

    background: var(--color-primary-soft);

    box-shadow: var(--shadow-sm);

    transform: translateY(-1px);
}

.product-item.rv-order-product:active {
    transform: scale(.99);
}

.rv-order-product__main {
    flex: 1;
    min-width: 0;
}

.rv-order-product__name {
    display: block;

    margin-bottom: 4px;

    color: var(--color-text);

    font-size: 15px;
    font-weight: 800;
}

.rv-order-product__meta {
    color: var(--color-muted);

    font-size: 12px;
    line-height: 1.4;
}

.rv-order-product__aside {
    flex: 0 0 auto;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.rv-order-product__price {
    color: var(--color-primary);

    font-size: 16px;
    font-weight: 900;

    white-space: nowrap;
}

.rv-order-product__stock {
    color: var(--color-muted);

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
}


/* ==========================================================
   CART
========================================================== */

.rv-order-cart {
    position: sticky;
    top: 20px;
}

.rv-order-cart__items {
    max-height: 320px;

    overflow-y: auto;
    overflow-x: hidden;
}

.rv-order-cart__items:empty::before {
    content:
        "Tu pedido está vacío. Toca un producto del inventario para comenzar.";

    display: block;

    padding: 28px 18px;

    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius);

    color: var(--color-muted);

    text-align: center;
    line-height: 1.5;
}


/* ==========================================================
   GENERATED ORDER ROWS
========================================================== */

.rv-order-cart .order-row {
    gap: 14px;

    padding: 13px 0;
}

.rv-order-cart .order-row > div:first-child {
    flex: 1;
    min-width: 0;
}

.rv-order-cart .order-row strong {
    font-size: 14px;
}

.rv-order-cart .order-row small {
    color: var(--color-muted);
}

.rv-order-cart .rv-order-item-actions {
    flex: 0 0 auto;

    gap: 8px;
}

.rv-order-cart .rv-order-item-price {
    min-width: 72px;

    color: var(--color-primary);

    font-weight: 800;
}

.rv-order-cart .qty-input {
    width: 54px;
    height: 34px;

    text-align: center;
}

.rv-order-cart .remove-btn {
    width: 32px;
    height: 32px;

    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* ==========================================================
   SUMMARY
========================================================== */

.rv-order-checkout {
    margin-top: 18px;
    padding: 16px;

    border: 1px solid var(--color-border);

    background: var(--color-surface-alt);
}

.rv-order-checkout .rv-row {
    padding: 9px 0;
}

.rv-order-checkout .rv-row:last-child {
    border-bottom: none;
}

.rv-order-checkout .rv-order-summary__total {
    margin-top: 4px;
    padding-top: 14px;

    border-top: 2px solid var(--color-border-strong);
    border-bottom: none;

    color: var(--color-text);

    font-size: 20px;
}

.rv-order-checkout .rv-order-summary__total span:last-child {
    color: var(--color-primary);

    font-size: 24px;
    font-weight: 900;
}

.rv-order-credit-button {
    margin: 4px 0 6px;
}


/* ==========================================================
   CTA
========================================================== */

.rv-order-checkout-button {
    min-height: 48px;

    margin-top: 16px;

    font-size: 15px;
    font-weight: 800;

    box-shadow: var(--shadow-sm);
}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1050px) {

    .rv-order-workspace {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(330px, .9fr);
    }

    .rv-order-builder__hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .rv-order-builder__benefits {
        width: 100%;

        justify-content: flex-start;
    }

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 768px) {

    .rv-order-builder {
        gap: 14px;
    }

    .rv-order-builder__hero {
        padding: 18px;
    }

    .rv-order-builder__benefits {
        display: grid;
        grid-template-columns: 1fr;
    }

    .rv-order-benefit {
        width: 100%;
        min-width: 0;

        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .rv-order-workspace {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .rv-order-catalog,
    .rv-order-cart {
        width: 100%;
    }

    .rv-order-cart {
        position: static;
    }

    .rv-order-panel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .rv-order-click-hint {
        white-space: nowrap;

        font-size: 10px;
    }

    .rv-order-product-list {
        max-height: 390px;
    }

    .product-item.rv-order-product {
        align-items: flex-start;

        padding: 13px;
    }

    .rv-order-product__aside {
        gap: 4px;
    }

    .rv-order-product__price {
        font-size: 14px;
    }

    .rv-order-product__stock {
        white-space: normal;

        text-align: right;
    }

    .rv-order-cart__items {
        max-height: none;
    }

}


/* ==========================================================
   SMALL MOBILE
========================================================== */

@media (max-width: 480px) {



    .product-item.rv-order-product {
        flex-direction: column;
        gap: 10px;
    }

    .rv-order-product__aside {
        width: 100%;

        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .rv-order-cart .order-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .rv-order-cart .rv-order-item-actions {
        width: 100%;

        justify-content: space-between;
    }

}


/* ==========================================================
   🟡 CREATE ORDER STEP BUTTON
========================================================== */

.rv-order-step-btn {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 8px 12px;

    border: 1px solid rgba(var(--color-primary-rgb), .12);
    border-radius: 999px;

    background: linear-gradient(
        135deg,
        #fff7d6 0%,
        #ffe9a3 100%
    );

    color: var(--color-primary);

    box-shadow: var(--shadow-xs);

    cursor: pointer;

    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast);
}

.rv-order-step-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: rgba(var(--color-primary-rgb), .22);
}

.rv-order-step-btn:active {
    transform: scale(.98);
}

.rv-order-step-btn__label {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.rv-order-step-btn__value {
    min-width: 30px;
    height: 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 10px;

    border-radius: 999px;

    background: rgba(var(--color-primary-rgb), .14);

    color: var(--color-primary);

    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

@media (max-width: 768px) {

    .rv-order-step-btn {
        width: 100%;
        justify-content: space-between;
    }

    .rv-order-step-btn__label {
        font-size: 11px;
    }

}


/* =========================================================
   🎁 FREE SAMPLES - ACTION BUTTONS
========================================================= */

.rv-free-sample-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: 110px;

    margin-top: 12px;

    align-self: flex-start;
}


.rv-free-sample-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    margin-top: 10px;
}


.rv-free-sample-action-btn + .rv-free-sample-action-btn {
    margin-top: 8px;
}




/* =========================================================
   CUSTOMER ADMIN / EDIT MODAL
========================================================= */

.rv-customer-admin-card {
    max-width: 1280px;
    margin: 0 auto;
}

.rv-customer-admin-search {
    margin-bottom: 16px;
}

.rv-customer-admin-table {
    max-height: 540px;
}

body.rv-modal-open {
    overflow: hidden;
}


/* =========================================================
   MODAL SHELL
========================================================= */

.rv-customer-edit-modal {
    width: min(960px, calc(100vw - 40px));
    max-width: 960px;

    max-height: calc(100vh - 48px);

    padding: 0;

    overflow: hidden;

    display: flex;
    flex-direction: column;

    text-align: left;
}


/* =========================================================
   HEADER
========================================================= */

.rv-customer-edit-modal__header {
    flex-shrink: 0;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding: 22px 24px;

    border-bottom: 1px solid var(--color-border);

    background: var(--color-surface);
}

.rv-customer-edit-modal__eyebrow {
    margin-bottom: 4px;

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.06em;

    color: var(--color-muted);
}

.rv-customer-edit-modal__title {
    margin: 0;

    font-size: 24px;
    line-height: 1.2;

    color: var(--color-text);
}

.rv-customer-edit-route {
    margin-top: 7px;

    font-size: 13px;
    font-weight: 600;

    color: var(--color-primary);
}

.rv-customer-edit-modal__close {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--color-border);
    border-radius: 50%;

    background: var(--color-surface-alt);

    color: var(--color-text);

    font-size: 24px;
    line-height: 1;

    cursor: pointer;

    transition: var(--transition-fast);
}

.rv-customer-edit-modal__close:hover {
    background: var(--color-border);
}


/* =========================================================
   BODY
========================================================= */

.rv-customer-edit-modal__body {
    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding: 22px 24px;

    background: var(--color-bg);
}

.rv-customer-edit-section {
    padding: 18px;

    margin-bottom: 16px;

    background: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    box-shadow: var(--shadow-xs);
}

.rv-customer-edit-section:last-child {
    margin-bottom: 0;
}


/* =========================================================
   GRID
========================================================= */

.rv-customer-edit-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px 18px;
}

.rv-customer-edit-grid > * {
    min-width: 0;
}


/* =========================================================
   INPUT ALIGNMENT
========================================================= */

.rv-customer-edit-modal .rv-form-input {
    width: 100%;
    max-width: 100%;

    text-align: left;
}

.rv-customer-edit-modal input.rv-form-input {
    text-align: left;
}


/* =========================================================
   MAP
========================================================= */

.rv-customer-edit-map {
    width: 100%;
    height: 300px;

    margin-top: 14px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    overflow: hidden;

    background: var(--color-surface-alt);
}


/* =========================================================
   DISCOUNT
========================================================= */

.rv-customer-edit-discount {
    margin-top: 14px;

    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;
}


/* =========================================================
   STATES
========================================================= */

.rv-customer-edit-state {
    padding: 40px 24px;

    text-align: center;

    color: var(--color-muted);
}

.rv-customer-edit-modal > .rv-alert {
    margin: 18px 24px 0;
}


/* =========================================================
   ACTION BAR
========================================================= */

.rv-customer-edit-modal__actions {
    flex-shrink: 0;

    display: flex;
    justify-content: flex-end;

    gap: 10px;

    padding: 16px 24px;

    border-top: 1px solid var(--color-border);

    background: var(--color-surface);
}

.rv-customer-edit-modal__actions .rv-btn {
    min-width: 140px;
}


/* =========================================================
   TABLE ACTION
========================================================= */

.js-edit-customer {
    white-space: nowrap;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .rv-customer-edit-modal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .rv-customer-edit-modal {
        width: 100vw;
        height: 100vh;

        max-width: none;
        max-height: none;

        border-radius: 0;
    }

    .rv-customer-edit-modal__header {
        padding: 18px;
    }

    .rv-customer-edit-modal__title {
        font-size: 20px;
    }

    .rv-customer-edit-modal__body {
        padding: 14px;
    }

    .rv-customer-edit-section {
        padding: 15px;
    }

    .rv-customer-edit-grid,
    .rv-customer-edit-discount {
        grid-template-columns: 1fr;
    }

    .rv-customer-edit-map {
        height: 260px;
    }

    .rv-customer-edit-modal__actions {
        padding: 12px 14px;
    }

    .rv-customer-edit-modal__actions .rv-btn {
        flex: 1;
        min-width: 0;
    }

}

/* =========================================================
   CUSTOMER EDIT — LOCATION SUMMARY
========================================================= */

.rv-customer-location-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.rv-customer-location-summary__content {
    min-width: 0;
    flex: 1;
}

.rv-customer-location-summary__label {
    margin-bottom: 5px;

    font-size: 12px;
    font-weight: 700;

    color: var(--color-muted);

    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rv-customer-location-summary__address {
    font-size: 15px;
    font-weight: 700;

    line-height: 1.45;

    color: var(--color-text);
}

.rv-customer-location-summary__meta {
    margin-top: 5px;

    font-size: 12px;

    color: var(--color-muted);
}

.rv-customer-location-summary .rv-btn {
    flex-shrink: 0;
}


/* =========================================================
   CUSTOMER LOCATION MODAL
========================================================= */

.rv-customer-location-modal {
    width: min(760px, calc(100vw - 40px));
    max-width: 760px;

    max-height: calc(100vh - 48px);

    padding: 0;

    overflow: hidden;

    display: flex;
    flex-direction: column;

    text-align: left;
}

.rv-customer-location-modal__body {
    padding: 22px 24px;

    overflow-y: auto;

    background: var(--color-bg);
}

.rv-customer-location-modal__body .rv-form-group {
    margin-bottom: 16px;
}

.rv-customer-location-modal__body .rv-form-input {
    width: 100%;

    text-align: left;
}


/* =========================================================
   LOCATION MAP
========================================================= */

.rv-customer-location-map {
    width: 100%;
    height: 420px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    overflow: hidden;

    background: var(--color-surface-alt);

    box-shadow: var(--shadow-xs);
}

.rv-customer-location-modal__body .rv-status-muted {
    margin-top: 12px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .rv-customer-location-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .rv-customer-location-summary .rv-btn {
        width: 100%;
    }


    .rv-customer-location-modal {
        width: 100vw;
        height: 100vh;

        max-width: none;
        max-height: none;

        border-radius: 0;
    }


    .rv-customer-location-modal__body {
        padding: 14px;

        flex: 1;
        min-height: 0;
    }


    .rv-customer-location-map {
        height: min(
            52vh,
            420px
        );
    }

}


/* =========================================================
   CUSTOMER CRUD MODALS — FINAL BEHAVIOR FIX
========================================================= */


/* =========================================================
   GOOGLE PLACES AUTOCOMPLETE ABOVE MODALS
========================================================= */

.pac-container {
    z-index: 9999 !important;
}


/* =========================================================
   MAIN CUSTOMER EDIT MODAL
========================================================= */

.rv-customer-edit-modal {
    height: min(860px, calc(100vh - 48px));
    max-height: calc(100vh - 48px);

    display: flex;
    flex-direction: column;

    overflow: hidden;
}


/*
 * The form itself must participate in the flex layout.
 *
 * Without this, the body cannot calculate the available
 * height and overflow-y:auto does not actually scroll.
 */

#customerEditForm {
    flex: 1;

    min-height: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}


/* =========================================================
   SCROLLABLE BODY
========================================================= */

#customerEditForm .rv-customer-edit-modal__body {
    flex: 1;

    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    overscroll-behavior: contain;
}


/* clean scrollbar */

#customerEditForm
.rv-customer-edit-modal__body::-webkit-scrollbar {
    width: 8px;
}

#customerEditForm
.rv-customer-edit-modal__body::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: 999px;
}

#customerEditForm
.rv-customer-edit-modal__body::-webkit-scrollbar-track {
    background: transparent;
}


/* =========================================================
   FIXED ACTION BAR
========================================================= */

#customerEditForm
.rv-customer-edit-modal__actions {
    flex-shrink: 0;

    position: relative;

    z-index: 2;

    background: var(--color-surface);

    border-top: 1px solid var(--color-border);

    box-shadow:
        0 -6px 18px rgba(15, 23, 42, 0.06);
}


/* =========================================================
   LOCATION MODAL
========================================================= */

.rv-customer-location-modal {
    max-height: calc(100vh - 48px);

    display: flex;
    flex-direction: column;

    overflow: hidden;
}

.rv-customer-location-modal__body {
    flex: 1;

    min-height: 0;

    overflow-y: auto;
}


/* =========================================================
   MOBILE
========================================================= */

/* =========================================================
   CUSTOMER CRUD — MOBILE FIRST FINAL
========================================================= */

@media (max-width: 768px) {

    /* =====================================================
       PAGE / ADMIN CARD
    ===================================================== */

    .rv-create-layout {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .rv-customer-admin-card {
        width: 100%;
        max-width: none;

        padding: 14px;

        border-radius: var(--radius);
    }

    .rv-customer-admin-card .rv-create-header {
        margin-bottom: 16px;
    }

    .rv-customer-admin-card .rv-create-page-title {
        font-size: 28px;
        line-height: 1.1;
    }

    .rv-customer-admin-card .rv-text-muted {
        margin-top: 6px;

        font-size: 14px;
        line-height: 1.4;
    }


    /* =====================================================
       SEARCH
    ===================================================== */

    .rv-customer-admin-search {
        margin-bottom: 14px;
    }

    .rv-customer-admin-search .rv-form-input {
        width: 100%;
        height: 46px;

        padding: 0 14px;

        font-size: 15px;

        text-align: left;
    }


    /* =====================================================
       CUSTOMER LIST CONTAINER
    ===================================================== */

    .rv-customer-admin-table {
        max-height: calc(100dvh - 340px);

        border: none;
        border-radius: 0;

        background: transparent;

        overflow-y: auto;
        overflow-x: hidden;

        padding-right: 3px;
    }


    /* =====================================================
       RESET GLOBAL MOBILE TABLE BEHAVIOR ONLY HERE
    ===================================================== */

    .rv-customer-admin-table .rv-table {
        display: block;

        width: 100%;
        margin: 0;
    }

    .rv-customer-admin-table .rv-table thead {
        display: none;
    }

    .rv-customer-admin-table .rv-table tbody {
        display: flex;
        flex-direction: column;

        gap: 10px;
    }


    /* =====================================================
       CUSTOMER CARD
    ===================================================== */

    .rv-customer-admin-table
    .rv-table
    tbody
    tr.js-customer-edit-row {

        display: grid;

        grid-template-columns:
            minmax(0, 1fr)
            auto;

        grid-template-areas:
            "customer customer"
            "tax route"
            "status action";

        gap: 10px 14px;

        width: 100%;

        padding: 16px;

        margin: 0;

        background: var(--color-surface);

        border: 1px solid var(--color-border);
        border-radius: var(--radius);

        box-shadow: var(--shadow-xs);

        transition: var(--transition-fast);
    }

    .rv-customer-admin-table
    .rv-table
    tbody
    tr.js-customer-edit-row:hover {

        background: var(--color-surface);
        border-color: var(--color-border-strong);
    }


    /* =====================================================
       RESET TD GLOBAL RULES
    ===================================================== */

    .rv-customer-admin-table
    .rv-table
    tbody
    tr.js-customer-edit-row
    td {

        display: block;

        padding: 0;
        margin: 0;

        border: none;

        min-width: 0;
    }


    /* =====================================================
       CUSTOMER NAME
    ===================================================== */

    .rv-customer-admin-table
    .js-customer-edit-row
    td:nth-child(1) {

        grid-area: customer;

        padding-bottom: 10px;

        border-bottom: 1px solid var(--color-border);
    }

    .rv-customer-admin-table
    .js-customer-edit-row
    td:nth-child(1)
    .rv-product-name {

        font-size: 17px;
        font-weight: 800;

        line-height: 1.2;

        color: var(--color-text);
    }

    .rv-customer-admin-table
    .js-customer-edit-row
    td:nth-child(1)
    .rv-product-meta {

        margin-top: 4px;

        font-size: 13px;
        font-weight: 500;

        color: var(--color-muted);
    }


    /* =====================================================
       TAX ID
    ===================================================== */

    .rv-customer-admin-table
    .js-customer-edit-row
    td:nth-child(2) {

        grid-area: tax;

        margin-top: 0;

        font-size: 14px;
        font-weight: 700;

        color: var(--color-primary);
    }

    .rv-customer-admin-table
    .js-customer-edit-row
    td:nth-child(2)::before {

        content: "Identificación";

        display: block;

        margin-bottom: 3px;

        font-size: 11px;
        font-weight: 700;

        text-transform: uppercase;
        letter-spacing: .04em;

        color: var(--color-muted);
    }


    /* =====================================================
       ROUTE
    ===================================================== */

    .rv-customer-admin-table
    .js-customer-edit-row
    td:nth-child(3) {

        grid-area: route;

        display: block;

        margin-top: 0;

        text-align: right;

        font-size: 14px;
        font-weight: 700;

        color: var(--color-text);
    }

    .rv-customer-admin-table
    .js-customer-edit-row
    td:nth-child(3)::before {

        content: "Ruta";

        display: block;

        margin-bottom: 3px;

        font-size: 11px;
        font-weight: 700;

        text-transform: uppercase;
        letter-spacing: .04em;

        color: var(--color-muted);
    }


    /* =====================================================
       STATUS
    ===================================================== */

    .rv-customer-admin-table
    .js-customer-edit-row
    td:nth-child(4) {

        grid-area: status;

        display: flex;
        align-items: center;

        margin-top: 4px;
    }

    .rv-customer-admin-table
    .js-customer-edit-row
    td:nth-child(4)
    .rv-badge {

        font-size: 12px;

        padding: 5px 9px;
    }


    /* =====================================================
       EDIT ACTION
    ===================================================== */

    .rv-customer-admin-table
    .js-customer-edit-row
    td:nth-child(5) {

        grid-area: action;

        display: flex;

        justify-content: flex-end;
        align-items: center;

        margin-top: 4px;
    }

    .rv-customer-admin-table
    .js-edit-customer {

        width: auto;
        min-width: 96px;
        height: 38px;

        padding: 0 14px;

        display: inline-flex;

        align-items: center;
        justify-content: center;

        gap: 5px;

        border-radius: var(--radius-sm);

        font-size: 14px;
        font-weight: 700;

        white-space: nowrap;
    }


    /* =====================================================
       EMPTY STATE
    ===================================================== */

    #customerEditNoResults {
        padding: 18px 10px;

        font-size: 14px;
    }


    /* =====================================================
       CUSTOMER CRUD TOP ACTIONS
    ===================================================== */

    .rv-customer-actions {
        display: grid;

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 6px;

        width: 100%;
    }

    .rv-customer-actions .rv-btn,
    .rv-customer-actions a {

        width: 100%;
        min-width: 0;

        padding: 9px 6px;

        display: flex;

        align-items: center;
        justify-content: center;

        text-align: center;

        font-size: 14px;

        white-space: nowrap;
    }


    /* =====================================================
       EDIT / LOCATION MODALS
    ===================================================== */

    .rv-customer-edit-modal,
    .rv-customer-location-modal {

        width: 100vw;
        height: 100dvh;

        max-width: none;
        max-height: none;

        margin: 0;

        border-radius: 0;
    }


    /* =====================================================
       EDIT MODAL HEADER
    ===================================================== */

    .rv-customer-edit-modal__header {

        padding:
            calc(14px + env(safe-area-inset-top))
            16px
            14px;

        gap: 12px;
    }

    .rv-customer-edit-modal__eyebrow {

        font-size: 10px;
    }

    .rv-customer-edit-modal__title {

        font-size: 21px;
    }

    .rv-customer-edit-route {

        margin-top: 4px;

        font-size: 12px;
    }

    .rv-customer-edit-modal__close {

        width: 36px;
        height: 36px;

        font-size: 22px;
    }


    /* =====================================================
       EDIT MODAL BODY
    ===================================================== */

    #customerEditForm
    .rv-customer-edit-modal__body {

        padding: 12px;

        background: var(--color-bg);
    }

    .rv-customer-edit-section {

        padding: 14px;

        margin-bottom: 10px;

        border-radius: var(--radius);
    }

    .rv-customer-edit-section .rv-section-title {

        margin-bottom: 12px;

        font-size: 16px;
    }


    /* =====================================================
       FORM GRID
    ===================================================== */

    .rv-customer-edit-grid,
    .rv-customer-edit-discount {

        grid-template-columns: 1fr;

        gap: 11px;
    }

    .rv-customer-edit-modal .rv-form-group {

        gap: 5px;
    }

    .rv-customer-edit-modal .rv-form-group label {

        font-size: 12px;
        font-weight: 600;
    }

    .rv-customer-edit-modal .rv-form-input {

        min-height: 44px;

        font-size: 15px;
    }


    /* =====================================================
       LOCATION SUMMARY
    ===================================================== */

    .rv-customer-location-summary {

        flex-direction: column;

        align-items: stretch;

        gap: 14px;
    }

    .rv-customer-location-summary .rv-btn {

        width: 100%;

        min-height: 42px;
    }


    /* =====================================================
       FIXED MAIN ACTION BAR
    ===================================================== */

    #customerEditForm
    .rv-customer-edit-modal__actions {

        padding:
            10px
            12px
            calc(10px + env(safe-area-inset-bottom));

        gap: 8px;
    }

    #customerEditForm
    .rv-customer-edit-modal__actions
    .rv-btn {

        flex: 1;

        width: auto;
        min-width: 0;

        min-height: 44px;

        font-size: 14px;
        font-weight: 700;
    }


    /* =====================================================
       LOCATION MODAL BODY
    ===================================================== */

    .rv-customer-location-modal__body {

        padding: 12px;

        flex: 1;
        min-height: 0;
    }

    .rv-customer-location-map {

        height: min(
            54dvh,
            440px
        );
    }


    /* =====================================================
       LOCATION ACTION BAR
    ===================================================== */

    .rv-customer-location-modal
    .rv-customer-edit-modal__actions {

        padding:
            10px
            12px
            calc(10px + env(safe-area-inset-bottom));

        gap: 8px;
    }

    .rv-customer-location-modal
    .rv-customer-edit-modal__actions
    .rv-btn {

        flex: 1;

        width: auto;
        min-width: 0;

        min-height: 44px;

        font-size: 13px;
        font-weight: 700;
    }

}


/* =========================================================
   CUSTOMER CRUD NAVIGATION
========================================================= */

.rv-customer-crud-nav {
    width: 100%;
    max-width: 1280px;

    margin: 0 auto 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding: 14px 16px;

    background: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    box-shadow: var(--shadow-sm);
}


/* =========================================================
   MODULE IDENTITY
========================================================= */

.rv-customer-crud-nav__header {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 10px;
}

.rv-customer-crud-nav__icon {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--color-primary-soft);

    border-radius: 10px;

    font-size: 18px;
}

.rv-customer-crud-nav__title {
    font-size: 17px;
    font-weight: 800;

    line-height: 1.2;

    color: var(--color-text);
}

.rv-customer-crud-nav__subtitle {
    margin-top: 2px;

    font-size: 12px;

    color: var(--color-muted);
}


/* =========================================================
   TABS
========================================================= */

.rv-customer-crud-tabs {
    flex-shrink: 0;

    display: flex;
    align-items: center;

    gap: 6px;

    padding: 4px;

    background: var(--color-surface-alt);

    border: 1px solid var(--color-border);
    border-radius: 9px;
}

.rv-customer-crud-tab {
    min-height: 36px;

    padding: 0 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    border-radius: 7px;

    color: var(--color-text-light);

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    white-space: nowrap;

    transition: var(--transition-fast);
}

.rv-customer-crud-tab:hover {
    background: var(--color-surface);

    color: var(--color-primary);
}

.rv-customer-crud-tab--active {
    background: var(--color-primary);

    color: white;

    box-shadow: var(--shadow-xs);
}

.rv-customer-crud-tab--active:hover {
    background: var(--color-primary-hover);

    color: white;
}

.rv-customer-crud-tab--danger {
    color: var(--color-danger);
}

.rv-customer-crud-tab--danger-active {
    background: var(--color-danger);

    color: white;

    box-shadow: var(--shadow-xs);
}

.rv-customer-crud-tab--danger-active:hover {
    background: var(--color-danger-hover);

    color: white;
}


/* =========================================================
   CUSTOMER SEARCH EMPTY STATE
========================================================= */

/*
 * Author CSS can override the browser's default [hidden]
 * behavior. Make the component state explicit.
 */

#customerEditNoResults[hidden] {
    display: none !important;
}

#customerEditNoResults:not([hidden]) {
    display: block;

    margin-top: 14px;

    padding: 18px;

    border: 1px dashed var(--color-border);

    border-radius: var(--radius);

    background: var(--color-surface-alt);
}


/* =========================================================
   CUSTOMER CRUD NAVIGATION — MOBILE
========================================================= */

@media (max-width: 768px) {

    .rv-customer-crud-nav {
        flex-direction: column;
        align-items: stretch;

        gap: 12px;

        margin-bottom: 10px;

        padding: 12px;

        border-radius: var(--radius);
    }


    .rv-customer-crud-nav__header {
        padding: 0 2px;
    }


    .rv-customer-crud-nav__icon {
        width: 34px;
        height: 34px;

        font-size: 16px;
    }


    .rv-customer-crud-nav__title {
        font-size: 16px;
    }


    .rv-customer-crud-nav__subtitle {
        font-size: 11px;
    }


    .rv-customer-crud-tabs {
        width: 100%;

        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 4px;

        padding: 4px;
    }


    .rv-customer-crud-tab {
        width: 100%;
        min-width: 0;

        min-height: 42px;

        padding: 0 6px;

        font-size: 13px;
    }


    .rv-customer-crud-tab__icon {
        font-size: 14px;
    }

}


/* =========================================================
   CUSTOMER STATE FILTER
========================================================= */

.rv-customer-edit-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}

.rv-customer-edit-topbar
.rv-create-page-title {
    margin: 0;
}


.rv-customer-state-filter {
    flex-shrink: 0;

    display: flex;

    gap: 4px;

    padding: 4px;

    background: var(--color-surface-alt);

    border: 1px solid var(--color-border);
    border-radius: 9px;
}

.rv-customer-state-filter__button {
    min-height: 36px;

    padding: 0 14px;

    border: none;
    border-radius: 7px;

    background: transparent;

    color: var(--color-text-light);

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition: var(--transition-fast);
}

.rv-customer-state-filter__button:hover {
    background: var(--color-surface);
}

.rv-customer-state-filter__button--active {
    background: var(--color-surface);

    color: var(--color-primary);

    box-shadow: var(--shadow-xs);
}


/* =========================================================
   ROW ACTIONS
========================================================= */

.rv-customer-row-actions {
    display: flex;
    align-items: center;

    gap: 6px;

    white-space: nowrap;
}


/* =========================================================
   INACTIVE CUSTOMERS
========================================================= */

.rv-customer-row--inactive {
    opacity: .58;
}

.rv-customer-row--inactive td {
    color: var(--color-muted);
}

.rv-customer-admin-table
.rv-customer-row--inactive:hover {
    opacity: .72;
}


/* =========================================================
   DEACTIVATE MODAL
========================================================= */

.rv-customer-deactivate-modal {
    width: min(
        460px,
        calc(100vw - 32px)
    );

    max-width: 460px;

    padding: 26px;

    text-align: center;
}

.rv-customer-deactivate-modal__icon {
    width: 56px;
    height: 56px;

    margin: 0 auto 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--color-danger-soft);

    font-size: 24px;
}

.rv-customer-deactivate-modal__title {
    margin: 0;

    font-size: 22px;
    font-weight: 800;
}

.rv-customer-deactivate-modal__text {
    margin: 12px 0 18px;

    color: var(--color-text-light);
}

.rv-customer-deactivate-modal__notice {
    padding: 14px;

    display: flex;
    flex-direction: column;

    gap: 7px;

    text-align: left;

    background: var(--color-surface-alt);

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    font-size: 13px;
    line-height: 1.45;
}

.rv-customer-deactivate-modal__actions {
    display: flex;
    justify-content: flex-end;

    gap: 8px;

    margin-top: 20px;
}


/* =========================================================
   CUSTOMER STATE — MOBILE
========================================================= */

@media (max-width: 768px) {

    .rv-customer-edit-topbar {
        flex-direction: column;
        align-items: stretch;

        gap: 14px;
    }


    .rv-customer-state-filter {
        width: 100%;

        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .rv-customer-state-filter__button {
        width: 100%;

        min-width: 0;

        min-height: 42px;
    }


    .rv-customer-row-actions {
        justify-content: flex-end;

        gap: 6px;
    }


    .rv-customer-admin-table
    .js-customer-edit-row
    td:nth-child(5) {

        align-items: flex-end;
    }


    .rv-customer-admin-table
    .js-edit-customer,

    .rv-customer-admin-table
    .js-customer-state-action {

        width: auto;
        min-width: 0;

        height: 38px;

        padding: 0 10px;

        font-size: 12px;
    }


    .rv-customer-deactivate-modal {
        width: calc(100vw - 24px);

        padding: 22px 18px;
    }


    .rv-customer-deactivate-modal__actions {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .rv-customer-deactivate-modal__actions
    .rv-btn {

        width: 100%;
    }

}


/* =========================================================
   👤 USER PROFILE
   ========================================================= */

.rv-profile-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}


/* =========================================================
   HERO
   ========================================================= */

.rv-profile-hero {
    margin-bottom: 2px;
}

.rv-profile-hero__eyebrow {
    margin-bottom: 2px;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: .12em;
    text-transform: uppercase;

    color: var(--color-primary);
}


/* =========================================================
   MAIN LAYOUT
   ========================================================= */

.rv-profile-layout {
    display: grid;

    grid-template-columns:
        minmax(260px, 320px)
        minmax(0, 1fr);

    gap: 22px;

    align-items: start;
}

.rv-profile-main {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 22px;
}


/* =========================================================
   ACCOUNT SUMMARY
   ========================================================= */

.rv-profile-summary {
    position: sticky;
    top: 20px;

    padding: 26px;

    overflow: hidden;
}

.rv-profile-summary__identity {
    display: flex;
    flex-direction: column;

    align-items: center;

    text-align: center;
}

.rv-profile-avatar {
    width: 76px;
    height: 76px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 16px;

    border-radius: 24px;

    background: var(--color-primary-soft);
    border: 1px solid var(--color-border);

    font-size: 34px;

    box-shadow: var(--shadow-xs);
}

.rv-profile-summary__name {
    max-width: 100%;

    font-size: 21px;
    line-height: 1.2;

    font-weight: 850;

    color: var(--color-text);

    word-break: break-word;
}

.rv-profile-summary__username {
    margin-top: 5px;

    font-size: 14px;

    color: var(--color-muted);

    word-break: break-word;
}

.rv-profile-summary__role {
    margin-top: 14px;
}

.rv-profile-role-badge {
    padding: 6px 11px;

    background: var(--color-accent-soft);

    color: var(--color-primary);

    border: 1px solid var(--color-border);
}


/* =========================================================
   SUMMARY DIVIDER
   ========================================================= */

.rv-profile-summary__divider {
    height: 1px;

    margin: 22px 0;

    background: var(--color-border);
}


/* =========================================================
   ACCOUNT META
   ========================================================= */

.rv-profile-account-meta {
    display: flex;
    flex-direction: column;

    gap: 15px;
}

.rv-profile-account-meta__item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 14px;
}

.rv-profile-account-meta__label {
    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: .04em;

    color: var(--color-muted);
}

.rv-profile-account-meta__value {
    min-width: 0;

    display: inline-flex;
    align-items: center;

    gap: 6px;

    font-size: 14px;
    font-weight: 700;

    color: var(--color-text);

    text-align: right;

    word-break: break-word;
}

.rv-profile-status-dot {
    width: 8px;
    height: 8px;

    flex-shrink: 0;

    border-radius: 50%;

    background: var(--color-success);
}


/* =========================================================
   ACCOUNT NOTICE
   ========================================================= */

.rv-profile-summary__notice {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin-top: 22px;
    padding: 13px 14px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    background: var(--color-surface-alt);

    font-size: 12px;
    line-height: 1.5;

    color: var(--color-muted);
}

.rv-profile-summary__notice-icon {
    flex-shrink: 0;

    font-size: 15px;
}


/* =========================================================
   PROFILE CARDS
   ========================================================= */

.rv-profile-card {
    padding: 26px;
}

.rv-profile-card__header {
    display: flex;

    align-items: flex-start;

    gap: 14px;

    margin-bottom: 24px;
    padding-bottom: 18px;

    border-bottom: 1px solid var(--color-border);
}

.rv-profile-card__header-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: var(--color-primary-soft);

    font-size: 19px;
}

.rv-profile-card__title {
    margin: 0;

    font-size: 20px;
    font-weight: 800;

    line-height: 1.2;

    color: var(--color-text);
}

.rv-profile-card__subtitle {
    margin: 5px 0 0;

    font-size: 13px;
    line-height: 1.45;

    color: var(--color-muted);
}


/* =========================================================
   PROFILE FORM
   ========================================================= */

.rv-profile-form {
    display: flex;
    flex-direction: column;

    gap: 22px;
}

.rv-profile-form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.rv-profile-field {
    min-width: 0;

    gap: 7px;
}

.rv-profile-field label {
    font-size: 12px;
    font-weight: 700;

    color: var(--color-text-light);
}

/*
    IMPORTANT:
    core_clean.css has a global
    .rv-form-group input { text-align:center; }

    Profile fields are personal-data fields,
    so they should read naturally left-to-right.
*/

.rv-profile-field input.rv-form-input {
    width: 100%;

    height: 44px;

    padding: 0 13px;

    text-align: left;

    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);

    background: var(--color-surface);

    color: var(--color-text);

    font-size: 14px;

    transition: var(--transition);
}

.rv-profile-field input.rv-form-input:focus {
    outline: none;

    border-color: var(--color-primary);

    box-shadow:
        0 0 0 3px
        var(--color-primary-soft);
}

.rv-profile-field__error {
    margin-top: 2px;

    font-size: 12px;

    color: var(--color-danger);
}


/* =========================================================
   FORM FOOTER
   ========================================================= */

.rv-profile-form__footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding-top: 18px;

    border-top: 1px solid var(--color-border);
}

.rv-profile-form__helper {
    font-size: 12px;
    line-height: 1.45;

    color: var(--color-muted);
}

.rv-profile-save-btn {
    flex-shrink: 0;

    min-width: 160px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    font-weight: 700;

    box-shadow: var(--shadow-xs);

    transition: var(--transition);
}

.rv-profile-save-btn:hover {
    transform: translateY(-1px);

    background: var(--color-primary-hover);

    box-shadow: var(--shadow-sm);
}


/* =========================================================
   SECURITY
   ========================================================= */

.rv-profile-security-list {
    display: flex;
    flex-direction: column;
}

.rv-profile-security-item {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 18px 0;
}

.rv-profile-security-item:first-child {
    padding-top: 0;
}

.rv-profile-security-item:last-child {
    padding-bottom: 0;
}

.rv-profile-security-item
+ .rv-profile-security-item {
    border-top: 1px solid var(--color-border);
}

.rv-profile-security-item__info {
    min-width: 0;

    display: flex;

    align-items: center;

    gap: 14px;
}

.rv-profile-security-item__icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: var(--color-surface-alt);

    font-size: 18px;
}

.rv-profile-security-item__title {
    font-size: 14px;
    font-weight: 800;

    color: var(--color-text);
}

.rv-profile-security-item__text {
    max-width: 500px;

    margin-top: 4px;

    font-size: 12px;
    line-height: 1.45;

    color: var(--color-muted);
}

.rv-profile-security-btn {
    min-width: 170px;

    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 14px;

    border: 1px solid var(--color-border);

    font-size: 13px;
    font-weight: 700;

    transition: var(--transition);
}

.rv-profile-security-btn:hover {
    background: var(--color-border);

    transform: translateY(-1px);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {

    .rv-profile-layout {
        grid-template-columns:
            minmax(220px, 280px)
            minmax(0, 1fr);
    }

    .rv-profile-form-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .rv-profile-page {
        width: 100%;
        max-width: none;
    }

    .rv-profile-layout {
        grid-template-columns: 1fr;

        gap: 16px;
    }

    .rv-profile-main {
        gap: 16px;
    }

    .rv-profile-summary {
        position: static;

        padding: 20px;
    }

    .rv-profile-summary__identity {
        align-items: flex-start;

        text-align: left;
    }

    .rv-profile-avatar {
        width: 62px;
        height: 62px;

        margin-bottom: 13px;

        border-radius: 18px;

        font-size: 28px;
    }

    .rv-profile-summary__name {
        font-size: 20px;
    }

    .rv-profile-summary__role {
        margin-top: 10px;
    }

    .rv-profile-summary__divider {
        margin: 18px 0;
    }

    .rv-profile-card {
        padding: 18px;
    }

    .rv-profile-card__header {
        gap: 12px;

        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .rv-profile-card__header-icon {
        width: 38px;
        height: 38px;

        border-radius: 10px;

        font-size: 17px;
    }

    .rv-profile-card__title {
        font-size: 18px;
    }

    .rv-profile-form-grid {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    .rv-profile-form__footer {
        flex-direction: column;

        align-items: stretch;

        gap: 12px;
    }

    .rv-profile-save-btn {
        width: 100%;

        min-width: 0;
    }

    .rv-profile-security-item {
        flex-direction: column;

        align-items: stretch;

        gap: 14px;
    }

    .rv-profile-security-item__info {
        align-items: flex-start;
    }

    .rv-profile-security-btn {
        width: 100%;

        min-width: 0;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .rv-profile-account-meta__item {
        align-items: flex-start;

        flex-direction: column;

        gap: 4px;
    }

    .rv-profile-account-meta__value {
        text-align: left;
    }

    .rv-profile-security-item__icon {
        width: 36px;
        height: 36px;

        border-radius: 9px;
    }

}


/* =========================================================
   🔐 LOGIN PASSWORD RECOVERY
   ========================================================= */

.rv-login-recovery {
    margin-top: 16px;

    text-align: center;
}

.rv-login-recovery__button {
    border: none;
    background: transparent;

    padding: 6px 8px;

    color: var(--color-primary);

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition: var(--transition);
}

.rv-login-recovery__button:hover {
    color: var(--color-primary-hover);

    text-decoration: underline;
}


/* =========================================================
   RESET MODAL
   ========================================================= */

.rv-login-reset-modal[hidden] {
    display: none !important;
}

.rv-login-reset-modal {
    padding: 20px;
}

.rv-login-reset-modal__content {
    width: 100%;
    max-width: 520px;

    padding: 0;

    overflow: hidden;

    text-align: left;
}

.rv-login-reset-modal__header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 18px;

    padding: 24px 24px 20px;

    border-bottom: 1px solid var(--color-border);
}

.rv-login-reset-modal__eyebrow {
    margin-bottom: 5px;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .1em;
    text-transform: uppercase;

    color: var(--color-primary);
}

.rv-login-reset-modal__title {
    margin: 0;

    font-size: 22px;
    font-weight: 850;

    color: var(--color-text);
}

.rv-login-reset-modal__subtitle {
    margin: 7px 0 0;

    max-width: 390px;

    font-size: 13px;
    line-height: 1.45;

    color: var(--color-muted);
}

.rv-login-reset-modal__close {
    width: 36px;
    height: 36px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--color-border);
    border-radius: 10px;

    background: var(--color-surface-alt);

    color: var(--color-text-light);

    font-size: 23px;
    line-height: 1;

    cursor: pointer;

    transition: var(--transition);
}

.rv-login-reset-modal__close:hover {
    background: var(--color-border);
}


/* =========================================================
   FORM
   ========================================================= */

.rv-login-reset-form {
    padding: 22px 24px 24px;
}

.rv-login-reset-form .rv-form-group {
    gap: 7px;
}

.rv-login-reset-form .rv-form-group label {
    font-size: 12px;
    font-weight: 700;
}

.rv-login-reset-form .rv-form-input {
    width: 100%;

    height: 44px;

    padding: 0 13px;

    text-align: left;

    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);

    background: var(--color-surface);

    color: var(--color-text);

    font-size: 14px;
}

.rv-login-reset-form .rv-form-input:focus {
    outline: none;

    border-color: var(--color-primary);

    box-shadow:
        0 0 0 3px
        var(--color-primary-soft);
}

.rv-login-reset-field-error {
    margin-top: 2px;

    font-size: 12px;

    color: var(--color-danger);
}


/* =========================================================
   SECURITY NOTE
   ========================================================= */

.rv-login-reset-note {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    padding: 12px 14px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    background: var(--color-surface-alt);

    font-size: 12px;
    line-height: 1.45;

    color: var(--color-muted);
}


/* =========================================================
   ACTIONS
   ========================================================= */

.rv-login-reset-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 4px;
}

.rv-login-reset-actions .rv-btn {
    min-width: 150px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-weight: 700;
}


/* =========================================================
   BODY LOCK
   ========================================================= */

body.rv-modal-open {
    overflow: hidden;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .rv-login-reset-modal {
        padding: 0;
    }

    .rv-login-reset-modal__content {
        width: 100vw;
        max-width: none;

        min-height: 100dvh;

        border-radius: 0;
    }

    .rv-login-reset-modal__header {
        padding:
            calc(18px + env(safe-area-inset-top))
            18px
            16px;
    }

    .rv-login-reset-form {
        padding:
            18px
            18px
            calc(18px + env(safe-area-inset-bottom));
    }

    .rv-login-reset-actions {
        flex-direction: column-reverse;
    }

    .rv-login-reset-actions .rv-btn {
        width: 100%;
        min-width: 0;
    }

}

/* =========================================================
   🔐 PROFILE OVERRIDE MODAL
   ========================================================= */

.rv-profile-override-modal[hidden] {
    display: none !important;
}

.rv-profile-override-modal {
    padding: 20px;
}

.rv-profile-override-modal__content {
    width: 100%;
    max-width: 560px;

    padding: 0;

    overflow: hidden;

    text-align: left;
}

.rv-profile-override-modal__header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 18px;

    padding: 24px;

    border-bottom: 1px solid var(--color-border);
}

.rv-profile-override-modal__eyebrow {
    margin-bottom: 5px;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .1em;
    text-transform: uppercase;

    color: var(--color-primary);
}

.rv-profile-override-modal__title {
    margin: 0;

    font-size: 22px;
    font-weight: 850;

    color: var(--color-text);
}

.rv-profile-override-modal__subtitle {
    margin: 7px 0 0;

    font-size: 13px;
    line-height: 1.45;

    color: var(--color-muted);
}

.rv-profile-override-modal__close {
    width: 36px;
    height: 36px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--color-border);
    border-radius: 10px;

    background: var(--color-surface-alt);

    color: var(--color-text-light);

    font-size: 23px;

    cursor: pointer;

    transition: var(--transition);
}

.rv-profile-override-modal__close:hover {
    background: var(--color-border);
}

.rv-profile-override-modal__body {
    padding: 22px 24px 24px;
}

.rv-profile-override-modal .rv-form-input {
    width: 100%;

    height: 44px;

    padding: 0 13px;

    text-align: left;
}

.rv-profile-override-divider {
    height: 1px;

    margin: 24px 0;

    background: var(--color-border);
}

.rv-profile-override-list-header {
    margin-bottom: 14px;
}

.rv-profile-override-list-title {
    font-size: 15px;
    font-weight: 800;

    color: var(--color-text);
}

.rv-profile-override-list-subtitle {
    margin-top: 4px;

    font-size: 12px;

    color: var(--color-muted);
}

.rv-profile-override-list {
    max-height: 260px;

    overflow-y: auto;

    padding-right: 4px;
}

.rv-profile-override-list .rv-override-item {
    margin-bottom: 10px;
}

.rv-profile-override-list .rv-override-item:last-child {
    margin-bottom: 0;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .rv-profile-override-modal {
        padding: 0;
    }

    .rv-profile-override-modal__content {
        width: 100vw;
        max-width: none;

        min-height: 100dvh;

        border-radius: 0;
    }

    .rv-profile-override-modal__header {
        padding:
            calc(18px + env(safe-area-inset-top))
            18px
            16px;
    }

    .rv-profile-override-modal__body {
        padding:
            18px
            18px
            calc(18px + env(safe-area-inset-bottom));
    }

}





.rv-load-wizard-content {
    max-width: 860px;
}


/* ==========================================
   WIZARD STEPS
========================================== */

.rv-load-wizard-step {
    display: none;
}

.rv-load-wizard-step.is-active {
    display: block;
}

.rv-load-wizard-step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.rv-load-wizard-step-number {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--rv-primary, #2563eb);
    color: #fff;

    font-weight: 700;
}


/* ==========================================
   SELLER PICKER
========================================== */

.rv-seller-picker-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;
}

.rv-seller-picker-card {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 16px;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    background: #fff;

    cursor: pointer;

    text-align: left;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}


.rv-seller-picker-card.is-hidden {
    display: none;
}

#sellerLoadNoRoutes.is-hidden {
    display: none;
}

.rv-seller-picker-card:hover {
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.rv-seller-picker-card.is-selected {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.10);
}

.rv-seller-picker-avatar {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #eff6ff;
    color: #1d4ed8;

    font-size: 18px;
    font-weight: 700;
}

.rv-seller-picker-info {
    display: flex;
    flex-direction: column;
    gap: 3px;

    min-width: 0;

    flex: 1;
}

.rv-seller-picker-name {
    font-weight: 700;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rv-seller-picker-meta {
    font-size: 13px;
    color: #64748b;
}

.rv-seller-picker-check {
    width: 26px;
    height: 26px;

    flex: 0 0 26px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #2563eb;
    color: #fff;

    font-weight: 700;

    opacity: 0;
    transform: scale(0.8);

    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}

.rv-seller-picker-card.is-selected
.rv-seller-picker-check {
    opacity: 1;
    transform: scale(1);
}


/* ==========================================
   LOAD MODE
========================================== */

.rv-load-mode-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;
}

.rv-load-mode-card {
    position: relative;

    min-height: 220px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 12px;

    padding: 22px;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    background: #fff;

    text-align: left;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.rv-load-mode-card:hover {
    transform: translateY(-2px);

    border-color: #94a3b8;

    box-shadow:
        0 10px 30px
        rgba(15, 23, 42, 0.08);
}

.rv-load-mode-card--featured {
    border-color: #2563eb;
}

.rv-load-mode-icon {
    font-size: 30px;
}

.rv-load-mode-title {
    font-size: 18px;
    font-weight: 700;
}

.rv-load-mode-description {
    color: #64748b;
    line-height: 1.5;

    flex: 1;
}

.rv-load-mode-action {
    color: #2563eb;
    font-weight: 700;
}

.rv-load-mode-badge {
    position: absolute;

    top: 14px;
    right: 14px;

    padding: 4px 8px;

    border-radius: 999px;

    background: #eff6ff;
    color: #1d4ed8;

    font-size: 11px;
    font-weight: 800;
}


/* ==========================================
   ACTIONS
========================================== */

.rv-load-wizard-actions {
    display: flex;
    justify-content: flex-end;

    margin-top: 24px;
}

.rv-load-wizard-actions--split {
    justify-content: flex-start;
}


/* ==========================================
   BULK WORKSPACE
========================================== */

.rv-bulk-inventory-tabs {
    display: flex;
    gap: 8px;

    margin-bottom: 18px;
}

.rv-bulk-inventory-tab {
    flex: 1;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    padding: 11px 14px;

    background: #fff;

    cursor: pointer;

    font-weight: 700;
}

.rv-bulk-inventory-tab.is-active {
    border-color: #2563eb;

    background: #eff6ff;
    color: #1d4ed8;
}

.rv-bulk-inventory-panel {
    display: none;
}

.rv-bulk-inventory-panel.is-active {
    display: block;
}

.rv-bulk-cart-preview {
    margin-top: 16px;
}

.rv-bulk-seller-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 13px 0;

    border-bottom: 1px solid #eef2f7;
}

.rv-bulk-seller-row:last-child {
    border-bottom: 0;
}

.rv-bulk-seller-row-name {
    font-weight: 600;
}

.rv-bulk-seller-row-quantity {
    white-space: nowrap;
    font-weight: 700;
}

.rv-bulk-workspace-placeholder {
    min-height: 260px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    text-align: center;
}

.rv-bulk-workspace-placeholder-icon {
    font-size: 36px;
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 700px) {

    .rv-seller-picker-grid {
        grid-template-columns: 1fr;
    }

    .rv-load-mode-grid {
        grid-template-columns: 1fr;
    }

    .rv-load-mode-card {
        min-height: 190px;
    }

}




/* =========================================================
   BULK INVENTORY — WAREHOUSE SEARCH
========================================================= */

.rv-bulk-warehouse-workspace {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rv-bulk-search-wrap {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.rv-bulk-search-input {
    width: 100%;
}

.rv-bulk-search-help {
    font-size: 0.82rem;
    color: var(--rv-text-muted);
}

.rv-bulk-search-state {
    min-height: 220px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 8px;

    text-align: center;
}

.rv-bulk-search-state.is-hidden {
    display: none;
}

.rv-bulk-search-state-icon {
    font-size: 2.1rem;
}

.rv-bulk-search-results {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.rv-bulk-product-result {
    display: none;

    width: 100%;

    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 14px 15px;

    border: 1px solid var(--rv-border);
    border-radius: 12px;

    background: var(--rv-surface);

    text-align: left;

    cursor: pointer;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        transform 0.15s ease;
}

.rv-bulk-product-result.is-visible {
    display: flex;
}

.rv-bulk-product-result:hover {
    border-color: var(--rv-primary);

    background: var(--rv-surface-soft);

    transform: translateY(-1px);
}

.rv-bulk-product-result-main {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 4px;
}

.rv-bulk-product-result-name {
    font-weight: 700;

    color: var(--rv-text);
}

.rv-bulk-product-result-meta {
    font-size: 0.8rem;

    color: var(--rv-text-muted);
}

.rv-bulk-product-result-action {
    flex: 0 0 auto;

    color: var(--rv-primary);

    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
   BULK INVENTORY — CART
========================================================= */

.rv-bulk-cart-summary {
    flex: 0 0 auto;

    font-size: 0.82rem;
    font-weight: 700;

    color: var(--rv-text-muted);
}

.rv-bulk-cart-items {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.rv-bulk-cart-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    gap: 14px;

    align-items: center;

    padding: 14px;

    border: 1px solid var(--rv-border);
    border-radius: 12px;

    background: var(--rv-surface);
}

.rv-bulk-cart-product {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 4px;
}

.rv-bulk-cart-product-name {
    font-weight: 700;

    color: var(--rv-text);
}

.rv-bulk-cart-product-meta {
    font-size: 0.8rem;

    color: var(--rv-text-muted);
}

.rv-bulk-cart-controls {
    display: flex;

    align-items: center;

    gap: 7px;
}

.rv-bulk-cart-qty {
    width: 54px;

    text-align: center;

    font-weight: 700;
}

.rv-bulk-cart-control {
    width: 34px;
    height: 34px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border: 1px solid var(--rv-border);
    border-radius: 9px;

    background: var(--rv-surface-soft);

    color: var(--rv-text);

    font-weight: 800;

    cursor: pointer;
}

.rv-bulk-cart-control:hover {
    border-color: var(--rv-primary);
}

.rv-bulk-cart-remove {
    border-color: transparent;

    background: transparent;

    color: var(--rv-danger);

    font-size: 1rem;
}


/* =========================================================
   BULK INVENTORY — SEND BAR
========================================================= */

.rv-bulk-send-bar {
    position: sticky;

    bottom: 0;

    z-index: 5;

    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 8px;

    padding: 14px 18px;

    border-top: 1px solid var(--rv-border);

    background: var(--rv-surface);
}

.rv-bulk-send-button {
    width: min(420px, 100%);
}

.rv-bulk-send-button:disabled {
    opacity: 0.5;

    cursor: not-allowed;
}

.rv-bulk-send-feedback {
    min-height: 20px;

    font-size: 0.85rem;

    text-align: center;

    color: var(--rv-text-muted);
}

.rv-bulk-send-feedback.is-error {
    color: var(--rv-danger);
}

.rv-bulk-send-feedback.is-success {
    color: var(--rv-success);
}


/* =========================================================
   BULK INVENTORY — MOBILE
========================================================= */

@media (max-width: 700px) {

    .rv-bulk-product-result {
        align-items: flex-start;
    }

    .rv-bulk-product-result-action {
        font-size: 0.8rem;
    }


    .rv-bulk-cart-row {
        grid-template-columns: 1fr;
    }

    .rv-bulk-cart-controls {
        width: 100%;

        justify-content: flex-end;
    }

    .rv-bulk-cart-qty {
        flex: 1;

        max-width: 90px;
    }


    .rv-bulk-send-bar {
        padding-left: 12px;
        padding-right: 12px;
    }

}


/* =========================================================
   BULK INVENTORY — WAREHOUSE CATALOG
========================================================= */

.rv-bulk-search-results {
    max-height: 360px;

    overflow-y: auto;

    padding-right: 6px;

    display: flex;
    flex-direction: column;

    gap: 8px;
}

.rv-bulk-product-result {
    flex: 0 0 auto;
}

.rv-bulk-no-results {
    padding: 18px;

    text-align: center;

    color: var(--rv-text-muted);
}

.rv-bulk-no-results.is-hidden {
    display: none;
}


.rv-bulk-product-result-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    flex: 0 0 auto;
}

.rv-bulk-result-qty {
    width: 80px;
    height: 38px;

    padding: 0 10px;

    border: 1px solid var(--rv-border);
    border-radius: 9px;

    text-align: center;

    font: inherit;
    font-weight: 700;
}


.rv-empty-state.is-hidden {
    display: none !important;
}


.rv-bulk-search-input {
    width: 100%;
    min-height: 58px;

    padding: 0 18px;

    border: 2px solid var(--rv-border);
    border-radius: 14px;

    background: var(--rv-surface);

    font: inherit;
    font-size: 1rem;
    font-weight: 600;

    color: var(--rv-text);

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.rv-bulk-search-input::placeholder {
    color: var(--rv-text-muted);
    font-weight: 400;
}

.rv-bulk-search-input:focus {
    border-color: var(--rv-primary);

    box-shadow:
        0 0 0 4px
        rgba(37, 99, 235, 0.10);
}

.rv-bulk-search-wrap {
    margin-bottom: 14px;
}

@media (max-width: 700px) {

    .rv-bulk-search-input {
        min-height: 60px;
        font-size: 16px;
    }

}


.rv-bulk-product-result-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 6px;
}

.rv-bulk-product-sku {
    color: var(--rv-text-muted);
    font-size: 0.95rem;
}

.rv-bulk-stock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 30px;
    padding: 0 12px;

    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.18);

    background: rgba(37, 99, 235, 0.12);
    color: var(--rv-primary);

    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
}


.rv-bulk-result-qty {
    width: 78px;
    height: 42px;

    padding: 0 10px;

    border: 1px solid var(--rv-border);
    border-radius: 8px;
    background: var(--rv-surface);

    text-align: center;

    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--rv-text);

    outline: none;
    box-shadow: none;
}

.rv-bulk-result-qty:focus {
    border-color: var(--rv-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.rv-bulk-qty-btn {
    width: 42px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 10px;

    background: var(--rv-surface-2);
    color: var(--rv-text);

    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;
}

.rv-bulk-qty-btn:hover {
    background: var(--rv-border);
}

.rv-bulk-add-product {
    min-width: 110px;
    min-height: 42px;

    padding-left: 16px;
    padding-right: 16px;
}



.rv-bulk-add-product {
    min-height: 54px;

    padding-left: 18px;
    padding-right: 18px;
}

.rv-bulk-add-product:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}



.rv-bulk-cart-preview {
    min-height: 0;
}

.rv-bulk-cart-scroll {
    max-height: 360px;

    overflow-y: auto;
    overscroll-behavior: contain;

    padding-right: 6px;

    -webkit-overflow-scrolling: touch;
}

@media (max-width: 700px) {

    .rv-bulk-cart-scroll {
        max-height: 42vh;
    }

}

@media (max-width: 700px) {

    .rv-bulk-product-result-controls {
        justify-content: flex-start;
        flex-wrap: wrap;
        margin-top: 12px;
    }

    .rv-bulk-result-qty {
        width: 84px;
        height: 46px;
        font-size: 1.05rem;
    }

    .rv-bulk-qty-btn {
        width: 46px;
        height: 46px;
    }

    .rv-bulk-add-product {
        min-width: 132px;
        min-height: 46px;
    }

}

.rv-bulk-warehouse-cart-status {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-top: 18px;
    padding-top: 0;
}


.rv-bulk-warehouse-cart-status[hidden] {
    display: none;
}

.rv-bulk-view-cart-btn {
    width: min(420px, 100%);
    min-height: 52px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    font-weight: 700;
}


.rv-bulk-view-cart-btn {
    min-width: 280px;
    min-height: 52px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 0 22px;

    font-weight: 700;
    font-size: 0.98rem;

    border-radius: 12px;
}


/* =========================================================
   BULK LOAD - MOBILE VISUAL FIX
   ========================================================= */

/* -----------------------------------------
   Search bar premium
----------------------------------------- */
#bulkWarehouseSearch {
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    border: 2px solid #d9e2f2;
    border-radius: 18px;
    background: #ffffff;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.2;
    color: #1f2937;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#bulkWarehouseSearch::placeholder {
    color: #6b7280;
    font-weight: 500;
}

#bulkWarehouseSearch:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

/* -----------------------------------------
   Stock badge with stronger presence
----------------------------------------- */
.rv-bulk-stock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    white-space: nowrap;
}

/* -----------------------------------------
   Quantity input more touch-friendly
----------------------------------------- */
.rv-bulk-result-qty {
    width: 92px;
    min-width: 92px;
    height: 48px;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    box-sizing: border-box;
    outline: none;
}

.rv-bulk-result-qty:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.rv-bulk-qty-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #eef2f7;
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.rv-bulk-qty-btn:hover {
    background: #e2e8f0;
}

/* -----------------------------------------
   Add button hidden state must not occupy space
----------------------------------------- */
.rv-bulk-add-product[hidden] {
    display: none !important;
}

/* -----------------------------------------
   Desktop / general cleanup
----------------------------------------- */
.rv-bulk-product-result {
    width: 100%;
    box-sizing: border-box;
}

.rv-bulk-product-result-main {
    min-width: 0;
}

.rv-bulk-product-result-name {
    word-break: normal;
    overflow-wrap: break-word;
}

.rv-bulk-product-result-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 768px) {

    /* =========================================
       BODEGA — MISMA ESCALA QUE VENDEDOR
    ========================================= */

    #bulkWarehouseSearch {
        min-height: 44px;

        padding: 0 14px;

        border-radius: 10px;

        font-size: 0.95rem;
    }


    .rv-bulk-search-wrap {
        margin-bottom: 10px;
    }


    .rv-bulk-search-help {
        font-size: 0.78rem;
    }


    /* PRODUCT ROW */

    .rv-bulk-product-result {
        display: none;

        flex-direction: column;

        gap: 10px;

        padding: 12px 10px;

        border-bottom: 1px solid var(--color-border);
    }


    .rv-bulk-product-result.is-visible {
        display: flex;
    }


    .rv-bulk-product-result-main {
        width: 100%;
    }


    .rv-bulk-product-result-name {
        margin-bottom: 4px;

        font-size: 1rem;
        line-height: 1.25;

        font-weight: 700;
    }


    .rv-bulk-product-result-meta {
        gap: 7px;
    }


    .rv-bulk-product-sku {
        font-size: 0.78rem;
    }


    .rv-bulk-stock-badge {
        min-height: 24px;

        padding: 0 9px;

        font-size: 0.78rem;
    }


    /* =========================================
       QUANTITY CONTROLS
       SAME SCALE AS SELLER CART
    ========================================= */

    .rv-bulk-product-result-controls {
        width: 100%;

        display: flex;

        align-items: center;
        justify-content: flex-end;

        gap: 7px;

        margin-top: 2px;
    }


    .rv-bulk-qty-btn {
        width: 34px;
        min-width: 34px;
        height: 34px;

        border-radius: 9px;

        font-size: 1rem;
    }


    .rv-bulk-result-qty {
        width: 88px;
        min-width: 88px;
        height: 34px;

        padding: 0 8px;

        border-width: 1px;
        border-radius: 7px;

        font-size: 0.95rem;
    }


    .rv-bulk-result-qty:focus {
        box-shadow:
            0 0 0 3px
            rgba(37, 99, 235, 0.10);
    }


    /* AGREGAR */

    .rv-bulk-add-product {
        width: auto;

        min-width: 92px;
        min-height: 34px;

        padding: 0 12px;

        border-radius: 7px;

        font-size: 0.82rem;
        font-weight: 700;
    }


    .rv-bulk-add-product[hidden] {
        display: none !important;
    }


    /* LIST SCROLL */

    .rv-bulk-search-results {
        max-height: 42vh;

        overflow-y: auto;
        overflow-x: hidden;

        padding-right: 4px;
    }


    /* VIEW CART */

    .rv-bulk-view-cart-btn {
        width: min(420px, 100%);

        min-height: 40px;

        justify-content: center;

        font-size: 0.85rem;
        font-weight: 700;
    }

}

/* =========================================================
   SELLER INVENTORY REQUEST MODAL
========================================================= */

.rv-inventory-request-modal__content {
    width: min(720px, calc(100% - 32px));
    max-width: 720px;

    max-height: 88vh;

    padding: 22px;

    text-align: left;

    overflow: hidden;
}

.rv-inventory-request-header {
    margin-bottom: 16px;
}

.rv-inventory-request-scroll {
    max-height: calc(88vh - 120px);

    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 6px;
}

.rv-inventory-request-group {
    padding: 16px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    background: var(--color-surface);

    box-shadow: var(--shadow-xs);
}

.rv-inventory-request-group + .rv-inventory-request-group {
    margin-top: 14px;
}

.rv-inventory-request-group--bulk {
    border-color: var(--color-primary);
}

.rv-inventory-request-group__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 14px;

    margin-bottom: 14px;
}

.rv-inventory-request-type {
    font-size: 16px;
    font-weight: 800;

    color: var(--color-text);
}

.rv-inventory-request-items {
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.rv-inventory-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding: 12px 0;
}

.rv-inventory-request-item + .rv-inventory-request-item {
    border-top: 1px solid var(--color-border);
}

.rv-inventory-request-item__product {
    min-width: 0;
}

.rv-inventory-request-item__quantity {
    flex: 0 0 auto;

    display: flex;
    align-items: center;

    gap: 8px;
}

.rv-inventory-request-item__quantity strong {
    min-width: 34px;

    text-align: right;

    font-size: 16px;
}

.rv-inventory-request-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding-top: 12px;

    font-size: 14px;
}

.rv-inventory-request-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin-top: 16px;
}

.rv-inventory-request-actions form,
.rv-inventory-request-actions .rv-btn {
    width: 100%;
}


@media (max-width: 700px) {

    .rv-inventory-request-modal__content {
        width: calc(100% - 20px);

        max-height: 92vh;

        padding: 16px;
    }

    .rv-inventory-request-scroll {
        max-height: calc(92vh - 105px);
    }

    .rv-inventory-request-group {
        padding: 14px;
    }

    .rv-inventory-request-item {
        align-items: flex-start;
    }

    .rv-inventory-request-actions {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   BULK SELLER — COLLAPSIBLE CURRENT INVENTORY
========================================================= */

.rv-bulk-seller-current-card {
    overflow: hidden;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.rv-bulk-seller-current-toggle {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 15px 16px;

    border: 0;

    background: transparent;

    text-align: left;

    color: var(--rv-text);

    cursor: pointer;

    -webkit-tap-highlight-color: transparent;
}


.rv-bulk-seller-current-toggle__icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: rgba(37, 99, 235, 0.10);

    font-size: 1.1rem;
}


.rv-bulk-seller-current-toggle__content {
    min-width: 0;
    flex: 1;

    display: flex;
    flex-direction: column;

    gap: 3px;
}


.rv-bulk-seller-current-toggle__title {
    font-size: 0.95rem;
    font-weight: 700;

    color: var(--rv-text);
}


.rv-bulk-seller-current-toggle__hint {
    font-size: 0.78rem;

    color: var(--rv-text-muted);
}


.rv-bulk-seller-current-toggle__chevron {
    flex: 0 0 auto;

    font-size: 1.15rem;
    font-weight: 800;

    color: var(--rv-text-muted);

    transition:
        transform 0.2s ease;
}


.rv-bulk-seller-current-body {
    max-height: 480px;

    overflow: hidden;

    opacity: 1;

    transition:
        max-height 0.25s ease,
        opacity 0.2s ease;
}


/* COLLAPSED */

.rv-bulk-seller-current-card.is-collapsed
.rv-bulk-seller-current-body {
    max-height: 0;

    opacity: 0;
}


.rv-bulk-seller-current-card.is-collapsed
.rv-bulk-seller-current-toggle__chevron {
    transform: rotate(-90deg);
}


/* INTERACTION */

.rv-bulk-seller-current-toggle:hover {
    background: rgba(37, 99, 235, 0.035);
}


.rv-bulk-seller-current-card:not(.is-collapsed) {
    border-color: rgba(37, 99, 235, 0.32);

    box-shadow:
        0 8px 24px
        rgba(15, 23, 42, 0.06);
}


/* MOBILE */

@media (max-width: 700px) {

    .rv-bulk-seller-current-toggle {
        padding: 13px 14px;
    }


    .rv-bulk-seller-current-toggle__icon {
        width: 36px;
        height: 36px;

        flex-basis: 36px;
    }


    .rv-bulk-seller-current-toggle__title {
        font-size: 0.9rem;
    }


    .rv-bulk-seller-current-toggle__hint {
        font-size: 0.74rem;
    }

}


/* =========================================================
   SINGLE LOAD — ALIGN WITH BULK WORKSPACE
========================================================= */

.rv-single-product-result {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding: 14px 10px;

    border-bottom: 1px solid var(--color-border);
}


.rv-single-product-result.is-hidden {
    display: none;
}


.rv-single-product-result-main {
    min-width: 0;
    flex: 1;
}


.rv-single-product-controls {
    width: auto;
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 7px;

    margin-top: 2px;
}


.rv-single-assign-button {
    min-height: 34px;

    padding-left: 14px;
    padding-right: 14px;
}


.rv-single-assign-button[hidden] {
    display: none !important;
}


@media (max-width: 768px) {

    .rv-single-product-result {
        flex-direction: column;

        align-items: stretch;

        gap: 10px;

        padding: 12px 10px;
    }


    .rv-single-product-controls {
        width: 100%;

        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;

        gap: 7px;
    }


    .rv-single-assign-button {
        min-width: 92px;
    }

}

/* =========================================================
   SINGLE SELLER TAB — ALIGN WITH BULK
========================================================= */

.rv-single-seller-current-card {
    min-height: 0;
}

.rv-single-seller-current-scroll {
    max-height: 46vh;

    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 6px;

    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.rv-single-seller-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 14px 10px;

    border-bottom: 1px solid var(--color-border);
}

.rv-single-seller-item:last-child {
    border-bottom: 0;
}

.rv-single-seller-item__main {
    flex: 1;
    min-width: 0;
}

.rv-single-seller-adjust-form {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 7px;
}

.rv-single-seller-save {
    min-height: 34px;

    padding-left: 14px;
    padding-right: 14px;
}

.rv-single-start-new-load {
    width: min(420px, 100%);

    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 18px auto 0;

    font-weight: 700;
}


@media (max-width: 768px) {

    .rv-single-seller-item {
        flex-direction: column;

        align-items: stretch;

        gap: 10px;

        padding: 12px 10px;
    }

    .rv-single-seller-adjust-form {
        width: 100%;

        justify-content: flex-end;
    }

    .rv-single-seller-save {
        min-width: 92px;
    }

    .rv-single-seller-current-scroll {
        max-height: 48vh;
    }

}


/* =========================================
   SELLER INVENTORY UNLOAD
========================================= */

.rv-seller-unload-bulk-footer {
    margin-top: 16px;
}


.rv-seller-unload-question {
    margin-top: 20px;
    font-weight: 600;
}


.rv-seller-unload-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}


.rv-seller-unload-quantity {
    width: 90px;
    text-align: center;
}


.rv-seller-unload-result {
    margin-top: 14px;
    color: var(--color-muted);
    font-weight: 600;
}


.rv-seller-unload-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}


.rv-seller-full-unload-modal {
    max-width: 520px;
}


.rv-seller-full-unload-list {
    max-height: 320px;
    overflow-y: auto;
    margin-top: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}


.rv-seller-full-unload-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}


.rv-seller-full-unload-item:last-child {
    border-bottom: 0;
}


.rv-seller-full-unload-summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
}


@media (max-width: 768px) {

    .rv-seller-full-unload-summary {
        flex-direction: column;
        gap: 6px;
    }

}

/* =========================================
   SELLER INVENTORY - MOBILE COMPACT
========================================= */

@media (max-width: 768px) {

    .rv-inventory .rv-card {
        padding: 12px;
    }


    .rv-inventory .rv-card__header {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }


    .rv-inventory .rv-table-scroll {
        max-height: 420px;
    }


    .rv-inventory .rv-table thead {
        display: none;
    }


    .rv-inventory .rv-table tbody {
        display: block;
        width: 100%;
    }


    .rv-inventory .rv-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 10px 12px;

        width: 100%;
        padding: 14px 12px;

        border-bottom: 1px solid var(--color-border);
    }


    .rv-inventory .rv-table tr:last-child {
        border-bottom: 0;
    }


    .rv-inventory .rv-table td {
        padding: 0;
        margin: 0;
        border: 0;
        min-width: 0;
    }


    /* PRODUCTO */
    .rv-inventory .rv-table td:nth-child(1) {
        grid-column: 1 / -1;
    }


    .rv-inventory .rv-product-name {
        font-size: 0.9rem;
        line-height: 1.2;
        margin: 0;
    }


    .rv-inventory .rv-text-muted {
        margin-top: 4px;
        font-size: 0.72rem;
        line-height: 1.2;
    }


    /* CANTIDAD */
    .rv-inventory .rv-table td:nth-child(2) {
        grid-column: 1;

        display: flex;
        align-items: center;
        justify-content: flex-start;

        gap: 8px;
        margin: 0;
    }


    .rv-inventory .rv-table td:nth-child(2)::before {
        content: "📦 Cantidad";

        font-size: 0.75rem;
        font-weight: 600;
        color: var(--color-muted);
    }


    .rv-inventory .rv-badge {
        min-width: 38px;

        padding: 6px 10px;

        font-size: 0.8rem;
        text-align: center;
    }


    /* ACCIÓN */
    .rv-inventory .rv-table td:nth-child(3) {
        grid-column: 2;

        display: flex;
        align-items: center;
        justify-content: flex-end;

        margin: 0;
    }


    .rv-inventory .seller-unload-open {
        min-height: 34px;

        padding: 6px 11px;

        font-size: 0.78rem;

        white-space: nowrap;
    }


    /* BULK */
    .rv-seller-unload-bulk-footer {
        margin-top: 12px;
    }


    .rv-seller-unload-bulk-footer .rv-btn {
        min-height: 40px;

        padding: 8px 12px;

        font-size: 0.8rem;
    }

}




/* ====================================== */
/* INVENTORY HISTORY DETAIL */
/* ====================================== */

#inventoryHistoryPendingInventory.is-hidden,
#inventoryHistoryClosedMessage.is-hidden,
#inventoryHistoryCloseButton.is-hidden,
#inventoryHistoryPrintButton.is-hidden,
#inventoryHistoryNoMovements.is-hidden {
    display: none;
}


.rv-inventory-history-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#inventoryHistoryDetailSummary {
    margin-bottom: 16px;
}

#inventoryHistoryDetailInstructions {
    margin-top: 8px;
    line-height: 1.5;
}

#inventoryHistoryDetailActions {
    margin-top: 18px;
}


#inventoryHistoryDetailActions {
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

#inventoryHistoryClosedMessage,
#inventoryHistoryPendingInventory {
    margin-right: auto;
}


/* ====================================== */
/* INVENTORY HISTORY WIZARD */
/* ====================================== */

.rv-history-change-seller {
    margin-left: auto;
    flex: 0 0 auto;
}

.rv-history-details-btn {
    flex: 0 0 auto;
    min-width: 82px;
    padding: 7px 12px;
    white-space: nowrap;
}

@media (max-width: 768px) {

    .rv-history-change-seller {
        min-width: 0;
        padding: 7px 10px;
        font-size: 0.78rem;
    }

    .rv-history-details-btn {
        width: auto;
        min-width: 76px;
        height: auto;
        padding: 7px 10px;
        font-size: 0.8rem;
    }

}



/* =========================================================
   ROUTE VISIT ORDER
========================================================= */

.rv-route-modal__content--order {
    width: min(760px, calc(100vw - 48px));
    max-width: 760px;
    max-height: calc(100vh - 64px);
    padding: 28px 30px 24px;
    overflow: hidden;
}

.rv-route-order-help {
    margin: 8px 0 22px;
    font-size: 0.95rem;
    line-height: 1.55;
    opacity: 0.78;
}

.rv-route-order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 52vh;
    overflow-y: auto;
    margin: 0 -4px 24px 0;
    padding-right: 4px;
}

.rv-route-order-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
}

.rv-route-order-position {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-weight: 700;
    background: rgba(148, 163, 184, 0.14);
}

.rv-route-order-customer {
    min-width: 0;
}

.rv-route-order-customer-name {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.rv-route-order-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 640px) {

    .rv-route-modal__content--order {
        width: calc(100vw - 24px);
        max-width: none;
        max-height: calc(100vh - 24px);
        padding: 22px 18px 18px;
        border-radius: 16px;
    }

    .rv-route-order-help {
        margin-bottom: 18px;
    }

    .rv-route-order-list {
        max-height: 50vh;
        margin-bottom: 20px;
    }

    .rv-route-order-item {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 12px;
    }

    .rv-route-order-actions {
        display: flex;
        gap: 4px;
    }

}


/* =========================================================
   SELLER ROUTE SUGGESTED VISIT ORDER
========================================================= */

.rv-route-order-col {
    width: 84px;
    text-align: center;
}

.rv-route-order-cell {
    text-align: center;
    vertical-align: middle;
}

.rv-route-order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 999px;
    font-weight: 700;
    background: rgba(148, 163, 184, 0.14);
}

@media (max-width: 640px) {

    .rv-route-order-col {
        width: auto;
    }

    .rv-route-order-cell {
        text-align: left;
    }

}


/* =========================================================
   ROUTE SESSION CLOSE PREPARATION
========================================================= */

.rv-prepare-close-modal {
    width: min(680px, calc(100vw - 48px));
    max-width: 680px;
    padding: 28px 30px 26px;
}

.rv-prepare-close-progress {
    margin: 20px 0 12px;
    font-size: 1.05rem;
}

.rv-prepare-close-success,
.rv-prepare-close-warning {
    margin: 0 0 20px;
    line-height: 1.5;
}

.rv-prepare-close-missing {
    margin: 18px 0 22px;
    padding: 16px 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
}

.rv-prepare-close-missing ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.rv-prepare-close-override {
    margin-top: 18px;
}

.rv-hidden {
    display: none !important;
}

.rv-close-preparation-status {
    margin-top: 14px;
}

.rv-close-preparation-heading {
    margin-bottom: 8px;
    font-weight: 700;
}

.rv-close-preparation-coverage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.rv-close-checklist {
    margin-top: 22px;
    padding: 24px;

    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;

    box-shadow: var(--shadow);
}

.rv-close-checklist__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 22px;
}

.rv-close-checklist__header h2 {
    margin: 4px 0 0;
}

.rv-close-checklist__coverage {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;

    margin-top: 12px;

    font-size: 14px;
    color: var(--color-text-light);
}

.rv-close-checklist__coverage-detail {
    color: var(--color-muted);
}

.rv-close-lock {
    white-space: nowrap;
    font-weight: 600;
}

.rv-close-checklist__item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 12px;
}

.rv-close-checklist__item + .rv-close-checklist__item {
    margin-top: 10px;
}

.rv-close-checklist__status {
    font-size: 1.25rem;
    text-align: center;
}

.rv-close-checklist__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.rv-close-checklist__content span {
    opacity: 0.76;
    line-height: 1.4;
}

.rv-close-checklist__item--complete {
    border-width: 2px;
}

.rv-close-checklist__item--placeholder {
    opacity: 0.7;
}

.rv-close-checklist__coming {
    white-space: nowrap;
    font-size: 0.84rem;
    font-weight: 600;
}

@media (max-width: 640px) {

    .rv-prepare-close-modal {
        width: calc(100vw - 24px);
        max-width: none;
        padding: 22px 18px 18px;
    }

    .rv-close-checklist {
        margin-top: 16px;
        padding: 18px 14px;
        border-radius: 14px;
    }

    .rv-close-checklist__header {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 18px;
    }

    .rv-close-lock {
        align-self: flex-start;
    }

    .rv-close-checklist__coverage {
        align-items: flex-start;
        gap: 5px;
    }

    .rv-close-checklist__item {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 12px;
        padding: 16px 14px;
    }

    .rv-close-checklist__item > .rv-btn {
        grid-column: 1 / -1;

        width: 100%;
        min-height: 44px;

        margin-top: 6px;

        display: flex;
        align-items: center;
        justify-content: center;
    }

    .rv-close-checklist__coming {
        grid-column: 2;
        justify-self: start;
    }

}


/* =========================================================
   SELLER FINANCIAL HISTORY REPORT
   ========================================================= */

.rv-financial-history-modal {
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    background: var(--rv-surface, #fff);
    border-radius: 12px;
    overflow: hidden;
}

.rv-financial-history-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #d9e0e8;
    flex-shrink: 0;
}

.rv-financial-history-modal__header h3 {
    margin: 0;
}

.rv-financial-history-modal__body {
    min-height: 0;
    overflow: auto;
    padding: 20px;
}

.rv-financial-history-report {
    width: max-content;
    min-width: 100%;
    margin: 0;
    white-space: pre;
    font-family: monospace;
    line-height: 1.45;
}


/* =========================================================
   MODULE SWITCHER
   Shared visual pattern for module headers
   ========================================================= */

.rv-module-switcher-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 14px 16px;

    background: #fff;
    border: 1px solid #d7dee7;
    border-radius: 12px;

    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.06);
}

.rv-module-switcher-card__identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.rv-module-switcher-card__icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    font-size: 20px;

    background: #fff3c4;
    border-radius: 10px;
}

.rv-module-switcher-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.rv-module-switcher-card__subtitle {
    margin-top: 3px;

    font-size: 13px;
    color: #64748b;
}

.rv-module-switcher {
    display: inline-flex;
    align-items: center;

    padding: 4px;

    border: 1px solid #cbd5e1;
    border-radius: 9px;

    background: #edf2f7;

    flex-shrink: 0;
}

.rv-module-switcher__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 36px;

    padding: 8px 14px;

    border-radius: 7px;

    color: #334155;
    text-decoration: none;

    font-size: 14px;
    font-weight: 600;
}

.rv-module-switcher__item:hover {
    text-decoration: none;
}

.rv-module-switcher__item--active {
    background: #c45b00;
    color: #fff;
}

@media (max-width: 700px) {

    .rv-module-switcher-card {
        align-items: stretch;
        flex-direction: column;
    }

    .rv-module-switcher {
        width: 100%;
    }

    .rv-module-switcher__item {
        flex: 1;
    }
}


.rv-financial-history-modal__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ====================================== */
/* CAMERA CAPTURE */
/* ====================================== */

.rv-camera-reader {
    margin-top: 12px;
}

.rv-camera-video {
    display: block;

    width: 100%;
    min-height: 280px;

    border-radius: var(--radius);

    background: #000;

    object-fit: cover;
}

.rv-camera-actions {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin-top: 10px;
}

.rv-camera-photo {
    display: block;

    width: 100%;

    margin-top: 12px;

    border-radius: var(--radius);

    object-fit: cover;
}


@media (max-width: 768px) {

    .rv-camera-video {
        min-height: 360px;
    }

    .rv-camera-actions {
        grid-template-columns: 1fr;
    }

}

/* ====================================== */
/* CAMERA FOOTER ACTIONS */
/* ====================================== */

.rv-camera-footer-actions {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 10px;

    margin-top: 18px;
}

.rv-camera-footer-actions .rv-btn {
    min-height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
}


/* MOBILE */

@media (max-width: 768px) {

    .rv-camera-footer-actions {
        grid-template-columns: 1fr;
    }

}


/* ====================================== */
/* EXPENSE EVIDENCE */
/* ====================================== */

.rv-expense-evidence-cell {
    text-align: right;
}

.rv-expense-evidence-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    white-space: nowrap;
}


/* MOBILE */

@media (max-width: 768px) {

    .rv-expense-evidence-cell {
        display: flex;
        align-items: center;
        justify-content: flex-end;

        margin-left: auto;
    }

    .rv-expense-evidence-btn {
        min-width: 120px;
        min-height: 40px;
    }

}


/* =========================================
   SELLER PERFORMANCE DASHBOARD
========================================= */

.rv-spd{
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* =========================================
   HERO
========================================= */

.rv-spd-hero{
    padding: 18px;
}

.rv-spd-hero__top{
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rv-spd-hero__title-row{
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.rv-spd-hero__icon{
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary-soft), var(--color-accent-soft));
    font-size: 24px;
    box-shadow: var(--shadow-xs);
    flex-shrink: 0;
}

.rv-spd-hero__title{
    margin: 0;
    font-size: 30px;
    line-height: 1.05;
    font-weight: 800;
    color: var(--color-text);
}

.rv-spd-hero__subtitle{
    margin: 10px 0 0 0;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.45;
}

.rv-spd-selector{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rv-spd-selector__label{
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.rv-spd-selector__control{
    width: 100%;
    max-width: 340px;
}

.rv-spd-selector__select{
    width: 100%;
    height: 44px;
}

/* =========================================
   IDENTITY
========================================= */

.rv-spd-identity{
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rv-spd-identity__main{
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.rv-spd-identity__avatar{
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    flex-shrink: 0;
    font-size: 18px;
}

.rv-spd-identity__content{
    min-width: 0;
}

.rv-spd-identity__name{
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.1;
    word-break: break-word;
}

.rv-spd-identity__meta{
    margin-top: 4px;
    font-size: 14px;
    color: var(--color-muted);
}

.rv-spd-status{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--color-border);
}

.rv-spd-status--active{
    background: var(--color-success-soft);
    color: var(--color-success);
    border-color: rgba(217, 119, 6, 0.25);
}

.rv-spd-status--idle{
    background: var(--color-surface-alt);
    color: var(--color-text-light);
}

/* =========================================
   STATS
========================================= */

.rv-spd-stats{
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.rv-spd-stat{
    position: relative;
    overflow: hidden;
    padding: 18px;
}

.rv-spd-stat::before{
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
}

.rv-spd-stat--primary::before{
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.rv-spd-stat--accent::before{
    background: linear-gradient(90deg, var(--color-accent), var(--color-warning));
}

.rv-spd-stat--route::before{
    background: linear-gradient(90deg, var(--color-text-light), var(--color-border-strong));
}

.rv-spd-stat__eyebrow{
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #566c92;
}

.rv-spd-stat__helper{
    margin-top: 6px;
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.4;
    min-height: 38px;
}

.rv-spd-stat__value{
    margin-top: 16px;
    font-size: 30px;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1;
    word-break: break-word;
}

.rv-spd-stat__chips{
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rv-spd-chip{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-light);
}

.rv-spd-chip--success{
    background: var(--color-success-soft);
    color: var(--color-success);
    border-color: rgba(217, 119, 6, 0.22);
}

.rv-spd-chip--muted{
    background: var(--color-surface-alt);
    color: var(--color-text-light);
}

.rv-spd-route-card__name{
    margin-top: 16px;
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.15;
}

.rv-spd-route-card__helper{
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-muted);
    line-height: 1.45;
}

/* =========================================
   GENERIC PANEL
========================================= */

.rv-spd-panel{
    padding: 18px;
}

.rv-spd-panel__head{
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.rv-spd-panel__title{
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.1;
}

.rv-spd-panel__subtitle{
    margin: 0;
    font-size: 14px;
    color: var(--color-muted);
    line-height: 1.45;
}

/* =========================================
   PROGRESS
========================================= */

.rv-spd-progress{
    padding: 18px;
}

.rv-spd-progress__percent{
    align-self: flex-start;
    font-size: 22px;
    font-weight: 800;
    color: var(--color-primary);
    background: var(--color-primary-soft);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(180, 83, 9, 0.18);
}

.rv-spd-progress__track{
    width: 100%;
    height: 16px;
    background: var(--color-surface-alt);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.rv-spd-progress__fill{
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.18);
}

.rv-spd-progress__legend{
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rv-spd-progress__legend-item{
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow-xs);
}

.rv-spd-progress__legend-value{
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text);
}

.rv-spd-progress__legend-label{
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--color-muted);
}

/* =========================================
   CONTENT GRID
========================================= */

.rv-spd-content{
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.rv-spd-content__main,
.rv-spd-content__side{
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* =========================================
   SESSION SUMMARY
========================================= */

.rv-spd-session__grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.rv-spd-mini-stat{
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-xs);
}

.rv-spd-mini-stat__label{
    font-size: 13px;
    color: var(--color-muted);
    margin-bottom: 6px;
}

.rv-spd-mini-stat__value{
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.15;
    word-break: break-word;
}

/* =========================================
   TABLE
========================================= */

.rv-spd-table-wrap{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rv-spd-table{
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

.rv-spd-table th{
    background: var(--color-surface-alt);
    color: var(--color-text-light);
    font-size: 13px;
    font-weight: 800;
    text-transform: none;
    border-bottom: 1px solid var(--color-border);
}

.rv-spd-table td{
    vertical-align: top;
    background: var(--color-surface);
}

.rv-spd-table tbody tr:hover td{
    background: rgba(148, 163, 184, 0.08);
}

.rv-spd-order-pill{
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--color-text);
}

.rv-spd-customer-cell{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rv-spd-customer-name{
    font-size: 16px;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.2;
}

.rv-spd-customer-address{
    font-size: 14px;
    color: var(--color-muted);
    line-height: 1.45;
}

.rv-spd-status-text{
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.rv-spd-status-text--visited{
    color: var(--color-success);
}

.rv-spd-status-text--pending{
    color: var(--color-primary);
}

.rv-spd-coords{
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}

/* =========================================
   MAP WRAP
========================================= */

.rv-spd-map-wrap{
    display: flex;
    flex-direction: column;
}

.rv-spd-map-wrap .rv-map-card{
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rv-spd-map-wrap .rv-card__header{
    padding: 18px 18px 0 18px;
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text);
}

.rv-spd-map-wrap .rv-map{
    min-height: 360px;
    height: 420px;
}

/* =========================================
   EMPTY STATES
========================================= */

.rv-spd-empty{
    text-align: center;
    padding: 28px 18px;
}

.rv-spd-empty--soft{
    padding: 24px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius);
}

.rv-spd-empty__icon{
    font-size: 30px;
    margin-bottom: 10px;
}

.rv-spd-empty__title{
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text);
}

.rv-spd-empty__text{
    margin: 10px auto 0 auto;
    max-width: 560px;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.55;
}

/* =========================================
   BREAKPOINTS
========================================= */

@media (min-width: 640px){

    .rv-spd-progress__legend{
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rv-spd-session__grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (min-width: 768px){

    .rv-spd{
        gap: 20px;
    }

    .rv-spd-hero{
        padding: 22px;
    }

    .rv-spd-stats{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rv-spd-panel,
    .rv-spd-progress{
        padding: 20px;
    }

}

@media (min-width: 1024px){

    .rv-spd-hero__top{
        flex-direction: row;
        align-items: end;
        justify-content: space-between;
        gap: 24px;
    }

    .rv-spd-selector{
        align-items: flex-start;
        min-width: 320px;
    }

    .rv-spd-identity{
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .rv-spd-stats{
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rv-spd-content{
        grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
        align-items: start;
    }

    .rv-spd-content__side{
        position: sticky;
        top: 20px;
    }

    .rv-spd-session__grid{
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 767px){

    .rv-spd-hero__title{
        font-size: 26px;
    }

    .rv-spd-stat__value{
        font-size: 26px;
    }

    .rv-spd-route-card__name{
        font-size: 22px;
    }

    .rv-spd-progress__percent{
        font-size: 18px;
    }

    .rv-spd-map-wrap .rv-map{
        min-height: 300px;
        height: 320px;
    }

}


/* =========================================================
   SELLER PERFORMANCE - MOBILE STABILITY PATCH
   ========================================================= */

.rv-spd,
.rv-spd-stats,
.rv-spd-content,
.rv-spd-content__main,
.rv-spd-content__side,
.rv-spd-panel,
.rv-spd-session,
.rv-spd-map-wrap,
.rv-spd-table-wrap{
    min-width: 0;
    max-width: 100%;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px){

    /* -----------------------------------------
       PAGE
       ----------------------------------------- */

    .rv-container{
        padding-left: 12px;
        padding-right: 12px;
    }

    .rv-spd{
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        gap: 14px;
    }


    /* -----------------------------------------
       HERO
       ----------------------------------------- */

    .rv-spd-hero{
        padding: 16px;
    }

    .rv-spd-hero__title-row{
        gap: 10px;
    }

    .rv-spd-hero__icon{
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 21px;
    }

    .rv-spd-hero__title{
        font-size: 23px;
    }

    .rv-spd-hero__subtitle{
        font-size: 14px;
    }

    .rv-spd-selector,
    .rv-spd-selector__control{
        width: 100%;
        max-width: none;
    }

    .rv-spd-selector__select{
        width: 100%;
        max-width: 100%;
    }


    /* -----------------------------------------
       KPI CARDS
       ----------------------------------------- */

    .rv-spd-stats{
        grid-template-columns: 1fr;
    }

    .rv-spd-stat{
        width: 100%;
        min-width: 0;
    }


    /* -----------------------------------------
       PROGRESS
       ----------------------------------------- */

    .rv-spd-progress__legend{
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .rv-spd-progress__legend-item{
        min-width: 0;
        padding: 11px 8px;
    }

    .rv-spd-progress__legend-value{
        font-size: 19px;
    }

    .rv-spd-progress__legend-label{
        font-size: 11px;
    }


    /* -----------------------------------------
       JOURNEY SUMMARY
       2 columns instead of one huge vertical list
       ----------------------------------------- */

    .rv-spd-session__grid{
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .rv-spd-mini-stat{
        min-width: 0;
        padding: 12px;
    }

    .rv-spd-mini-stat:first-child{
        grid-column: 1 / -1;
    }

    .rv-spd-mini-stat__label{
        font-size: 12px;
    }

    .rv-spd-mini-stat__value{
        font-size: 18px;
        overflow-wrap: anywhere;
    }


    /* -----------------------------------------
       CUSTOMER TABLE -> MOBILE CARDS
       No horizontal table scrolling
       ----------------------------------------- */

    .rv-spd-table-wrap{
        width: 100%;
        overflow: visible;
    }

    .rv-spd-table{
        min-width: 0;
        width: 100%;
        margin: 0;
    }

    .rv-spd-table thead{
        display: none;
    }

    .rv-spd-table,
    .rv-spd-table tbody,
    .rv-spd-table tr,
    .rv-spd-table td{
        display: block;
        width: 100%;
    }

    .rv-spd-table tbody{
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .rv-spd-table tbody tr{
        position: relative;

        padding: 14px;

        border: 1px solid var(--color-border);
        border-radius: var(--radius);

        background: var(--color-surface);

        box-shadow: var(--shadow-xs);
    }

    .rv-spd-table td{
        padding: 0;
        border: 0;
        background: transparent !important;
    }

    /* Order */
    .rv-spd-table td:nth-child(1){
        margin-bottom: 10px;
    }

    /* Customer */
    .rv-spd-table td:nth-child(2){
        padding-right: 4px;
    }

    /* Status */
    .rv-spd-table td:nth-child(3){
        margin-top: 12px;
    }

    /* Coordinates */
    .rv-spd-table td:nth-child(4){
        margin-top: 6px;

        font-size: 12px;
        color: var(--color-muted);

        overflow-wrap: anywhere;
    }

    .rv-spd-customer-name{
        font-size: 16px;
    }

    .rv-spd-customer-address{
        font-size: 13px;
        line-height: 1.4;
    }

    .rv-spd-status-text{
        white-space: normal;
    }


    /* -----------------------------------------
       MAP
       ----------------------------------------- */

    .rv-spd-map-wrap,
    .rv-spd-map-wrap .rv-map-card{
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .rv-spd-map-wrap .rv-map{
        width: 100%;
        max-width: 100%;

        height: 300px;
        min-height: 300px;

        margin-left: 0;
        margin-right: 0;
    }

}



/* =========================================================
   SELLER PERFORMANCE - CURRENT CASH
   ========================================================= */

.rv-spd-stat__footer{
    margin-top: 14px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 12px;

    flex-wrap: wrap;
}

.rv-spd-stat__footer .rv-spd-stat__chips{
    margin-top: 0;
}


.rv-spd-cash-button{
    min-height: 38px;

    padding: 0 14px;

    border-radius: 999px;

    white-space: nowrap;

    background:
        linear-gradient(
            135deg,
            var(--color-primary),
            var(--color-accent)
        );

    color: #ffffff;

    box-shadow:
        0 5px 14px
        rgba(180, 83, 9, 0.16);
}

.rv-spd-cash-button:hover{
    transform: translateY(-1px);
}


/* =========================================================
   MODAL
   ========================================================= */

.rv-modal-open{
    overflow: hidden;
}


.rv-spd-modal{
    position: fixed;

    inset: 0;

    z-index: 3000;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 18px;
}


.rv-spd-modal.is-open{
    display: flex;
}


.rv-spd-modal__backdrop{
    position: absolute;

    inset: 0;

    background:
        rgba(15, 23, 42, 0.52);

    backdrop-filter: blur(3px);
}


.rv-spd-modal__dialog{
    position: relative;

    z-index: 1;

    width: min(
        1120px,
        100%
    );

    max-height: 88vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background:
        var(--color-surface);

    border:
        1px solid
        var(--color-border);

    border-radius: 18px;

    box-shadow:
        0 24px 70px
        rgba(15, 23, 42, 0.24);
}


.rv-spd-modal__header{
    flex-shrink: 0;

    padding: 18px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    border-bottom:
        1px solid
        var(--color-border);

    background:
        rgba(255, 255, 255, 0.96);

    backdrop-filter: blur(10px);
}


.rv-spd-modal__eyebrow{
    margin-bottom: 3px;

    font-size: 12px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.05em;

    color:
        var(--color-primary);
}


.rv-spd-modal__title{
    margin: 0;

    font-size: 24px;
    font-weight: 800;

    color:
        var(--color-text);
}


.rv-spd-modal__subtitle{
    margin-top: 3px;

    font-size: 13px;

    color:
        var(--color-muted);
}


.rv-spd-modal__close{
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid
        var(--color-border);

    border-radius: 999px;

    background:
        var(--color-surface-alt);

    color:
        var(--color-text);

    font-size: 28px;
    line-height: 1;

    cursor: pointer;
}


.rv-spd-modal__close:hover{
    background:
        var(--color-primary-soft);

    color:
        var(--color-primary);
}


.rv-spd-modal__body{
    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding: 18px;

    background:
        var(--color-background);
}


/* =========================================================
   MODAL LOADING
   ========================================================= */

.rv-spd-modal__loading{
    min-height: 260px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 14px;

    color:
        var(--color-muted);
}


.rv-spd-modal__spinner{
    width: 34px;
    height: 34px;

    border-radius: 999px;

    border:
        3px solid
        var(--color-border);

    border-top-color:
        var(--color-primary);

    animation:
        rvSpdCashSpin
        0.8s linear infinite;
}


@keyframes rvSpdCashSpin{

    to{
        transform: rotate(360deg);
    }

}


/* =========================================================
   CASH CONTEXT
   ========================================================= */

.rv-spd-cash-context{
    margin-bottom: 14px;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;
}


.rv-spd-cash-context > div{
    padding: 12px 14px;

    border:
        1px solid
        var(--color-border);

    border-radius:
        var(--radius);

    background:
        var(--color-surface);
}


.rv-spd-cash-context__label{
    display: block;

    margin-bottom: 4px;

    font-size: 12px;

    color:
        var(--color-muted);
}


.rv-spd-cash-context strong{
    color:
        var(--color-text);
}


/* =========================================================
   FINANCIAL SUMMARY
   ========================================================= */

.rv-cash-summary-card{
    padding: 18px;
}


.rv-cash-summary-card .rv-section-title{
    margin-bottom: 14px;

    font-size: 20px;
    font-weight: 800;
}


.rv-financial-breakdown{
    margin-bottom: 8px;

    overflow: hidden;

    border:
        1px solid
        var(--color-border);

    border-radius:
        var(--radius);

    background:
        var(--color-surface-alt);
}


.rv-financial-breakdown__summary{
    min-height: 58px;

    padding: 10px 14px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    cursor: pointer;

    list-style: none;
}


.rv-financial-breakdown__summary::-webkit-details-marker{
    display: none;
}


.rv-financial-breakdown__label{
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 2px;
}


.rv-financial-breakdown__label > span{
    font-weight: 700;

    color:
        var(--color-text);
}


.rv-financial-breakdown__label small{
    color:
        var(--color-muted);
}


.rv-financial-breakdown__right{
    display: flex;

    align-items: center;

    gap: 12px;

    flex-shrink: 0;
}


.rv-financial-breakdown__right strong{
    color:
        var(--color-text);
}


.rv-financial-breakdown__chevron{
    font-size: 22px;

    transform: rotate(0deg);

    transition:
        transform 0.15s ease;
}


.rv-financial-breakdown[open]
.rv-financial-breakdown__chevron{
    transform:
        rotate(90deg);
}


.rv-financial-breakdown__content{
    margin:
        0 10px 10px 10px;

    padding:
        0 12px;

    border:
        1px solid
        var(--color-border);

    border-radius:
        calc(var(--radius) - 2px);

    background:
        var(--color-surface);
}


.rv-financial-breakdown__item,
.rv-financial-breakdown__total{
    min-height: 46px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding:
        8px 2px;

    border-bottom:
        1px solid
        var(--color-border);
}


.rv-financial-breakdown__item-info{
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 2px;
}


.rv-financial-breakdown__item-info small{
    color:
        var(--color-muted);
}


.rv-financial-breakdown__amount{
    flex-shrink: 0;
}


.rv-financial-breakdown__empty{
    padding: 16px 2px;

    color:
        var(--color-muted);
}


.rv-financial-breakdown__total{
    border-bottom: 0;

    font-weight: 800;
}


/* =========================================================
   FINAL SUMMARY
   ========================================================= */

.rv-financial-summary-final{
    margin-top: 18px;

    padding: 12px 14px;

    border:
        1px solid
        var(--color-border);

    border-radius:
        var(--radius);

    background:
        var(--color-surface-alt);
}


.rv-financial-summary-final
.rv-summary-row{
    min-height: 44px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    border-bottom:
        1px solid
        var(--color-border);
}


.rv-financial-summary-final
.rv-summary-row:last-child{
    border-bottom: 0;
}


.rv-spd-cash-empty,
.rv-spd-cash-error{
    min-height: 300px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 12px;

    text-align: center;
}


.rv-spd-cash-empty__icon{
    font-size: 34px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px){

    .rv-spd-stat__footer{
        align-items: stretch;
    }

    .rv-spd-stat__footer
    .rv-spd-stat__chips{
        width: 100%;
    }

    .rv-spd-cash-button{
        width: 100%;

        min-height: 44px;
    }


    .rv-spd-modal{
        padding: 8px;

        align-items: stretch;
    }


    .rv-spd-modal__dialog{
        width: 100%;

        max-height:
            calc(100dvh - 16px);

        border-radius: 14px;
    }


    .rv-spd-modal__header{
        padding: 14px;

        position: sticky;
        top: 0;

        z-index: 2;
    }


    .rv-spd-modal__title{
        font-size: 20px;
    }


    .rv-spd-modal__body{
        padding: 10px;
    }


    .rv-spd-cash-context{
        grid-template-columns: 1fr;
        gap: 8px;
    }


    .rv-cash-summary-card{
        padding: 12px;
    }


    .rv-financial-breakdown__summary{
        min-height: 62px;

        padding: 10px;
    }


    .rv-financial-breakdown__right{
        gap: 7px;
    }


    .rv-financial-breakdown__item{
        align-items: flex-start;
    }


    .rv-financial-breakdown__amount{
        text-align: right;
    }

}


/* =========================================================
   SELLER PERFORMANCE - VISIT RESULT
   ========================================================= */

.rv-spd-visit-result{
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 30px;

    padding:
        0 11px;

    border-radius:
        999px;

    border:
        1px solid
        var(--color-border);

    font-size: 12px;
    font-weight: 800;

    white-space: nowrap;
}


/* Sale */

.rv-spd-visit-result--sale{
    color: #166534;

    background: #dcfce7;

    border-color: #bbf7d0;
}


.rv-spd-visit-result--sale::before{
    content: "✓";

    margin-right: 6px;
}


/* No sale */

.rv-spd-visit-result--no-sale{
    color: #b45309;

    background: #fef3c7;

    border-color: #fde68a;
}


.rv-spd-visit-result--no-sale::before{
    content: "—";

    margin-right: 6px;
}


/* Closed business */

.rv-spd-visit-result--closed{
    color: #b91c1c;

    background: #fee2e2;

    border-color: #fecaca;
}


.rv-spd-visit-result--closed::before{
    content: "×";

    margin-right: 6px;
}


/* Generic visited */

.rv-spd-visit-result--visited{
    color: #1d4ed8;

    background: #dbeafe;

    border-color: #bfdbfe;
}


/* Pending */

.rv-spd-visit-result--pending{
    color: var(--color-muted);

    background: var(--color-surface-alt);

    border-color: var(--color-border);
}


@media (max-width: 767px){

    .rv-spd-visit-result{
        min-height: 28px;

        padding:
            0 10px;

        font-size: 12px;
    }

}


/* =========================================================
   ADMIN ROUTE SESSIONS
   ========================================================= */


/* =========================================================
   PAGE
   ========================================================= */

.rv-sessions-page{
    max-width:1200px;
}


/* =========================================================
   SELLER PICKER
   ========================================================= */

.rv-sessions-picker{
    padding:22px;
}


.rv-sessions-picker__header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;

    margin-bottom:18px;
}


.rv-sessions-picker__title{
    margin:0;

    color:var(--color-text);

    font-size:20px;
    font-weight:800;
    line-height:1.2;
}


.rv-sessions-picker__subtitle{
    margin:6px 0 0 0;

    color:var(--color-muted);

    font-size:14px;
    line-height:1.45;
}


.rv-sessions-seller-grid{
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}


.rv-sessions-seller-card{
    min-height:82px;
}


.rv-sessions-seller-arrow{
    flex-shrink:0;

    width:30px;
    height:30px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:999px;

    background:var(--color-primary-soft);
    color:var(--color-primary);

    font-size:15px;
    font-weight:900;

    transition:var(--transition-fast);
}


.rv-sessions-seller-card:hover
.rv-sessions-seller-arrow{
    transform:translateX(2px);

    background:var(--color-primary);
    color:white;
}



/* =========================================================
   MODAL
   ========================================================= */

.rv-sessions-modal__content{
    max-width:900px;
}


.rv-sessions-modal-view{
    display:none;
}


.rv-sessions-modal-view.is-active{
    display:block;
}



/* =========================================================
   TOOLBAR
   ========================================================= */

.rv-sessions-toolbar{
    display:flex;
    align-items:center;
    gap:10px;

    margin-bottom:18px;
}


.rv-sessions-search{
    flex:1;
    margin-bottom:0;
}


.rv-sessions-clear{
    min-height:42px;
    white-space:nowrap;
}



/* =========================================================
   LIST HEADER
   ========================================================= */

.rv-sessions-list-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;

    margin-bottom:12px;
}



/* =========================================================
   SESSION LIST
   ========================================================= */

.rv-sessions-list{
    display:flex;
    flex-direction:column;
    gap:12px;
}


.rv-session-card{
    padding:16px 18px;

    border:1px solid var(--color-border);
    border-radius:var(--radius);

    background:var(--color-surface);

    box-shadow:var(--shadow-xs);

    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}


.rv-session-card:hover{
    transform:translateY(-1px);

    border-color:var(--color-border-strong);

    box-shadow:var(--shadow-sm);
}


.rv-session-card[hidden]{
    display:none !important;
}



/* =========================================================
   SESSION CARD HEADER
   ========================================================= */

.rv-session-card__top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
}


.rv-session-card__id{
    color:var(--color-text);

    font-size:16px;
    font-weight:800;
}


.rv-session-card__route{
    margin-top:4px;

    color:var(--color-text-light);

    font-size:14px;
    font-weight:700;
}


.rv-session-card__date{
    margin-top:3px;

    color:var(--color-muted);

    font-size:12px;
}



/* =========================================================
   SESSION STATUS
   ========================================================= */

.rv-session-status{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-height:28px;

    padding:5px 10px;

    border-radius:999px;

    border:1px solid transparent;

    font-size:11px;
    font-weight:800;

    letter-spacing:.02em;

    text-transform:uppercase;

    white-space:nowrap;
}


.rv-session-status--active{
    background:var(--color-success-soft);
    border-color:var(--color-warning);
    color:var(--color-success-hover);
}


.rv-session-status--finished{
    background:var(--color-surface-alt);
    border-color:var(--color-border);
    color:var(--color-text-light);
}


.rv-session-status--planned{
    background:var(--color-primary-soft);
    border-color:var(--color-accent);
    color:var(--color-primary);
}


.rv-session-status--cancelled{
    background:var(--color-danger-soft);
    border-color:var(--color-danger);
    color:var(--color-danger);
}



/* =========================================================
   SESSION CARD STATS
   ========================================================= */

.rv-session-card__stats{
    display:grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap:10px;

    margin-top:14px;
}


.rv-session-card__stat{
    padding:10px 12px;

    border:1px solid var(--color-border);
    border-radius:var(--radius-sm);

    background:var(--color-surface-alt);
}


.rv-session-card__stat-label{
    display:block;

    margin-bottom:4px;

    color:var(--color-muted);

    font-size:11px;
    font-weight:700;
}


.rv-session-card__stat-value{
    display:block;

    color:var(--color-text);

    font-size:14px;
    font-weight:800;
}



/* =========================================================
   SESSION CARD FOOTER
   ========================================================= */

.rv-session-card__footer{
    display:flex;
    justify-content:flex-end;

    margin-top:14px;
    padding-top:12px;

    border-top:1px solid var(--color-border);
}


.rv-session-open{
    min-width:140px;
}



/* =========================================================
   DETAIL BACK BUTTON
   ========================================================= */

.rv-sessions-back{
    display:inline-flex;
    align-items:center;

    margin-bottom:10px;
    padding:0;

    border:none;

    background:transparent;
    color:var(--color-primary);

    font:inherit;
    font-size:13px;
    font-weight:800;

    cursor:pointer;

    transition:var(--transition-fast);
}


.rv-sessions-back:hover{
    color:var(--color-primary-hover);
    transform:translateX(-2px);
}


.rv-sessions-detail-title{
    margin-top:0;
}



/* =========================================================
   DETAIL STATUS
   ========================================================= */

.rv-sessions-detail-status-row{
    display:flex;
    justify-content:flex-end;

    margin-bottom:12px;
}



/* =========================================================
   DETAIL SUMMARY
   ========================================================= */

.rv-sessions-detail-summary{
    padding:18px;
}


.rv-sessions-detail-grid{
    display:grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap:10px;

    margin-top:14px;
}



/* =========================================================
   REPORTS
   ========================================================= */

.rv-sessions-reports{
    margin-top:18px;
}


.rv-sessions-reports__header{
    margin-bottom:12px;
}


.rv-sessions-report-grid{
    display:grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap:14px;
}


.rv-session-report-card{
    display:flex;
    flex-direction:column;

    min-width:0;
    min-height:240px;

    padding:18px;
}


.rv-session-report-card__icon{
    width:48px;
    height:48px;

    display:flex;
    align-items:center;
    justify-content:center;

    margin-bottom:14px;

    border-radius:14px;

    background:
        linear-gradient(
            135deg,
            var(--color-primary-soft),
            var(--color-accent-soft)
        );

    font-size:22px;

    box-shadow:var(--shadow-xs);
}


.rv-session-report-card__content{
    flex:1;
}


.rv-session-report-card__title{
    margin:0;

    color:var(--color-text);

    font-size:17px;
    font-weight:800;
}


.rv-session-report-card__text{
    margin:8px 0 0 0;

    color:var(--color-muted);

    font-size:13px;
    line-height:1.5;
}


.rv-session-report-card__actions{
    display:grid;

    grid-template-columns:
        1fr 1fr;

    gap:8px;

    margin-top:18px;
    padding-top:14px;

    border-top:1px solid var(--color-border);
}


.rv-session-report-card__actions
.rv-btn{
    display:flex;
    align-items:center;
    justify-content:center;

    min-height:42px;

    text-align:center;
}



/* =========================================================
   TABLET
   ========================================================= */

@media (max-width:1000px){

    .rv-sessions-seller-grid{
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .rv-sessions-detail-grid{
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}



/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width:768px){

    .rv-sessions-page{
        width:100%;
        max-width:100%;
    }


    /* SELLERS */

    .rv-sessions-picker{
        padding:16px;
    }


    .rv-sessions-picker__title{
        font-size:18px;
    }


    .rv-sessions-seller-grid{
        grid-template-columns:1fr;
    }


    .rv-sessions-seller-card{
        min-height:72px;
        padding:14px;
    }


    /* MODAL */

    .rv-sessions-modal__content{
        width:calc(100% - 16px);

        max-width:none;
        max-height:96vh;

        padding:15px;
    }


    .rv-sessions-modal
    .rv-inventory-modal__body{
        max-height:
            calc(96vh - 95px);
    }


    /* TOOLBAR */

    .rv-sessions-toolbar{
        align-items:stretch;
        flex-direction:column;

        gap:8px;
    }


    .rv-sessions-clear{
        width:100%;
    }


    /* SESSION CARD */

    .rv-session-card{
        padding:14px;
    }


    .rv-session-card__top{
        gap:10px;
    }


    .rv-session-card__id{
        font-size:15px;
    }


    .rv-session-card__route{
        font-size:13px;
    }


    .rv-session-status{
        padding:4px 8px;

        font-size:10px;
    }


    .rv-session-card__stats{
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap:8px;
    }


    .rv-session-card__stat:last-child{
        grid-column:1 / -1;
    }


    .rv-session-card__footer{
        justify-content:stretch;
    }


    .rv-session-open{
        width:100%;
    }


    /* DETAIL */

    .rv-sessions-detail-status-row{
        justify-content:flex-start;
    }


    .rv-sessions-detail-summary{
        padding:14px;
    }


    .rv-sessions-detail-grid{
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap:8px;
    }


    .rv-sessions-detail-grid
    .rv-spd-mini-stat:first-child{
        grid-column:1 / -1;
    }


    /* REPORTS */

    .rv-sessions-report-grid{
        grid-template-columns:1fr;
    }


    .rv-session-report-card{
        min-height:0;
        padding:16px;
    }


    .rv-session-report-card__actions{
        grid-template-columns:1fr;
    }

}


/* =========================================================
   RETURN PRICING SOURCE
   ========================================================= */

.rv-return-pricing-source {
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.72;
}

.rv-return-pricing-source--legacy {
    opacity: 1;
    font-weight: 700;
}


/* =========================================================
   ROUTE ACTIVATE + HISTORY MODALS
========================================================= */

#activateRouteModal .rv-route-modal__content,
#routeHistoryModal .rv-route-modal__content {
    width: min(760px, calc(100vw - 48px));
    max-width: 760px;
    max-height: calc(100vh - 64px);

    padding: 0;
    overflow: hidden;

    text-align: left;
}


/* =========================================================
   SHARED MODAL HEADER
========================================================= */

#activateRouteModal .rv-route-modal-header,
#routeHistoryModal .rv-route-modal-header {
    padding: 22px 24px 18px;

    border-bottom: 1px solid var(--color-border);
}


/* =========================================================
   ACTIVATE ROUTE MODAL
========================================================= */

#activateRouteModal .rv-route-order-help {
    margin: 0;
    padding: 18px 24px;

    border-bottom: 1px solid var(--color-border);

    background: var(--color-surface-alt);
    color: var(--color-text-light);

    font-size: 14px;
    line-height: 1.55;
    opacity: 1;
}

#activateRouteModal form {
    padding: 20px 24px 22px;
}

#activateRouteModal .rv-form-group {
    gap: 7px;
}

#activateRouteModal textarea.rv-route-form-input {
    min-height: 110px;
    height: auto;

    padding: 12px 14px;

    resize: vertical;
    line-height: 1.45;
}

#activateRouteModal .rv-route-modal-actions {
    margin-top: 20px;
    padding-top: 18px;

    border-top: 1px solid var(--color-border);
}


/* =========================================================
   ROUTE HISTORY MODAL
========================================================= */

#routeHistoryModal .rv-route-candidate-search {
    margin: 16px 24px 14px;
}

#routeHistoryModal .rv-route-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;

    max-height: 48vh;

    margin: 0 24px;
    padding: 2px 4px 2px 0;

    overflow-y: auto;
}

#routeHistoryModal .rv-route-history-item {
    padding: 14px 16px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    background: var(--color-surface);

    box-shadow: var(--shadow-xs);
}

#routeHistoryModal .rv-route-history-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 8px;
}

#routeHistoryModal .rv-route-history-item__title {
    color: var(--color-text);

    font-size: 15px;
    font-weight: 800;
}

#routeHistoryModal .rv-route-history-item__meta {
    margin-bottom: 7px;

    color: var(--color-text-light);

    font-size: 13px;
    font-weight: 600;
}

#routeHistoryModal .rv-route-history-item__detail {
    margin-top: 4px;

    color: var(--color-muted);

    font-size: 12px;
    line-height: 1.45;
}

#routeHistoryModal .rv-route-history-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;
}

#routeHistoryModal .rv-route-history-status--available {
    background: var(--color-success-soft);
    color: var(--color-success);
}

#routeHistoryModal .rv-route-history-status--consumed {
    background: var(--color-surface-alt);
    color: var(--color-text-light);
}

#routeHistoryModal .rv-route-pagination {
    margin: 16px 24px 0;
    padding-top: 14px;
}

#routeHistoryModal .rv-route-modal-actions {
    margin-top: 18px;
    padding: 16px 24px 20px;

    border-top: 1px solid var(--color-border);
}


/* =========================================================
   ROUTE HISTORY STATES
========================================================= */

#routeHistoryModal .rv-route-candidate-state {
    margin: 0 24px;
    padding: 26px 18px;

    text-align: center;

    color: var(--color-muted);
}


/* =========================================================
   SCROLLBAR
========================================================= */

#routeHistoryModal .rv-route-history-list::-webkit-scrollbar {
    width: 8px;
}

#routeHistoryModal .rv-route-history-list::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: 999px;
}

#routeHistoryModal .rv-route-history-list::-webkit-scrollbar-track {
    background: transparent;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 640px) {

    #activateRouteModal .rv-route-modal__content,
    #routeHistoryModal .rv-route-modal__content {
        width: calc(100vw - 24px);
        max-width: none;
        max-height: calc(100vh - 24px);

        border-radius: 16px;
    }


    #activateRouteModal .rv-route-modal-header,
    #routeHistoryModal .rv-route-modal-header {
        padding: 18px 16px 15px;
    }


    #activateRouteModal .rv-route-order-help {
        padding: 16px;
    }


    #activateRouteModal form {
        padding: 16px;
    }


    #routeHistoryModal .rv-route-candidate-search {
        margin: 14px 16px 12px;
    }


    #routeHistoryModal .rv-route-history-list {
        max-height: 52vh;

        margin: 0 16px;
    }


    #routeHistoryModal .rv-route-history-item {
        padding: 12px 13px;
    }


    #routeHistoryModal .rv-route-history-item__header {
        align-items: flex-start;
    }


    #routeHistoryModal .rv-route-pagination {
        margin: 14px 16px 0;
    }


    #routeHistoryModal .rv-route-modal-actions {
        padding: 14px 16px 16px;
    }


    #routeHistoryModal .rv-route-candidate-state {
        margin: 0 16px;
        padding: 22px 14px;
    }

}


/* ============================================================
   PR 5 - CUSTOMER QR STICKER PREVIEW
   ============================================================ */

.rv-customer-sticker {
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 28px 24px 30px;
    text-align: center;
}

.rv-customer-sticker__name {
    margin-bottom: 16px;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--rv-text, #111827);
    word-break: break-word;
}

.rv-customer-sticker__assignment {
    display: grid;
    gap: 6px;
    margin-bottom: 22px;
    font-size: 0.95rem;
    line-height: 1.35;
}

.rv-customer-sticker__assignment > div {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.rv-customer-sticker__assignment span {
    color: var(--rv-text-muted, #64748b);
}

.rv-customer-sticker__assignment strong {
    color: var(--rv-text, #111827);
    font-weight: 700;
}

.rv-customer-sticker__qr {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 18px;
}

.rv-customer-sticker__qr img {
    display: block;
    width: min(100%, 320px);
    height: auto;
    background: #fff;
    border-radius: 16px;
}

.rv-customer-sticker__instruction {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--rv-primary, #c95a00);
}

@media (max-width: 640px) {

    .rv-customer-sticker {
        padding: 22px 16px 24px;
    }

    .rv-customer-sticker__name {
        font-size: 1.2rem;
    }

    .rv-customer-sticker__qr img {
        width: min(100%, 280px);
    }
}


/* ====================================== */
/* PLANNED SESSION ACTIONS */
/* ====================================== */

.rv-planned-session-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.rv-planned-session-actions form {
    margin: 0;
}

@media (max-width: 768px) {
    .rv-planned-session-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .rv-planned-session-actions .rv-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ======================================
   CUSTOMER IMPORT
====================================== */

.rv-customer-import-table-wrap{
    width:100%;
    overflow-x:auto;
}

/* ==========================================================
   CUSTOMER IMPORT PREVIEW
========================================================== */

.rv-import-preview-page{
    max-width:1600px;
}


.rv-import-preview-hero{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;

    padding:24px 26px;

    background:var(--color-surface);
    border:1px solid var(--rv-border-color);
    border-radius:14px;

    box-shadow:var(--shadow);
}


.rv-import-preview-hero__main{
    min-width:0;
}


.rv-import-preview-hero__eyebrow{
    display:inline-flex;
    align-items:center;

    margin-bottom:8px;

    padding:5px 9px;

    border-radius:999px;

    background:var(--color-surface-alt);

    font-size:11px;
    font-weight:800;
    letter-spacing:.08em;
}


.rv-import-preview-hero__title{
    margin:0;

    font-size:30px;
    line-height:1.1;
}


.rv-import-preview-hero__subtitle{
    margin:7px 0 0;

    color:var(--color-text-muted);
}


.rv-import-preview-file{
    display:flex;
    align-items:center;
    gap:12px;

    min-width:260px;

    padding:13px 15px;

    background:var(--color-surface-alt);
    border-radius:12px;
}


.rv-import-preview-file__icon{
    font-size:24px;
}


.rv-import-preview-file__label{
    margin-bottom:2px;

    color:var(--color-text-muted);

    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.05em;
}


.rv-import-preview-file__name{
    max-width:320px;

    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;

    font-weight:700;
}


/* ==========================================================
   SAFETY NOTICE
========================================================== */

.rv-import-preview-notice{
    display:flex;
    align-items:flex-start;
    gap:12px;

    padding:15px 18px;

    border:1px solid var(--rv-border-color);
    border-radius:12px;

    background:var(--color-surface);
}


.rv-import-preview-notice__icon{
    flex:0 0 auto;

    font-size:21px;
}


/* ==========================================================
   SUMMARY CARDS
========================================================== */

.rv-import-preview-summary{
    display:grid;
    grid-template-columns:repeat(7, minmax(0, 1fr));

    gap:10px;
}


.rv-import-preview-stat{
    display:flex;
    flex-direction:column;
    gap:6px;

    min-width:0;

    padding:14px 16px;

    background:var(--color-surface);
    border:1px solid var(--rv-border-color);
    border-radius:12px;
}


.rv-import-preview-stat__label{
    color:var(--color-text-muted);

    font-size:12px;
    font-weight:700;
}


.rv-import-preview-stat__value{
    font-size:24px;
    line-height:1;
}


.rv-import-preview-stat--success{
    border-bottom:3px solid #22c55e;
}


.rv-import-preview-stat--warning{
    border-bottom:3px solid #f59e0b;
}


.rv-import-preview-stat--danger{
    border-bottom:3px solid #ef4444;
}


/* ==========================================================
   PREVIEW TABLE CARD
========================================================== */

.rv-import-preview-card{
    overflow:hidden;

    background:var(--color-surface);

    border:1px solid var(--rv-border-color);
    border-radius:14px;

    box-shadow:var(--shadow);
}


.rv-import-preview-card__header{
    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:18px;

    padding:18px 20px;

    border-bottom:1px solid var(--rv-border-color);
}


.rv-import-preview-card__title{
    font-size:17px;
    font-weight:800;
}


.rv-import-preview-card__subtitle{
    margin-top:3px;

    color:var(--color-text-muted);

    font-size:13px;
}


.rv-import-preview-scroll-hint{
    display:flex;
    align-items:center;
    gap:7px;

    flex:0 0 auto;

    padding:7px 10px;

    background:var(--color-surface-alt);

    border-radius:999px;

    color:var(--color-text-muted);

    font-size:12px;
    font-weight:700;
}


/* ==========================================================
   TABLE SCROLL AREA
========================================================== */

.rv-import-preview-table-shell{
    position:relative;

    width:100%;
}


.rv-import-preview-table-wrap{
    width:100%;

    overflow-x:auto;
    overflow-y:visible;

    overscroll-behavior-x:contain;

    -webkit-overflow-scrolling:touch;

    scrollbar-width:thin;
}


.rv-import-preview-table{
    width:max-content;
    min-width:100%;

    border-collapse:separate;
    border-spacing:0;

    font-size:13px;
}


.rv-import-preview-table th,
.rv-import-preview-table td{
    min-width:120px;

    padding:11px 12px;

    border-bottom:1px solid var(--rv-border-color);

    vertical-align:middle;

    background:var(--color-surface);

    white-space:nowrap;
}


.rv-import-preview-table thead th{
    position:sticky;
    top:0;

    z-index:5;

    background:var(--color-surface-alt);

    color:var(--color-text);

    font-size:11px;
    font-weight:800;

    text-transform:uppercase;
    letter-spacing:.035em;
}


.rv-import-preview-table tbody tr:hover td{
    background:var(--color-surface-alt);
}


/* ==========================================================
   SPECIAL COLUMN WIDTHS
========================================================== */

.rv-import-preview-col-row{
    min-width:68px !important;
    width:68px;
}


.rv-import-preview-cell-business{
    min-width:220px !important;

    font-weight:700;
}


.rv-import-preview-cell-address{
    min-width:260px !important;
}


.rv-import-preview-cell-coordinate{
    min-width:150px !important;

    font-variant-numeric:tabular-nums;
}


/* ==========================================================
   STICKY REVIEW COLUMN
========================================================== */

.rv-import-preview-col-status{
    position:sticky;
    right:0;

    min-width:340px !important;
    width:340px;
    max-width:340px;

    z-index:4;

    white-space:normal !important;

    background:var(--color-surface) !important;

    box-shadow:-10px 0 18px rgba(15, 23, 42, .06);
}


.rv-import-preview-table thead .rv-import-preview-col-status{
    z-index:8;

    background:var(--color-surface-alt) !important;
}


.rv-import-preview-table tbody tr:hover .rv-import-preview-col-status{
    background:var(--color-surface-alt) !important;
}


/* ==========================================================
   REVIEW STATES
========================================================== */

.rv-import-preview-review{
    display:flex;
    flex-direction:column;
    gap:5px;

    line-height:1.3;
}


.rv-import-preview-review__label{
    font-size:11px;
    font-weight:800;

    text-transform:uppercase;
    letter-spacing:.035em;
}


.rv-import-preview-review__message{
    font-size:12px;
}


.rv-import-preview-review--warning{
    padding:9px 10px;

    border-radius:9px;

    background:rgba(245, 158, 11, .10);
}


.rv-import-preview-review--error{
    padding:9px 10px;

    border-radius:9px;

    background:rgba(239, 68, 68, .10);
}


.rv-import-preview-review--ok{
    color:var(--color-text-muted);

    font-size:12px;
    font-weight:700;
}


.rv-import-preview-row--warning td:first-child{
    box-shadow:inset 3px 0 0 #f59e0b;
}


.rv-import-preview-row--error td:first-child{
    box-shadow:inset 3px 0 0 #ef4444;
}


/* ==========================================================
   ACTION BADGES
========================================================== */

.rv-import-preview-action{
    display:inline-flex;

    padding:5px 9px;

    border-radius:999px;

    background:var(--color-surface-alt);

    font-size:11px;
    font-weight:800;
}


.rv-import-preview-action--create{
    background:rgba(34, 197, 94, .12);
}


.rv-import-preview-action--update{
    background:rgba(59, 130, 246, .12);
}


/* ==========================================================
   TABLE FOOTER
========================================================== */

.rv-import-preview-table-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:16px;

    padding:11px 20px;

    background:var(--color-surface-alt);

    color:var(--color-text-muted);

    font-size:12px;
    font-weight:600;
}


.rv-import-preview-actions{
    display:flex;
    justify-content:flex-start;

    padding-bottom:6px;
}


.rv-import-preview-empty{
    padding:40px !important;

    text-align:center;

    color:var(--color-text-muted);
}


/* ==========================================================
   RESPONSIVE CUSTOMER IMPORT PREVIEW
========================================================== */

@media (max-width: 1100px){

    .rv-import-preview-summary{
        grid-template-columns:repeat(4, minmax(0, 1fr));
    }

}


@media (max-width: 700px){

    .rv-import-preview-page{
        padding-left:10px;
        padding-right:10px;
    }


    .rv-import-preview-hero{
        align-items:flex-start;
        flex-direction:column;

        padding:18px;
    }


    .rv-import-preview-hero__title{
        font-size:24px;
    }


    .rv-import-preview-file{
        width:100%;
        min-width:0;
    }


    .rv-import-preview-file__name{
        max-width:220px;
    }


    .rv-import-preview-summary{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }


    .rv-import-preview-card__header{
        align-items:flex-start;
        flex-direction:column;
    }


    .rv-import-preview-scroll-hint{
        width:100%;

        justify-content:center;
    }


    .rv-import-preview-table-wrap{
        touch-action:pan-x pan-y;
    }


    .rv-import-preview-table th,
    .rv-import-preview-table td{
        padding:10px;

        font-size:12px;
    }


    .rv-import-preview-col-status{
        min-width:260px !important;
        width:260px;
        max-width:260px;
    }


    .rv-import-preview-table-footer{
        align-items:flex-start;
        flex-direction:column;

        padding:10px 14px;
    }

}


/* ==========================================================
   CUSTOMER IMPORT PREVIEW
   STICKY REVIEW WINDOW
========================================================== */


/* ==========================================================
   1. PREVIEW WINDOW
========================================================== */

.rv-import-preview-table-shell{
    position:relative;

    width:100%;

    overflow:hidden;

    background:var(--color-surface);

    border-top:1px solid var(--rv-border-color);
    border-bottom:1px solid var(--rv-border-color);
}


/*
The data table behaves like its own preview window.

Vertical and horizontal scrolling happen inside this element.

This keeps:
- column headers visible;
- horizontal scrollbar available;
- review column visible.
*/
.rv-import-preview-table-wrap{
    position:relative;

    width:100%;

    height:min(68vh, 760px);
    min-height:420px;

    overflow:auto;

    overscroll-behavior:contain;

    -webkit-overflow-scrolling:touch;

    scrollbar-width:auto;

    scrollbar-color:
        rgba(71, 85, 105, .55)
        rgba(226, 232, 240, .85);

    scroll-behavior:smooth;
}


/* ==========================================================
   2. PREMIUM NATIVE SCROLLBARS
========================================================== */

.rv-import-preview-table-wrap::-webkit-scrollbar{
    width:14px;
    height:14px;
}


.rv-import-preview-table-wrap::-webkit-scrollbar-track{
    background:rgba(226, 232, 240, .80);

    border-radius:999px;
}


.rv-import-preview-table-wrap::-webkit-scrollbar-thumb{
    background:rgba(71, 85, 105, .48);

    border:3px solid rgba(226, 232, 240, .80);
    border-radius:999px;
}


.rv-import-preview-table-wrap::-webkit-scrollbar-thumb:hover{
    background:rgba(51, 65, 85, .68);
}


.rv-import-preview-table-wrap::-webkit-scrollbar-corner{
    background:var(--color-surface-alt);
}


/* ==========================================================
   3. STICKY COLUMN HEADERS
========================================================== */

.rv-import-preview-table thead{
    position:relative;
    z-index:10;
}


.rv-import-preview-table thead th{
    position:sticky;

    top:0;

    z-index:20;

    background:var(--color-surface-alt);

    box-shadow:
        0 1px 0 var(--rv-border-color),
        0 6px 12px rgba(15, 23, 42, .04);
}


/*
Header for the sticky review column needs to sit above
both regular headings and regular sticky review cells.
*/
.rv-import-preview-table thead .rv-import-preview-col-status{
    position:sticky;

    top:0;
    right:0;

    z-index:40;

    background:var(--color-surface-alt) !important;

    box-shadow:
        -10px 0 18px rgba(15, 23, 42, .08),
        0 1px 0 var(--rv-border-color),
        0 6px 12px rgba(15, 23, 42, .04);
}


/* ==========================================================
   4. STICKY REVIEW COLUMN
========================================================== */

.rv-import-preview-table tbody .rv-import-preview-col-status{
    position:sticky;

    right:0;

    z-index:15;

    background:var(--color-surface) !important;

    box-shadow:
        -12px 0 18px rgba(15, 23, 42, .07);
}


.rv-import-preview-table tbody tr:hover .rv-import-preview-col-status{
    background:var(--color-surface-alt) !important;
}


/*
Soft divider before the sticky review area.

This makes it visually clear that REVIEW is a permanent
control/status panel rather than another Excel column.
*/
.rv-import-preview-col-status::before{
    content:"";

    position:absolute;

    top:0;
    bottom:0;
    left:-1px;

    width:1px;

    background:var(--rv-border-color);
}


/* ==========================================================
   5. STICKY TABLE TOOLBAR
========================================================== */

/*
The top card header remains visually connected with the
preview while the user is inspecting data.
*/
.rv-import-preview-card__header{
    position:sticky;

    top:0;

    z-index:45;

    background:var(--color-surface);

    box-shadow:
        0 1px 0 var(--rv-border-color),
        0 5px 14px rgba(15, 23, 42, .04);
}


/* ==========================================================
   6. SCROLL CTA
========================================================== */

.rv-import-preview-scroll-hint{
    cursor:ew-resize;

    user-select:none;

    border:1px solid var(--rv-border-color);

    box-shadow:
        0 2px 7px rgba(15, 23, 42, .05);

    transition:
        transform .15s ease,
        box-shadow .15s ease;
}


.rv-import-preview-scroll-hint:hover{
    transform:translateY(-1px);

    box-shadow:
        0 5px 12px rgba(15, 23, 42, .08);
}


/* ==========================================================
   7. PREVIEW WINDOW FOOTER
========================================================== */

/*
The old footer is no longer being used as the actual
scroll control. Instead it describes what the permanent
native scrollbar does.
*/
.rv-import-preview-table-footer{
    position:relative;

    z-index:20;

    border-top:1px solid var(--rv-border-color);

    box-shadow:
        0 -5px 14px rgba(15, 23, 42, .03);
}


/* ==========================================================
   8. MOBILE
========================================================== */

@media (max-width:700px){

    /*
    Larger portion of the mobile viewport is dedicated to
    reviewing the spreadsheet.
    */
    .rv-import-preview-table-wrap{
        height:66vh;
        min-height:440px;

        touch-action:auto;
    }


    /*
    Easier finger target for the native scrollbars where
    browsers render them persistently.
    */
    .rv-import-preview-table-wrap::-webkit-scrollbar{
        width:12px;
        height:12px;
    }


    .rv-import-preview-col-status{
        min-width:245px !important;
        width:245px;
        max-width:245px;
    }


    .rv-import-preview-card__header{
        position:relative;
    }


    .rv-import-preview-scroll-hint{
        cursor:default;
    }

}


/* ==========================================================
   CUSTOMER IMPORT PREVIEW
   WARNING UX + REVIEW TOGGLE + CARD SPACING
========================================================== */

.rv-import-preview-page{
    --rv-import-warning:#b45309;
    --rv-import-warning-strong:#92400e;
    --rv-import-warning-soft:rgba(245, 158, 11, .12);
    --rv-import-warning-border:#f59e0b;
}


/* ==========================================================
   VERTICAL BREATHING ROOM
========================================================== */

.rv-import-preview-hero{
    margin-bottom:18px;
}


.rv-import-preview-notice{
    margin-bottom:18px;
}


.rv-import-preview-summary{
    margin-bottom:22px;
}


.rv-import-preview-card{
    margin-bottom:20px;
}


.rv-import-preview-actions{
    margin-top:2px;
}


/* ==========================================================
   WARNING CTA
========================================================== */

.rv-import-preview-review-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    flex:0 0 auto;

    min-height:38px;

    padding:8px 14px;

    border:1px solid var(--rv-import-warning-border);
    border-radius:999px;

    background:var(--rv-import-warning-soft);

    color:var(--rv-import-warning-strong);

    font:inherit;
    font-size:12px;
    font-weight:800;

    cursor:pointer;

    user-select:none;

    box-shadow:
        0 2px 7px rgba(146, 64, 14, .10);

    transition:
        background .16s ease,
        color .16s ease,
        border-color .16s ease,
        transform .16s ease,
        box-shadow .16s ease;
}


.rv-import-preview-review-toggle:hover{
    transform:translateY(-1px);

    background:rgba(245, 158, 11, .18);

    box-shadow:
        0 5px 12px rgba(146, 64, 14, .14);
}


.rv-import-preview-review-toggle:focus-visible{
    outline:3px solid rgba(245, 158, 11, .24);
    outline-offset:2px;
}


.rv-import-preview-review-toggle--active{
    background:var(--rv-import-warning-border);
    border-color:var(--rv-import-warning-border);

    color:#fff;
}


.rv-import-preview-review-toggle--active:hover{
    background:var(--rv-import-warning);
    border-color:var(--rv-import-warning);
}


.rv-import-preview-review-toggle__icon{
    line-height:1;
}


/* ==========================================================
   WARNING ROW DATA
========================================================== */

/*
A row with a warning should visually communicate that state
even while REVIEW remains on the far right.
*/

.rv-import-preview-table
.rv-import-preview-row--warning
td:not(.rv-import-preview-col-status){
    color:var(--rv-import-warning-strong);
}


.rv-import-preview-table
.rv-import-preview-row--warning
.rv-import-preview-cell-business{
    color:var(--rv-import-warning-strong);

    font-weight:800;
}


.rv-import-preview-table
.rv-import-preview-row--warning
td:first-child{
    box-shadow:
        inset 4px 0 0 var(--rv-import-warning-border);
}


/*
Keep warning color visible on hover instead of letting the
generic table hover treatment visually erase the state.
*/
.rv-import-preview-table
.rv-import-preview-row--warning:hover
td:not(.rv-import-preview-col-status){
    color:var(--rv-import-warning-strong);
}


/* ==========================================================
   WARNING PANEL
========================================================== */

.rv-import-preview-review--warning{
    background:var(--rv-import-warning-soft);

    color:var(--rv-import-warning-strong);

    border:1px solid rgba(245, 158, 11, .18);
}


.rv-import-preview-review--warning
.rv-import-preview-review__label{
    color:var(--rv-import-warning-strong);
}


/* ==========================================================
   SHOW / HIDE REVIEW COLUMN
========================================================== */

/*
The last column can be hidden by the review CTA.

Because REVIEW is physically the last column in the table,
the spreadsheet naturally expands into the released space.
*/

.rv-import-preview-table--review-hidden
.rv-import-preview-col-status{
    display:none;
}


/*
When REVIEW is hidden there is no longer a permanent right
panel, so remove unnecessary visual separation.
*/
.rv-import-preview-table--review-hidden{
    padding-right:0;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width:700px){

    .rv-import-preview-hero{
        margin-bottom:14px;
    }


    .rv-import-preview-notice{
        margin-bottom:14px;
    }


    .rv-import-preview-summary{
        margin-bottom:18px;
    }


    .rv-import-preview-card{
        margin-bottom:16px;
    }


    .rv-import-preview-review-toggle{
        width:100%;

        min-height:44px;

        padding:10px 14px;

        border-radius:12px;

        font-size:13px;
    }

}

/* ==========================================================
   CUSTOMER IMPORT
   BLOCKING LOCATION ERRORS
========================================================== */

.rv-import-preview-page{
    --rv-import-error:#b91c1c;
    --rv-import-error-strong:#991b1b;
    --rv-import-error-soft:rgba(239, 68, 68, .10);
    --rv-import-error-border:#ef4444;
}


.rv-import-preview-table
.rv-import-preview-row--error
td:not(.rv-import-preview-col-status){
    color:var(--rv-import-error-strong);
}


.rv-import-preview-table
.rv-import-preview-row--error
.rv-import-preview-cell-business{
    color:var(--rv-import-error-strong);

    font-weight:800;
}


.rv-import-preview-review--error{
    background:var(--rv-import-error-soft);

    color:var(--rv-import-error-strong);

    border:1px solid rgba(239, 68, 68, .22);
}


.rv-import-preview-review--error
.rv-import-preview-review__label{
    color:var(--rv-import-error-strong);
}


.rv-import-coordinate-resolve-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;

    width:100%;

    margin-top:8px;
    padding:9px 12px;

    border:0;
    border-radius:9px;

    background:var(--rv-import-error-border);

    color:#fff;

    font:inherit;
    font-size:12px;
    font-weight:800;

    cursor:pointer;

    transition:
        transform .15s ease,
        background .15s ease,
        box-shadow .15s ease;
}


.rv-import-coordinate-resolve-btn:hover{
    transform:translateY(-1px);

    background:var(--rv-import-error-strong);

    box-shadow:
        0 5px 12px rgba(153, 27, 27, .16);
}


.rv-import-coordinate-resolve-btn:focus-visible{
    outline:3px solid rgba(239, 68, 68, .22);
    outline-offset:2px;
}


/* ==========================================================
   CUSTOMER IMPORT
   LOCATION RESOLUTION
========================================================== */

.rv-import-preview-page{
    --rv-import-resolved:#15803d;
    --rv-import-resolved-soft:rgba(34, 197, 94, .10);
    --rv-import-resolved-border:#22c55e;
}


/* ==========================================================
   MODAL
========================================================== */

.rv-import-location-modal{
    position:fixed;
    inset:0;

    z-index:9999;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:20px;
}


.rv-import-location-modal.rv-hidden{
    display:none;
}


.rv-import-location-modal__backdrop{
    position:absolute;
    inset:0;

    background:rgba(15, 23, 42, .55);
    backdrop-filter:blur(3px);
}


.rv-import-location-modal__panel{
    position:relative;

    z-index:1;

    display:flex;
    flex-direction:column;

    width:min(760px, 100%);
    max-height:92vh;

    overflow:hidden;

    background:var(--color-surface);

    border:1px solid var(--rv-border-color);
    border-radius:18px;

    box-shadow:
        0 24px 70px rgba(15, 23, 42, .24);
}


.rv-import-location-modal__header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;

    padding:20px 22px;

    border-bottom:1px solid var(--rv-border-color);
}


.rv-import-location-modal__eyebrow{
    margin-bottom:5px;

    color:var(--color-text-muted);

    font-size:10px;
    font-weight:800;

    letter-spacing:.08em;
}


.rv-import-location-modal__title{
    margin:0;

    font-size:22px;
}


.rv-import-location-modal__customer{
    margin-top:5px;

    color:var(--color-text-muted);

    font-size:13px;
}


.rv-import-location-modal__close{
    display:flex;
    align-items:center;
    justify-content:center;

    width:36px;
    height:36px;

    border:0;
    border-radius:50%;

    background:var(--color-surface-alt);

    color:var(--color-text);

    font-size:24px;

    cursor:pointer;
}


.rv-import-location-modal__body{
    overflow-y:auto;

    padding:20px 22px;
}


.rv-import-location-label{
    display:block;

    margin-bottom:7px;

    font-size:12px;
    font-weight:800;
}


.rv-import-location-search-row{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;

    gap:8px;
}


.rv-import-location-source-address{
    margin-top:7px;

    color:var(--color-text-muted);

    font-size:11px;
}


.rv-import-location-map{
    width:100%;
    height:380px;

    margin-top:16px;

    overflow:hidden;

    border:1px solid var(--rv-border-color);
    border-radius:12px;

    background:var(--color-surface-alt);
}


.rv-import-location-help{
    margin-top:10px;

    color:var(--color-text-muted);

    font-size:12px;
}


.rv-import-location-coordinates{
    display:grid;
    grid-template-columns:1fr 1fr;

    gap:10px;

    margin-top:14px;
}


.rv-import-location-coordinates > div{
    padding:11px 13px;

    background:var(--color-surface-alt);

    border-radius:10px;
}


.rv-import-location-coordinates span{
    display:block;

    margin-bottom:3px;

    color:var(--color-text-muted);

    font-size:10px;
    font-weight:800;

    text-transform:uppercase;
}


.rv-import-location-coordinates strong{
    font-variant-numeric:tabular-nums;
}


.rv-import-location-status{
    margin-top:12px;

    padding:10px 12px;

    border-radius:9px;

    background:var(--color-surface-alt);

    font-size:12px;
    font-weight:700;
}


.rv-import-location-status--resolved{
    background:var(--rv-import-resolved-soft);

    color:var(--rv-import-resolved);
}


.rv-import-location-modal__footer{
    display:flex;
    justify-content:flex-end;
    gap:10px;

    padding:15px 22px;

    border-top:1px solid var(--rv-border-color);

    background:var(--color-surface);
}


/* ==========================================================
   RESOLVED ROW
========================================================== */

.rv-import-preview-table
.rv-import-preview-row--resolved
td:not(.rv-import-preview-col-status){
    color:var(--rv-import-resolved);
}


.rv-import-preview-table
.rv-import-preview-row--resolved
td:first-child{
    box-shadow:
        inset 4px 0 0 var(--rv-import-resolved-border);
}


.rv-import-preview-review--resolved{
    padding:9px 10px;

    border:1px solid rgba(34, 197, 94, .22);
    border-radius:9px;

    background:var(--rv-import-resolved-soft);

    color:var(--rv-import-resolved);
}


.rv-import-preview-review--resolved
.rv-import-preview-review__label{
    color:var(--rv-import-resolved);

    font-weight:800;
}


.rv-import-coordinate-edit-btn{
    width:100%;

    margin-top:8px;
    padding:8px 10px;

    border:1px solid var(--rv-import-resolved-border);
    border-radius:8px;

    background:transparent;

    color:var(--rv-import-resolved);

    font:inherit;
    font-size:11px;
    font-weight:800;

    cursor:pointer;
}


.rv-import-coordinate-edit-btn:hover{
    background:var(--rv-import-resolved-soft);
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width:700px){

    .rv-import-location-modal{
        align-items:flex-end;

        padding:0;
    }


    .rv-import-location-modal__panel{
        width:100%;
        max-height:94vh;

        border-radius:18px 18px 0 0;
    }


    .rv-import-location-modal__body{
        padding:16px;
    }


    .rv-import-location-map{
        height:330px;
    }


    .rv-import-location-search-row{
        grid-template-columns:1fr;
    }


    .rv-import-location-coordinates{
        grid-template-columns:1fr 1fr;
    }


    .rv-import-location-modal__footer{
        padding:12px 16px;
    }


    .rv-import-location-modal__footer .rv-btn{
        flex:1;
    }

}



/* ==========================================================
   PR6 - CUSTOMER IMPORT CONFIRMATION MODAL
========================================================== */

.rv-import-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
}

.rv-import-confirm-modal.rv-hidden {
    display: none;
}

.rv-import-confirm-modal__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}

.rv-import-confirm-modal__panel {
    position: relative;
    z-index: 1;

    width: min(600px, 100%);
    max-height: 90vh;
    overflow-y: auto;

    background: var(--color-surface, #ffffff);
    color: var(--color-text, #1e293b);

    border: 1px solid var(--rv-border-color, #e2e8f0);
    border-radius: 18px;

    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

.rv-import-confirm-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;

    padding: 22px;
    border-bottom: 1px solid var(--rv-border-color, #e2e8f0);
}

.rv-import-confirm-modal__eyebrow {
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--color-text-muted, #64748b);
}

.rv-import-confirm-modal__title {
    margin: 0;
    font-size: 22px;
}

.rv-import-confirm-modal__close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;

    border: 0;
    border-radius: 50%;

    background: var(--color-surface-alt, #f1f5f9);
    color: var(--color-text, #1e293b);

    font-size: 24px;
    cursor: pointer;
}

.rv-import-confirm-modal__body {
    padding: 22px;
}

.rv-import-confirm-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.rv-import-confirm-stat {
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    background: var(--color-surface-alt, #f8fafc);
}

.rv-import-confirm-stat span,
.rv-import-confirm-stat small {
    display: block;
    font-size: 12px;
}

.rv-import-confirm-stat strong {
    display: block;
    margin: 8px 0;
    font-size: 32px;
    font-weight: 800;
}

.rv-import-confirm-stat--success strong {
    color: #16a34a;
}

.rv-import-confirm-stat--blocked strong {
    color: #dc2626;
}

.rv-import-confirm-warning {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #fbbf24;
    border-radius: 10px;
    background: #fffbeb;
    color: #92400e;
    font-size: 13px;
}

.rv-import-confirm-warning[hidden] {
    display: none;
}

.rv-import-confirm-info {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
}

.rv-import-confirm-note {
    padding: 14px;
    border-radius: 10px;
    background: var(--color-surface-alt, #f1f5f9);
    font-size: 13px;
    line-height: 1.5;
}

.rv-import-confirm-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 16px 22px;
    border-top: 1px solid var(--rv-border-color, #e2e8f0);
}

@media (max-width: 600px) {
    .rv-import-confirm-modal {
        padding: 12px;
    }

    .rv-import-confirm-summary {
        grid-template-columns: 1fr 1fr;
    }

    .rv-import-confirm-modal__footer {
        flex-direction: column-reverse;
    }

    .rv-import-confirm-modal__footer .rv-btn {
        width: 100%;
    }
}


/* =========================================================
   CUSTOMER IMPORT — HISTORY
   PR6 / ADDENDUM
   ========================================================= */

.rv-customer-import-history__table {
    width: 100%;
    min-width: 980px;
}

.rv-customer-import-history__table th,
.rv-customer-import-history__table td {
    vertical-align: middle;
}

.rv-customer-import-history__table td:last-child {
    white-space: nowrap;
}

.rv-customer-import-history__empty {
    padding: 32px 20px;
    text-align: center;
    color: var(--rv-text-muted, #64748b);
}

/* =========================================================
   END CUSTOMER IMPORT — HISTORY
   ========================================================= */




/* =========================================================
   PR6 — CUSTOMER IMPORT BATCH DETAIL
   ADDENDUM
   ========================================================= */

.rv-batch-detail {
    min-width: 0;
}

.rv-batch-card {
    min-width: 0;
    overflow: hidden;
    background: var(--rv-surface, #fff);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 18px;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .04);
}

.rv-batch-heading,
.rv-batch-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 22px 24px;
}

.rv-batch-heading h1 {
    margin: 8px 0;
    font-size: 24px;
}

.rv-batch-section-heading h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rv-batch-section-heading p,
.rv-batch-filename,
.rv-batch-meta,
.rv-batch-rollback-note {
    color: #64748b;
}

.rv-batch-filename {
    margin: 0 0 8px;
    font-weight: 600;
}

.rv-batch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}

.rv-batch-back {
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
}

.rv-batch-heading__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.rv-batch-status,
.rv-batch-action {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.rv-batch-status--success,
.rv-batch-action--created {
    color: #047857;
    background: #dcfce7;
}

.rv-batch-status--neutral,
.rv-batch-action--updated {
    color: #475569;
    background: #e2e8f0;
}

.rv-batch-action--skipped {
    color: #b45309;
    background: #fef3c7;
}

.rv-batch-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 0 24px 18px;
}

.rv-batch-summary__item {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 16px;
    background: #f1f5f9;
    border-radius: 10px;
    border-bottom: 3px solid transparent;
}

.rv-batch-summary__item span {
    font-size: 12px;
    color: #64748b;
}

.rv-batch-summary__item strong {
    font-size: 26px;
}

.rv-batch-summary__item--created {
    border-bottom-color: #22c55e;
}

.rv-batch-summary__item--skipped {
    border-bottom-color: #ef4444;
}

.rv-batch-rollback-note {
    padding: 0 24px 20px;
    margin: 0;
    font-size: 13px;
}

.rv-batch-filters {
    padding: 0 24px 18px;
}

.rv-batch-filters__label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
}

.rv-batch-filters__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
}

.rv-batch-filters__row .rv-form-input {
    flex: 1 1 260px;
    min-width: 0;
}

.rv-batch-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rv-batch-filter-tabs__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.rv-batch-filter-tabs__button:hover {
    background: #f1f5f9;
}

.rv-batch-filter-tabs__button--active {
    color: #fff;
    border-color: #c45100;
    background: #c45100;
}

.rv-batch-filter-tabs__button--active:hover {
    background: #a84300;
}

.rv-batch-filter-tabs__button span {
    font-weight: 700;
}

.rv-batch-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.rv-batch-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rv-batch-table th {
    padding: 13px 15px;
    text-align: left;
    background: #e2e8f0;
    color: #334155;
    white-space: nowrap;
    font-size: 11px;
    text-transform: uppercase;
}

.rv-batch-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.rv-batch-table tbody tr:hover {
    background: #f8fafc;
}

.rv-batch-table__code {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rv-batch-table__name {
    min-width: 190px;
    font-weight: 600;
}

.rv-batch-observation {
    color: #b45309;
    font-weight: 600;
}

.rv-batch-observation--error {
    color: #b91c1c;
}

.rv-batch-observation--clear {
    color: #94a3b8;
}

.rv-batch-empty {
    text-align: center;
    padding: 32px 16px !important;
    color: #64748b;
}

.rv-batch-audit-data[hidden] {
    display: none !important;
}

.rv-batch-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px 24px;
}

.rv-batch-pagination__info {
    font-size: 13px;
    color: #64748b;
}

.rv-batch-pagination__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.rv-batch-pagination__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: 13px;
}

a.rv-batch-pagination__button:hover {
    background: #f1f5f9;
}

.rv-batch-pagination__button--active {
    color: #fff;
    background: #c45100;
    border-color: #c45100;
}

.rv-batch-pagination__ellipsis {
    padding: 0 5px;
    color: #94a3b8;
}

/* Audit modal */

.rv-batch-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rv-batch-modal.rv-hidden {
    display: none !important;
}

.rv-batch-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .6);
}

.rv-batch-modal__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(920px, 100%);
    max-height: min(88vh, 900px);
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .22);
}

.rv-batch-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.rv-batch-modal__header h2 {
    margin: 4px 0 0;
    font-size: 20px;
}

.rv-batch-modal__eyebrow {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    letter-spacing: .08em;
    font-weight: 700;
}

.rv-batch-modal__close {
    border: 0;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #e2e8f0;
    font-size: 24px;
    cursor: pointer;
}

.rv-batch-modal__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 24px;
}

.rv-batch-audit-data__heading {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 18px;
}

.rv-batch-audit-data__heading strong {
    font-size: 19px;
}

.rv-batch-audit-data__heading span {
    color: #64748b;
    font-size: 13px;
}

.rv-batch-audit-data__section {
    margin-bottom: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    overflow: hidden;
}

.rv-batch-audit-data__section h3 {
    margin: 0;
    padding: 10px 14px;
    background: #f1f5f9;
    font-size: 13px;
}

.rv-batch-audit-data__section pre {
    margin: 0;
    padding: 14px;
    max-height: 300px;
    overflow: auto;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.rv-batch-modal__footer {
    display: flex;
    justify-content: flex-end;
    padding: 14px 24px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 700px) {
    .rv-batch-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rv-batch-table {
        min-width: 780px;
    }

    .rv-batch-heading,
    .rv-batch-section-heading {
        padding: 18px;
    }

    .rv-batch-filters {
        padding: 0 18px 18px;
    }

    .rv-batch-pagination {
        padding: 16px;
    }

    .rv-batch-modal {
        padding: 10px;
    }

    .rv-batch-modal__panel {
        max-height: 94vh;
    }
}

/* =========================================================
   END PR6 — CUSTOMER IMPORT BATCH DETAIL
   ========================================================= */



/* =========================================================
   PR6 — BATCH SEARCH REFINEMENT
   ========================================================= */

.rv-batch-filters__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: stretch;
    gap: 10px;
}

.rv-batch-filters__row .rv-batch-search-input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 42px;
    box-sizing: border-box;
    padding: 0 16px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background-color: #f8fafc;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    text-align: left;
    outline: none;
    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background-color .15s ease;
}

.rv-batch-filters__row .rv-batch-search-input:focus {
    background-color: #fff;
    border-color: #c45100;
    box-shadow: 0 0 0 3px rgba(196, 81, 0, .12);
}

.rv-batch-filters__row .rv-batch-search-input::placeholder {
    color: #94a3b8;
}

.rv-batch-filters__row .rv-btn {
    min-height: 42px;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .rv-batch-filters__row {
        grid-template-columns: 1fr 1fr;
    }

    .rv-batch-filters__row .rv-batch-search-input {
        grid-column: 1 / -1;
    }
}

/* END PR6 — BATCH SEARCH REFINEMENT */


/* =========================================================
   PR6 — BATCH FILTER LINKS
   ========================================================= */

.rv-batch-filter-tabs a.rv-batch-filter-tabs__button {
    text-decoration: none;
}

.rv-batch-filter-tabs a.rv-batch-filter-tabs__button:hover {
    text-decoration: none;
}

.rv-batch-filter-tabs a.rv-batch-filter-tabs__button:focus-visible {
    outline: 2px solid #c45100;
    outline-offset: 3px;
}

/* END PR6 — BATCH FILTER LINKS */



/* =========================================================
   PR6 — LIVE BATCH SEARCH
   ADDENDUM
   ========================================================= */

.rv-batch-filters__row {
    display: block;
}

.rv-batch-filters__row .rv-batch-search-input {
    display: block;
    width: 100%;
    height: 44px;
    min-width: 0;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    text-align: left;
    box-sizing: border-box;
}

.rv-batch-filters__row .rv-batch-search-input:focus {
    background: #fff;
    border-color: #c45100;
    outline: none;
    box-shadow: 0 0 0 3px rgba(196, 81, 0, .12);
}

.rv-batch-filters__row .rv-batch-search-input::-webkit-search-cancel-button {
    cursor: pointer;
}

.rv-batch-table-scroll[aria-busy="true"] {
    opacity: .55;
    transition: opacity .15s ease;
}

/* =========================================================
   END PR6 — LIVE BATCH SEARCH
   ========================================================= */



/* ======================================================
   PR6 — BATCH ROLLBACK VERIFICATION MODAL
   ====================================================== */

.rv-batch-rollback-modal[hidden] {
    display: none;
}

.rv-batch-rollback-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rv-batch-rollback-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
}

.rv-batch-rollback-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 14px;
    background: var(--rv-surface, #fff);
    color: var(--rv-text, #172033);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.rv-batch-rollback-modal__header,
.rv-batch-rollback-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
}

.rv-batch-rollback-modal__header {
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.rv-batch-rollback-modal__header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.rv-batch-rollback-modal__content {
    padding: 20px 22px;
}

.rv-batch-rollback-modal__content p {
    margin: 0 0 12px;
    line-height: 1.55;
}

.rv-batch-rollback-modal__footer {
    justify-content: flex-end;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
}



/* ======================================================
   PR6 — ROLLBACK CONFIRMATION
   ====================================================== */

.rv-batch-rollback-confirmation[hidden] {
    display: none;
}

.rv-batch-rollback-confirmation {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.rv-batch-rollback-confirmation label {
    font-size: 0.875rem;
    line-height: 1.5;
}

.rv-batch-rollback-confirmation__input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
}

.rv-batch-rollback-confirmation__input:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.rv-batch-rollback-confirmation .rv-btn--danger {
    align-self: flex-end;
}

.rv-batch-rollback-modal__footer {
    flex-wrap: wrap;
}



/* =====================================================
   CUSTOMER IMPORT — FINAL CONFIRMATION
   ===================================================== */

.rv-import-final-check {
    margin: 16px 0;
    padding: 20px;
    border: 1px solid #f2d29a;
    border-radius: 12px;
    background: #fffaf0;
}

.rv-import-final-check h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 700;
}

.rv-import-final-check > p {
    margin: 0 0 14px;
    line-height: 1.5;
}

.rv-import-final-check__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.rv-import-final-check__summary p {
    margin: 0;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #f0e4cd;
    font-weight: 600;
}

.rv-import-final-check__warning {
    font-weight: 700;
}

.rv-import-final-check__actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 600px) {
    .rv-import-final-check {
        padding: 14px;
    }

    .rv-import-final-check__summary {
        grid-template-columns: 1fr;
    }

    .rv-import-final-check__actions {
        flex-direction: column;
    }

    .rv-import-final-check__actions .rv-btn {
        width: 100%;
    }
}



/* =====================================================
   CUSTOMER IMPORT HISTORY — RESPONSIVE
   ===================================================== */

.rv-customer-import-history__desktop {
    display: block;
    width: 100%;
    min-width: 0;
}

.rv-customer-import-history__mobile {
    display: none;
}

.rv-customer-import-history__table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.79rem;
}

.rv-customer-import-history__table th,
.rv-customer-import-history__table td {
    padding: 13px 6px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    overflow-wrap: anywhere;
}

.rv-customer-import-history__table th {
    background: #e2e8f0;
    color: #213047;
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
}

.rv-customer-import-history__table th:nth-child(1) { width: 5%; }
.rv-customer-import-history__table th:nth-child(2) { width: 10%; }
.rv-customer-import-history__table th:nth-child(3) { width: 19%; }
.rv-customer-import-history__table th:nth-child(4) { width: 10%; }
.rv-customer-import-history__table th:nth-child(5) { width: 10%; }
.rv-customer-import-history__table th:nth-child(6) { width: 7%; }
.rv-customer-import-history__table th:nth-child(7) { width: 7%; }
.rv-customer-import-history__table th:nth-child(8) { width: 9%; }
.rv-customer-import-history__table th:nth-child(9) { width: 8%; }
.rv-customer-import-history__table th:nth-child(10) { width: 15%; }

.rv-customer-import-history__table td small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 0.72rem;
}

.rv-customer-import-history__filename,
.rv-customer-import-history__username {
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.rv-customer-import-history__status {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    background: #e2e8f0;
    color: #475569;
}

.rv-customer-import-history__status--imported {
    background: #d1fae5;
    color: #065f46;
}

.rv-customer-import-history__status--reverted {
    background: #e2e8f0;
    color: #475569;
}

.rv-customer-import-history__details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    max-width: 100%;
    padding: 8px 9px;
    font-size: 0.75rem;
}

.rv-customer-import-history__empty {
    text-align: center;
    padding: 30px 16px;
    color: #64748b;
}

@media (max-width: 1050px) {
    .rv-customer-import-history__desktop {
        display: none;
    }

    .rv-customer-import-history__mobile {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        padding: 16px;
    }

    .rv-customer-import-history__card {
        min-width: 0;
        padding: 18px;
        border: 1px solid #dbe3ec;
        border-radius: 12px;
        background: #fff;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .rv-customer-import-history__card-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }

    .rv-customer-import-history__card-heading > div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .rv-customer-import-history__card-heading > div > strong {
        font-size: 1.1rem;
    }

    .rv-customer-import-history__card-heading > div > span {
        font-size: 0.8rem;
        color: #64748b;
    }

    .rv-customer-import-history__card-file,
    .rv-customer-import-history__card-user {
        display: flex;
        flex-direction: column;
        gap: 4px;
        font-size: 0.84rem;
        min-width: 0;
    }

    .rv-customer-import-history__card-file span {
        color: #64748b;
    }

    .rv-customer-import-history__card-file strong,
    .rv-customer-import-history__card-user strong {
        overflow-wrap: anywhere;
    }

    .rv-customer-import-history__metrics {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .rv-customer-import-history__metrics > div {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 12px;
        border-radius: 8px;
        background: #f1f5f9;
    }

    .rv-customer-import-history__metrics span {
        font-size: 0.75rem;
        color: #64748b;
    }

    .rv-customer-import-history__metrics strong {
        font-size: 1.2rem;
        color: #0f172a;
    }

    .rv-customer-import-history__card-action {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: auto;
    }
}

@media (max-width: 650px) {
    .rv-customer-import-history__mobile {
        grid-template-columns: minmax(0, 1fr);
        padding: 12px;
    }

    .rv-customer-import-history__card {
        padding: 15px;
    }
}


/* =====================================================
   CUSTOMER IMPORT — UPLOAD PAGE POLISH
   ===================================================== */

.rv-import-upload-card {
    padding: clamp(20px, 3vw, 36px);
}

.rv-import-upload-card .rv-create-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.rv-import-upload-card .rv-section-block {
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    background: #f8fafc;
}

.rv-import-upload-card .rv-section-title {
    margin-bottom: 10px;
    font-weight: 700;
}

.rv-import-upload-card .rv-text-muted {
    line-height: 1.65;
}

.rv-import-upload-card input[type="file"] {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 58px;
    padding: 10px;
    border: 1px dashed #a7b8cc;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
}

.rv-import-upload-card input[type="file"]::file-selector-button {
    margin-right: 14px;
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #e2e8f0;
    color: #0f172a;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.rv-import-upload-card input[type="file"]:focus-visible {
    outline: 2px solid #b45309;
    outline-offset: 3px;
}

.rv-import-upload-card__submit {
    margin-top: 18px;
    min-height: 46px;
    font-weight: 700;
}

/* =====================================================
   CUSTOMER IMPORT — PREVIEW FINAL ACTIONS
   ===================================================== */

.rv-import-preview-actions--final {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 24px 16px;
}

.rv-import-preview-actions--final .rv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 20px;
    font-weight: 700;
    text-decoration: none;
}

.rv-import-preview-actions__change-file {
    border: 1px solid #94a3b8;
    background: #f1f5f9;
    color: #334155;
}

.rv-import-preview-actions__change-file:hover {
    border-color: #64748b;
    background: #e2e8f0;
    color: #0f172a;
}

.rv-import-preview-actions__import {
    min-width: 190px;
}

/* =====================================================
   CUSTOMER IMPORT — RESPONSIVE ACTIONS
   ===================================================== */

@media (max-width: 600px) {

    .rv-import-upload-card {
        padding: 16px;
    }

    .rv-import-upload-card .rv-section-block {
        padding: 14px;
    }

    .rv-import-upload-card input[type="file"] {
        font-size: 0.85rem;
    }

    .rv-import-preview-actions--final {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 12px;
    }

    .rv-import-preview-actions--final .rv-btn {
        width: 100%;
        min-width: 0;
    }

    .rv-import-preview-actions__import {
        order: -1;
    }
}



/* =====================================================
   CUSTOMER IMPORT — ROLLBACK MODAL POLISH
   ===================================================== */

.rv-batch-rollback-modal__dialog {
    width: min(100%, 600px);
    max-height: min(90vh, 780px);
    overflow-y: auto;
}

.rv-batch-rollback-modal__header {
    padding: 20px 24px;
}

.rv-batch-rollback-modal__content {
    padding: 22px 24px;
    line-height: 1.6;
}

.rv-batch-rollback-modal__content strong {
    display: block;
    margin-bottom: 12px;
}

.rv-batch-rollback-modal__footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 20px 24px;
}

.rv-batch-rollback-modal__footer > [data-rollback-close] {
    align-self: flex-end;
}

.rv-batch-rollback-confirmation {
    width: 100%;
    gap: 14px;
}

.rv-batch-rollback-confirmation__input {
    min-height: 44px;
}

.rv-batch-rollback-confirmation .rv-btn--danger {
    align-self: center;
    min-width: 200px;
}

/* Final confirmation — use existing audit section */
#batchRollbackFinalConfirmation {
    width: 100%;
    padding: 20px;
    border: 1px solid #f1d0a1;
    border-radius: 12px;
    background: #fffaf2;
    line-height: 1.6;
}

#batchRollbackFinalConfirmation h3 {
    margin: 0 0 16px;
    font-size: 1rem;
}

#batchRollbackFinalConfirmation p {
    margin: 0 0 14px;
}

#batchRollbackFinalCancelBtn,
#batchRollbackFinalConfirmBtn {
    min-height: 42px;
    margin: 4px;
}

#batchRollbackFinalConfirmation {
    text-align: left;
}

@media (max-width: 600px) {
    .rv-batch-rollback-modal {
        padding: 12px;
    }

    .rv-batch-rollback-modal__dialog {
        width: 100%;
        max-height: 92dvh;
    }

    .rv-batch-rollback-modal__header,
    .rv-batch-rollback-modal__content,
    .rv-batch-rollback-modal__footer {
        padding: 16px;
    }

    #batchRollbackFinalConfirmation {
        padding: 16px;
    }

    .rv-batch-rollback-confirmation .rv-btn--danger,
    #batchRollbackFinalCancelBtn,
    #batchRollbackFinalConfirmBtn {
        display: block;
        width: 100%;
        min-width: 0;
        margin: 8px 0 0;
    }

    .rv-batch-rollback-modal__footer > [data-rollback-close] {
        align-self: stretch;
    }
}

/* =====================================================
   CUSTOMER IMPORT — SUCCESS NAVIGATION
   ===================================================== */

.rv-import-confirm-modal__footer:has(
    #customerImportHistoryButton:not(.rv-hidden)
) {
    justify-content: center;
}

#customerImportHistoryButton {
    align-items: center;
    justify-content: center;
    min-width: 190px;
    min-height: 44px;
    text-align: center;
    text-decoration: none;
}

#customerImportHistoryButton:not(.rv-hidden) {
    display: inline-flex;
}

@media (max-width: 600px) {
    #customerImportHistoryButton:not(.rv-hidden) {
        width: 100%;
    }
}


/* IMPORT COMPLETED — SINGLE HISTORY ACTION */

.rv-import-confirm-modal__footer--completed {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rv-import-confirm-modal__footer--completed #customerImportHistoryButton {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 210px;
    min-height: 44px;
}

@media (max-width: 600px) {
    .rv-import-confirm-modal__footer--completed #customerImportHistoryButton {
        width: 100%;
    }
}



/* =====================================================
   CUSTOMER IMPORT — BATCH DETAIL RESPONSIVE TABLE
   ===================================================== */

/* Header actions */
.rv-batch-rollback-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 40px;
    padding: 9px 14px;
}

/* Contained table scrolling */
.rv-batch-table-scroll--contained {
    width: 100%;
    max-width: 100%;
    height: clamp(300px, 48vh, 520px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

/* Keep column headings visible during vertical scrolling */
.rv-batch-table-scroll--contained .rv-batch-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #e2e8f0;
}

/* Keep the table wide enough for readable data */
.rv-batch-table-scroll--contained .rv-batch-table {
    width: 100%;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
}

/* Keep Details buttons legible */
.rv-batch-table-scroll--contained .rv-batch-view-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    min-width: 100px;
    min-height: 36px;
}

/* Help text below scrollable table */
.rv-batch-table-scroll-hint {
    margin: 10px 16px;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.5;
}

/* Pagination stays outside the scrolling table */
.rv-batch-pagination {
    position: relative;
    z-index: 1;
}

@media (max-width: 650px) {
    .rv-batch-rollback-check {
        max-width: 100%;
        width: auto;
        white-space: nowrap;
        font-size: 0.82rem;
    }

    .rv-batch-table-scroll--contained {
        height: min(45dvh, 400px);
        scrollbar-gutter: auto;
    }

    .rv-batch-table-scroll--contained .rv-batch-table {
        min-width: 850px;
    }

    .rv-batch-table-scroll-hint {
        margin: 10px 12px;
    }

    /* Allow the badge and button to occupy separate rows */
    .rv-batch-header__actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px;
        min-width: 0;
    }

    .rv-batch-rollback-check {
        flex: 0 0 auto;
    }
}


/* ============================================================
   PR7 - SELLER-CENTRIC DASHBOARD
   ============================================================ */

.rv-seller-overview,
.rv-seller-selected-header {
    width: 100%;
    min-width: 0;
}

.rv-seller-overview [hidden] {
    display: none !important;
}

/* Summary metrics */

.rv-seller-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0 32px;
}

.rv-seller-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 9px;
    min-width: 0;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #d6e0ec;
    border-radius: 15px;
    box-shadow: 0 5px 18px rgba(24, 43, 70, 0.045);
}

.rv-seller-stat span {
    color: #63748b;
    font-size: 13px;
    font-weight: 600;
}

.rv-seller-stat strong {
    color: #14243c;
    font-size: clamp(25px, 2.5vw, 34px);
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

/* Toolbar */

.rv-seller-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 22px;
}

.rv-seller-toolbar h2 {
    margin: 0 0 6px;
    color: #14243c;
    font-size: 23px;
    font-weight: 800;
}

.rv-seller-toolbar p {
    margin: 0;
    color: #65758b;
    font-size: 14px;
    line-height: 1.5;
}

#rvSellerSearch {
    width: min(100%, 330px);
    min-height: 44px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #cad6e5;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

#rvSellerSearch:focus {
    border-color: #b75008;
    box-shadow: 0 0 0 3px rgba(183, 80, 8, .12);
}

/* Seller cards */

.rv-seller-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
}

.rv-seller-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 23px;
    background: #fff;
    border: 1px solid #d6e0ec;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(24, 43, 70, .055);
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.rv-seller-card:hover {
    transform: translateY(-3px);
    border-color: #e5b184;
    box-shadow: 0 12px 28px rgba(24, 43, 70, .095);
}

.rv-seller-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 17px;
}

.rv-seller-card__avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    background: #fff0dc;
    border: 1px solid #f2d4aa;
    border-radius: 13px;
    color: #a94c06;
    font-size: 20px;
    font-weight: 800;
}

.rv-seller-card__code {
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf2f8;
    color: #455872;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.rv-seller-card h3 {
    margin: 0;
    color: #14243c;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.rv-seller-card__username {
    margin: 5px 0 19px;
    color: #79879b;
    font-size: 13px;
    overflow-wrap: anywhere;
}

/* Seller metrics */

.rv-seller-card__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 19px;
}

.rv-seller-card__metrics > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px;
    border: 1px solid #e0e8f1;
    border-radius: 11px;
    background: #f4f7fb;
}

.rv-seller-card__metrics strong {
    color: #17283f;
    font-size: 25px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.rv-seller-card__metrics span {
    color: #697991;
    font-size: 12px;
    font-weight: 600;
}

/* Per-route breakdown */

.rv-seller-card__routes {
    flex: 1;
    min-height: 0;
    padding-top: 17px;
    border-top: 1px solid #e4eaf2;
}

.rv-seller-card__routes > strong {
    display: block;
    margin-bottom: 12px;
    color: #4a5a70;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.rv-seller-card__route-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #edf1f6;
    font-size: 13px;
}

.rv-seller-card__route-row:last-child {
    border-bottom: none;
}

.rv-seller-card__route-row span {
    min-width: 0;
    color: #506077;
    overflow-wrap: anywhere;
}

.rv-seller-card__route-row strong {
    flex-shrink: 0;
    min-width: 30px;
    padding: 4px 8px;
    border-radius: 7px;
    background: #eaf0f7;
    color: #34455e;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.rv-seller-card__routes p {
    margin: 0;
    color: #8190a3;
    font-size: 13px;
}

/* Primary action */

.rv-seller-card__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
}

.rv-seller-search-empty {
    padding: 36px 20px;
    text-align: center;
    color: #66788e;
}

/* Selected seller header */

.rv-seller-selected-header {
    margin: 24px 0;
    padding: 23px 26px;
    background: #fff;
    border: 1px solid #d6e0ec;
    border-radius: 15px;
    box-shadow: 0 5px 18px rgba(24, 43, 70, .045);
}

.rv-seller-back {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin-bottom: 15px;
    color: #a54b0c;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.rv-seller-back:hover {
    text-decoration: underline;
}

.rv-seller-selected-header__content h2 {
    margin: 7px 0;
    color: #14243c;
    font-size: clamp(22px, 2.3vw, 30px);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.rv-seller-selected-header__content p {
    margin: 0;
    color: #66768b;
    font-size: 14px;
}

/* Responsive */

@media (max-width: 1200px) {
    .rv-seller-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .rv-seller-summary {
        gap: 10px;
        margin: 17px 0 25px;
    }

    .rv-seller-stat {
        padding: 15px 12px;
        border-radius: 12px;
    }

    .rv-seller-stat span {
        font-size: 11px;
    }

    .rv-seller-stat strong {
        font-size: 24px;
    }

    .rv-seller-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    #rvSellerSearch {
        width: 100%;
    }

    .rv-seller-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .rv-seller-card {
        padding: 19px;
    }

    .rv-seller-selected-header {
        margin: 17px 0;
        padding: 19px;
    }
}

@media (max-width: 380px) {
    .rv-seller-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .rv-seller-stat {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rv-seller-card,
    #rvSellerSearch {
        transition: none;
    }

    .rv-seller-card:hover {
        transform: none;
    }
}



/* ==========================================
   SELLER DASHBOARD - RESPONSIVE CONTENT
   ========================================== */

/* Evitar que una tarjeta estire toda la fila */
.rv-admin-grid--monthly {
    align-items: start;
}

.rv-admin-grid--monthly > .rv-card {
    min-width: 0;
    height: auto;
}

/* Lista de rutas con scroll independiente */
#sellerRoutesList.rv-seller-routes-scroll {
    max-height: 350px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-strong) transparent;
    padding: 4px 6px 4px 0;
}

/* Rutas compactas y legibles */
#sellerRoutesList .rv-route-card {
    min-width: 0;
    padding: 12px;
    margin-bottom: 10px;
}

#sellerRoutesList .rv-route-card p {
    margin: 0 0 6px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

#sellerRoutesList .rv-route-card p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   PREPARE CLOSE MODAL
   ========================================== */

#prepareCloseModal {
    padding: 12px;
    overflow: hidden;
}

#prepareCloseModal .rv-prepare-close-modal {
    display: flex;
    flex-direction: column;
    width: min(680px, 100%);
    max-width: 680px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    min-height: 0;
    text-align: left;
    overscroll-behavior: contain;
}

#prepareCloseModal .rv-route-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

#prepareCloseModal .rv-prepare-close-progress {
    flex-shrink: 0;
}

/* Contenedor de clientes */
#prepareCloseModal .rv-prepare-close-missing {
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin: 12px 0 16px;
    padding: 14px;
    overflow: hidden;
}

#prepareCloseModal .rv-prepare-close-missing > strong {
    flex-shrink: 0;
    font-size: 15px;
}

/* Solo la lista de clientes hace scroll */
#prepareCloseModal .rv-prepare-close-missing ul {
    max-height: min(42dvh, 360px);
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    margin: 12px 0 0;
    padding: 0 6px 0 22px;
    text-align: left;
}

#prepareCloseModal .rv-prepare-close-missing li {
    padding: 9px 4px;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

#prepareCloseModal .rv-prepare-close-missing li:last-child {
    border-bottom: none;
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 768px) {

    #sellerRoutesList.rv-seller-routes-scroll {
        max-height: 310px;
        -webkit-overflow-scrolling: touch;
    }

    #prepareCloseModal {
        padding: 8px;
        align-items: center;
    }

    #prepareCloseModal .rv-prepare-close-modal {
        width: 100%;
        max-height: calc(100dvh - 16px);
        padding: 18px 14px;
        border-radius: 14px;
    }

    #prepareCloseModal .rv-prepare-close-progress {
        font-size: 14px;
        line-height: 1.45;
        margin: 12px 0;
    }

    #prepareCloseModal .rv-prepare-close-missing {
        padding: 12px;
    }

    #prepareCloseModal .rv-prepare-close-missing ul {
        max-height: 38dvh;
        -webkit-overflow-scrolling: touch;
    }

    #prepareCloseModal .rv-prepare-close-missing li {
        font-size: 14px;
        padding: 10px 4px;
    }

    #prepareCloseModal .rv-route-modal-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    #prepareCloseModal .rv-route-modal-actions .rv-btn {
        min-height: 44px;
    }
}



/* ==========================================================
   PR8.3 - ASIGNACIÓN MASIVA
   MODAL RESPONSIVE / MOBILE FIRST
   ========================================================== */

/* Overlay */
#bulkCustomerAssignmentModal {
    padding: 12px;
    align-items: center;
    justify-content: center;
}

/* Contenedor principal */
#bulkCustomerAssignmentModal .rv-route-modal__content {
    display: flex;
    flex-direction: column;

    width: 100%;
    max-width: 700px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);

    padding: 0;
    margin: 0;

    overflow: hidden;

    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    text-align: left;
}

/* Header */
#bulkCustomerAssignmentModal .rv-route-modal-header {
    position: relative;
    top: auto;

    flex: 0 0 auto;
    align-items: flex-start;
    gap: 14px;

    padding: 20px 22px 16px;
    margin: 0;

    border-bottom: 1px solid var(--color-border);
}

#bulkCustomerAssignmentModal .rv-route-modal-header > div {
    flex: 1;
    min-width: 0;
}

#bulkCustomerAssignmentModal .rv-route-modal-title {
    margin: 4px 0 0;
    font-size: 21px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#bulkCustomerAssignmentModal .rv-route-modal-subtitle {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
}

#bulkCustomerAssignmentModal .rv-route-modal-close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex: 0 0 auto;
}

/* Pestañas */
#bulkCustomerAssignmentModal .rv-route-candidate-tabs {
    flex: 0 0 auto;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;

    padding: 16px 22px;
    margin: 0;

    border-bottom: 1px solid var(--color-border);
}

#bulkCustomerAssignmentModal .rv-route-candidate-tab {
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;

    font-size: 14px;
    font-weight: 700;
    border-radius: 9px;
}

/* Paneles: área desplazable */
#bulkManualPanel,
#bulkAutomaticPanel {
    flex: 1 1 auto;
    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    overscroll-behavior: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;

    padding: 20px 22px 22px;
}

/* Respetar el estado controlado por JavaScript */
#bulkManualPanel[hidden],
#bulkAutomaticPanel[hidden] {
    display: none !important;
}

/* Textos de explicación */
#bulkCustomerAssignmentModal
#bulkManualPanel > .rv-route-modal-subtitle,
#bulkCustomerAssignmentModal
#bulkAutomaticPanel > .rv-route-modal-subtitle {
    margin: 0 0 18px;
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.55;
}

/* Formulario manual */
#bulkCustomerAssignmentModal .rv-form-group {
    gap: 8px;
    margin-bottom: 16px;
}

#bulkCustomerAssignmentModal .rv-form-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
}

#bulkManualRoute {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 46px;

    padding: 11px 12px;
    font-size: 14px;

    text-align: left;
    border-radius: 9px;
}

/* Advertencia manual */
#bulkManualPanel .rv-alert {
    margin: 0 0 20px;
    padding: 13px 14px;

    border-radius: 9px;
    font-size: 13px;
    line-height: 1.55;
    text-align: left;
}

/* Mensaje del cálculo automático */
#bulkAutoMessage {
    margin: 0 0 16px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 9px;
}

/* ==========================================
   INDICADORES AUTOMÁTICOS
   ========================================== */

#bulkAutomaticPanel .rv-seller-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;

    margin: 0 0 20px;
    padding: 0;
}

#bulkAutomaticPanel .rv-seller-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;

    min-width: 0;
    min-height: 92px;

    padding: 14px;

    border: 1px solid var(--color-border);
    border-radius: 11px;

    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
}

#bulkAutomaticPanel .rv-seller-stat span {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-muted);
    overflow-wrap: anywhere;
}

#bulkAutomaticPanel .rv-seller-stat strong {
    font-size: 27px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   BOTONES DE ACCIÓN
   ========================================== */

#bulkCustomerAssignmentModal .rv-route-modal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    margin: 0;
    padding: 14px 0 0;

    border-top: 1px solid var(--color-border);
}

#bulkCustomerAssignmentModal .rv-route-modal-actions .rv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    max-width: 100%;
    padding: 11px 15px;

    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
}

#bulkCustomerAssignmentModal .rv-route-modal-actions .rv-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ==========================================
   MOBILE - HASTA 600 PX
   ========================================== */

@media (max-width: 600px) {

    #bulkCustomerAssignmentModal {
        padding: 8px;
    }

    #bulkCustomerAssignmentModal .rv-route-modal__content {
        max-width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 13px;
    }

    #bulkCustomerAssignmentModal .rv-route-modal-header {
        padding: 16px 15px 14px;
        gap: 10px;
    }

    #bulkCustomerAssignmentModal .rv-route-modal-title {
        font-size: 18px;
    }

    #bulkCustomerAssignmentModal .rv-route-modal-subtitle {
        font-size: 12px;
    }

    #bulkCustomerAssignmentModal .rv-route-candidate-tabs {
        gap: 8px;
        padding: 12px 15px;
    }

    #bulkCustomerAssignmentModal .rv-route-candidate-tab {
        padding: 10px 8px;
        font-size: 13px;
    }

    #bulkManualPanel,
    #bulkAutomaticPanel {
        padding: 16px 15px 18px;
    }

    /* Dos indicadores por fila en teléfono */
    #bulkAutomaticPanel .rv-seller-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        margin-bottom: 16px;
    }

    #bulkAutomaticPanel .rv-seller-stat {
        min-height: 78px;
        padding: 12px;
    }

    #bulkAutomaticPanel .rv-seller-stat strong {
        font-size: 25px;
    }

    /* Último indicador a todo el ancho */
    #bulkAutomaticPanel .rv-seller-stat:last-child {
        grid-column: 1 / -1;
    }

    #bulkCustomerAssignmentModal .rv-route-modal-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    #bulkCustomerAssignmentModal .rv-route-modal-actions .rv-btn {
        width: 100%;
        min-height: 46px;
    }
}

/* Teléfonos de poca altura */
@media (max-height: 600px) {
    #bulkCustomerAssignmentModal .rv-route-modal-header {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    #bulkCustomerAssignmentModal .rv-route-candidate-tabs {
        padding-top: 10px;
        padding-bottom: 10px;
    }
}





/* =====================================================
   AGREGAR CLIENTES - MOBILE FIRST
   ===================================================== */

#routeCustomersModal {
    padding: 12px;
    align-items: center;
    justify-content: center;
}

/* Panel principal */
#routeCustomersModal .rv-route-modal__content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 780px;
    max-height: calc(100dvh - 24px);
    min-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    text-align: left;
    border-radius: 15px;
}

/* Encabezado */
#routeCustomersModal .rv-route-modal-header {
    flex: 0 0 auto;
    padding: 20px 24px 16px;
    margin: 0;
    border-bottom: 1px solid var(--color-border);
}

/* Pestañas */
#routeCustomersModal .rv-route-candidate-tabs {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 16px 24px 12px;
}

/* Buscador */
#routeCustomersModal .rv-route-candidate-search {
    flex: 0 0 auto;
    margin: 0 24px 14px;
}

#routeCustomersModal .rv-route-candidate-search__input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 14px;
}

/* Formulario: scroll principal */
#routeCustomerAssignmentForm {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 0 24px;
}

/* Lista de clientes */
#routeCustomersModal #routeCandidateList {
    flex: 0 0 auto;
    max-height: 32dvh;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-bottom: 16px;
    padding-right: 4px;
}

/* ============================================
   OVERRIDE - AUTORIZACIÓN EXCEPCIONAL
   ============================================ */

#routeCustomersModal .rv-route-override-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;

    flex: 0 0 auto;
    min-width: 0;
    width: 100%;

    padding: 18px;
    margin: 0 0 18px;

    background: var(--color-primary-soft);
    border: 1px solid #F0D99A;
    border-left: 4px solid var(--color-primary);
    border-radius: 11px;
}

/* Título visual de la sección */
#routeCustomersModal .rv-route-override-fields::before {
    content: "Autorización excepcional";
    display: block;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.4;
    color: var(--color-text);
    margin-bottom: 3px;
}

/* Etiquetas */
#routeCustomersModal .rv-route-override-fields label {
    display: block;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--color-text);
}

/* Inputs y textarea */
#routeCustomersModal .rv-route-override-fields input,
#routeCustomersModal .rv-route-override-fields textarea {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 12px 13px;

    background: #FFFFFF;
    color: var(--color-text);
    border: 1px solid var(--color-border-strong);
    border-radius: 9px;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;

    outline: none;
    box-sizing: border-box;
}

#routeCustomersModal .rv-route-override-fields input {
    min-height: 45px;
}

#routeCustomersModal .rv-route-override-fields textarea {
    min-height: 95px;
    resize: vertical;
}

/* Estado de enfoque */
#routeCustomersModal .rv-route-override-fields input:focus,
#routeCustomersModal .rv-route-override-fields textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.12);
}

/* Mensaje de ayuda */
#routeCustomersModal .rv-route-override-fields small {
    display: block;
    margin-top: 5px;

    color: var(--color-text-light);
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

/* ============================================
   FOOTER DE SELECCIÓN
   ============================================ */

#routeCustomersModal .rv-route-selection-footer {
    position: sticky;
    bottom: 0;
    z-index: 3;

    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;

    margin: auto -24px 0;
    padding: 14px 24px;

    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

#routeCustomersModal .rv-route-selection-count {
    font-size: 13px;
    line-height: 1.5;
}

#routeCustomersModal .rv-route-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

#routeCustomersModal .rv-route-modal-actions .rv-btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 9px;
}

/* ============================================
   TELÉFONOS
   ============================================ */

@media (max-width: 600px) {

    #routeCustomersModal {
        padding: 6px;
    }

    #routeCustomersModal .rv-route-modal__content {
        max-height: calc(100dvh - 12px);
        border-radius: 12px;
    }

    #routeCustomersModal .rv-route-modal-header {
        padding: 15px 14px 12px;
    }

    #routeCustomersModal .rv-route-candidate-tabs {
        padding: 12px 14px;
    }

    #routeCustomersModal .rv-route-candidate-tab {
        min-height: 44px;
        font-size: 13px;
        padding: 9px 6px;
    }

    #routeCustomersModal .rv-route-candidate-search {
        margin: 0 14px 12px;
    }

    #routeCustomerAssignmentForm {
        padding: 0 14px;
        -webkit-overflow-scrolling: touch;
    }

    #routeCustomersModal #routeCandidateList {
        max-height: 28dvh;
        -webkit-overflow-scrolling: touch;
    }

    #routeCustomersModal .rv-route-override-fields {
        padding: 14px;
        margin-bottom: 16px;
        gap: 9px;
    }

    #routeCustomersModal .rv-route-override-fields::before {
        font-size: 14px;
    }

    #routeCustomersModal .rv-route-override-fields input,
    #routeCustomersModal .rv-route-override-fields textarea {
        font-size: 16px;
    }

    #routeCustomersModal .rv-route-selection-footer {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;

        margin: auto -14px 0;
        padding: 12px 14px max(12px, env(safe-area-inset-bottom));
    }

    #routeCustomersModal .rv-route-modal-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    #routeCustomersModal .rv-route-modal-actions .rv-btn {
        width: 100%;
        min-width: 0;
        padding: 10px 8px;
    }
}


/* =====================================================
   RUTAS Y CLIENTES - SWITCHER DE ACCIONES
   MOBILE FIRST
   ===================================================== */

/* Contenedor de ambas acciones */
.rv-routes-page-header__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;

    width: min(100%, 350px);
    flex: 0 0 auto;
    margin: 0;
}

/* Ambos botones con las mismas dimensiones */
.rv-routes-page-header__actions > .rv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-width: 0;
    min-height: 44px;

    padding: 10px 12px;
    margin: 0;

    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    white-space: normal;

    box-shadow: none;
}

/* Asignación masiva: acción secundaria */
.rv-routes-page-header__actions
#openBulkCustomerAssignment {
    background: var(--color-accent-soft);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

/* Crear ruta: acción principal */
.rv-routes-page-header__actions
#openCreateRouteModal {
    background: var(--color-primary);
    color: #FFFFFF;
    border: 1px solid var(--color-primary);
}

/* Interacciones */
.rv-routes-page-header__actions > .rv-btn:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* ==========================================
   TELÉFONOS
   ========================================== */

@media (max-width: 768px) {

    .rv-routes-page-header__actions {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 16px;
    }

    .rv-routes-page-header__actions > .rv-btn {
        min-height: 48px;
        padding: 10px 7px;
        font-size: 12px;
    }
}

/* Teléfonos muy estrechos */
@media (max-width: 350px) {

    .rv-routes-page-header__actions > .rv-btn {
        font-size: 11px;
        padding: 9px 5px;
    }
}
