/* ==========================================================================
   ARCHI DESIGN SYSTEM - MINIMALIST MODERN (ORION BLACK & GRAY REFERENCE)
   Paleta en negros y grises grafito, tipografía geométrica de alto contraste,
   cero terminaciones redondeadas (border-radius: 0), widget angular de telemetría,
   tarjetas fotográficas con encuadre recto y acabado sobrio.
   ========================================================================== */

/* Las fuentes (Inter + JetBrains Mono) se cargan desde /static/css/fonts.css (autoalojadas). */

:root,
:root[data-theme="dark"] {
    /* Identidad Global ARCHI (Oscuro): Azul Pizarra Análogo (90%) + Ámbar Mate Complementario (10%) */
    --bg-main: #0e1218;
    --bg-surface: #141922;
    --bg-card: #1a212d;
    --bg-card-hover: #212a38;
    --bg-card-dark: #0e1218;
    --bg-input: #141922;
    --bg-table-head: #11161f;
    --bg-table-even: #161c26;

    --border-subtle: #283344;
    --border-active: #38475e;
    --border-color: #283344;
    --border-light: rgba(237, 242, 247, 0.08);

    --text-primary: #edf2f7;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-light: #ffffff;

    /* Tokens Análogos + Complementario */
    --archi-analog: #6c88b5;
    --archi-analog-hover: #7b97c4;
    --archi-analog-soft: rgba(108, 136, 181, 0.16);
    --archi-analog-border: rgba(108, 136, 181, 0.45);
    --archi-analog-badge-text: #0e1218;

    --archi-comp: #c4924e;
    --archi-comp-hover: #d1a05d;
    --archi-comp-text: #141210;

    --archi-positive: #4d9490;
    --archi-alert: #b87662;

    /* Aliases de Compatibilidad para Vistas Existentes (Sin Neón) */
    --archi-pine: #141922;
    --archi-pine-hover: #212a38;
    --archi-mint: #c4924e;
    --archi-gold: #c4924e;
    --archi-ocean: #6c88b5;
    --archi-sand: #c4924e;
    --archi-coral: #b87662;
    --archi-green: #4d9490;

    --tesla-red: #b87662;
    --accent-blue: #6c88b5;
    --accent-green: #4d9490;

    /* Tokens Semánticos de Estado */
    --color-success: #4d9490;
    --color-success-bg: rgba(77, 148, 144, 0.14);
    --color-success-border: rgba(77, 148, 144, 0.35);

    --color-warning: #c4924e;
    --color-warning-bg: rgba(196, 146, 78, 0.14);
    --color-warning-border: rgba(196, 146, 78, 0.35);

    --color-danger: #b87662;
    --color-danger-bg: rgba(184, 118, 98, 0.14);
    --color-danger-border: rgba(184, 118, 98, 0.35);

    --color-info: #6c88b5;
    --color-info-bg: rgba(108, 136, 181, 0.14);
    --color-info-border: rgba(108, 136, 181, 0.35);
}

:root[data-theme="light"] {
    /* Identidad Global ARCHI (Claro): Hielo Azul Suave (90%) + Ámbar Tostado Mate (10%) */
    --bg-main: #f2f5f9;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #eef2f7;
    --bg-card-dark: #eef2f7;
    --bg-input: #ffffff;
    --bg-table-head: #e9eff7;
    --bg-table-even: #f8fafc;

    --border-subtle: #dbe3ee;
    --border-active: #b6c5d9;
    --border-color: #dbe3ee;
    --border-light: rgba(22, 32, 50, 0.08);

    --text-primary: #162032;
    --text-secondary: #52647d;
    --text-muted: #64748b;
    --text-light: #ffffff;

    --archi-analog: #436494;
    --archi-analog-hover: #36527b;
    --archi-analog-soft: rgba(67, 100, 148, 0.11);
    --archi-analog-border: rgba(67, 100, 148, 0.36);
    --archi-analog-badge-text: #ffffff;

    --archi-comp: #b57c34;
    --archi-comp-hover: #a16c29;
    --archi-comp-text: #ffffff;

    --archi-positive: #2f7874;
    --archi-alert: #a85c48;

    --archi-pine: #ffffff;
    --archi-pine-hover: #eef2f7;
    --archi-mint: #b57c34;
    --archi-gold: #b57c34;
    --archi-ocean: #436494;
    --archi-sand: #b57c34;
    --archi-coral: #a85c48;
    --archi-green: #2f7874;

    --tesla-red: #a85c48;
    --accent-blue: #436494;
    --accent-green: #2f7874;

    --color-success: #2f7874;
    --color-success-bg: rgba(47, 120, 116, 0.12);
    --color-success-border: rgba(47, 120, 116, 0.32);

    --color-warning: #b57c34;
    --color-warning-bg: rgba(181, 124, 52, 0.12);
    --color-warning-border: rgba(181, 124, 52, 0.32);

    --color-danger: #a85c48;
    --color-danger-bg: rgba(168, 92, 72, 0.12);
    --color-danger-border: rgba(168, 92, 72, 0.32);

    --color-info: #436494;
    --color-info-bg: rgba(67, 100, 148, 0.12);
    --color-info-border: rgba(67, 100, 148, 0.32);
}

:root {
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Escala Tipográfica Estándar */
    --fs-xs: 0.75rem;    /* 12px: metadatos, chips, badges */
    --fs-sm: 0.8125rem;  /* 13px: tablas, etiquetas de control */
    --fs-md: 0.9375rem;  /* 15px: cuerpo de texto, inputs */
    --fs-lg: 1.125rem;   /* 18px: subtítulos, cards */
    --fs-xl: 1.45rem;    /* 23px: títulos de sección */
    --fs-2xl: 1.85rem;   /* 30px: cifras héroe (KPIs principales) */
    
    /* Escala de Espaciado Estándar ARCHI (Fase 2) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    
    /* Terminaciones Elegantes y Modernas (Tech Minimalist) */
    --radius-pill: 24px;
    --radius-card: 12px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    --transition-smooth: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: all 0.25s ease;
    
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-float: 0 16px 40px rgba(0, 0, 0, 0.7);
    --shadow-glow-mint: 0 0 15px rgba(229, 169, 60, 0.25);
}

/* Clases de Utilidad Semántica de Estado (Fase 2) */
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-info { color: var(--color-info) !important; }
.text-muted { color: var(--text-muted) !important; }

.badge-success { background: var(--color-success-bg) !important; color: var(--color-success) !important; border: none !important; border-radius: 6px !important; }
.badge-warning { background: var(--color-warning-bg) !important; color: var(--color-warning) !important; border: none !important; border-radius: 6px !important; }
.badge-danger { background: var(--color-danger-bg) !important; color: var(--color-danger) !important; border: none !important; border-radius: 6px !important; }
.badge-info { background: var(--color-info-bg) !important; color: var(--color-info) !important; border: none !important; border-radius: 6px !important; }

/* Skeletons y Estados de Carga Shimmer (Fase 3) */
.skeleton-box {
    display: inline-block;
    height: 1.1em;
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    vertical-align: middle;
}

.skeleton-box::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.08) 40%,
        rgba(255, 255, 255, 0.12) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: archiShimmer 1.5s infinite;
    content: '';
}

@keyframes archiShimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Estado Vacío Reutilizable (Empty State - Fase 3) */
.archi-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 20px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    margin: 16px 0;
    width: 100%;
    box-sizing: border-box;
}

.archi-empty-icon {
    width: 44px;
    height: 44px;
    color: var(--text-muted);
    margin-bottom: 12px;
    opacity: 0.6;
}

.archi-empty-title {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.archi-empty-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 380px;
    margin-bottom: 16px;
    line-height: 1.45;
}

/* Reset Estricto y Base Tipográfica */
strong, b {
    font-weight: 500;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* Scrollbars Minimalistas Modernos (Elimina barras clásicas blancas de Windows) */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(229, 169, 60, 0.45);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Accesibilidad: anillo de foco visible solo al navegar con teclado.
   Los controles con estilo de foco propio (p. ej. .supp-ctrl) lo sobrescriben al ir más abajo. */
:focus-visible {
    outline: 2px solid var(--archi-gold);
    outline-offset: 2px;
}

/* Accesibilidad: usuarios que piden menos movimiento en su sistema operativo */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Transiciones entre Vistas */
.view-section {
    animation: viewSlideFade 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes viewSlideFade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tipografía */
h1, h2, h3, h4, h5 {
    font-weight: 500;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.archi-header-title {
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.archi-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Estructura Principal */
#app-shell {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-main);
}

/* ==========================================================================
   SIDEBAR DESKTOP (ESTILO MINIMALISTA ORION)
   ========================================================================== */
.sidebar {
    width: 270px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 28px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 6px 28px 6px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 24px;
}

.brand-logo-icon {
    width: 40px;
    height: 40px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.brand-name {
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--text-primary);
}

.brand-name .dot {
    color: var(--archi-gold);
}

.brand-tagline {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 450;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 450;
    font-size: 0.92rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.nav-item:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.nav-item.active {
    background-color: var(--bg-card);
    color: #ffffff;
    border: 1px solid var(--border-subtle);
}

.nav-item svg {
    stroke-width: 2;
    transition: var(--transition-smooth);
}

.nav-item.active svg {
    stroke: #ffffff;
}

/* Rótulos de sección en Sidebar para jerarquía visual (Fase 2) */
.nav-section-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 600;
    padding: 14px 16px 4px 16px;
    margin-top: 4px;
    user-select: none;
    display: block;
}

/* Sub-pestañas de navegación unificadas (Pill Tabs con Scroll Táctil) */
.archi-subnav-tabs {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding-bottom: 10px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
}

.archi-subnav-tabs::-webkit-scrollbar {
    display: none !important;
}

.archi-subnav-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    font-size: 0.80rem !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-transform: none !important;
    letter-spacing: 0.01em !important;
    cursor: pointer !important;
    min-height: 38px !important;
    text-decoration: none !important;
}

.archi-subnav-btn.btn-archi-primary {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(229, 169, 60, 0.16), rgba(229, 169, 60, 0.05)) !important;
    border: 1px solid var(--archi-gold) !important;
    box-shadow: 0 4px 14px rgba(229, 169, 60, 0.20) !important;
    font-weight: 600 !important;
}

.archi-subnav-btn.btn-archi-outline {
    color: var(--text-secondary) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
}

.archi-subnav-btn.btn-archi-outline:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

/* Componente Encabezado de Página Unificado (Fase 2) */
.archi-page-header,
.view-header-bar,
.ds-header-bar,
.supp-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.archi-header-title {
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.25;
}

.archi-header-tagline,
.brand-tagline {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--archi-gold);
    font-weight: 500;
    margin-bottom: 2px;
    display: block;
}

.archi-header-actions,
.supp-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Perfil en Sidebar */
.sidebar-user {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    background: #24242e;
    border: 1px solid var(--border-subtle);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Área de Contenido Principal */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-bottom: 100px;
}

/* Topbar */
.topbar {
    height: 72px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: transparent;
    border-bottom: 1px solid var(--border-subtle);
}

.topbar-mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
}

/* Contenedor Principal de Vistas */
.content-area {
    padding: 24px 32px 32px 32px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================
   BANNER HERO ANGULAR & WIDGET DE TELEMETRÍA (ORION MINIMALISM)
   ========================================================================== */
.archi-hero-banner {
    position: relative;
    background: #0e0e12;
    border: 1px solid var(--border-subtle);
    color: #ffffff;
    padding: 32px 30px;
    margin-bottom: 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.archi-hero-beach-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.32;
    filter: grayscale(35%) contrast(110%);
    pointer-events: none;
    z-index: 1;
    display: block !important;
}

.archi-hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(9, 9, 11, 0.92) 0%, rgba(14, 14, 18, 0.7) 50%, rgba(9, 9, 11, 0.95) 100%);
    pointer-events: none;
    z-index: 2;
}

.archi-hero-content {
    position: relative;
    z-index: 3;
}

.hero-actions-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Widget Angular de Telemetría (reemplazo sin curvas del antiguo círculo) */
.archi-circle-widget {
    position: relative;
    z-index: 3;
    width: 240px;
    height: auto;
    padding: 26px 22px;
    background: rgba(14, 14, 18, 0.92);
    border: 1px solid var(--border-active);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
    transition: var(--transition-bounce);
}

.archi-circle-widget:hover {
    border-color: var(--border-active);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 16px rgba(56, 189, 248, 0.08);
}

.circle-top-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
}

.circle-amount {
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: #ffffff;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.circle-subtext {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 6px;
}

.circle-pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(56, 189, 248, 0.12);
    border: none;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #38bdf8;
    margin-top: 10px;
}

/* ==========================================================================
   TARJETAS FOTOGRÁFICAS MINIMALISTAS (ORION EDITORIAL STYLE)
   ========================================================================== */
.archi-photo-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.archi-photo-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
}

.archi-photo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
    border-color: var(--archi-gold);
}

.archi-photo-card:active {
    transform: scale(0.98);
}

.photo-card-img {
    position: relative;
    height: 145px;
    width: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 12px;
}

.photo-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(9, 9, 11, 0.85) 0%, transparent 60%);
    pointer-events: none;
}

.photo-card-badge {
    position: relative;
    z-index: 2;
    background: rgba(9, 9, 11, 0.9);
    color: #ffffff;
    backdrop-filter: blur(8px);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.photo-card-body {
    padding: 18px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface);
    flex: 1;
}

.photo-card-info {
    flex: 1;
    min-width: 0;
}

.photo-card-info h4 {
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.photo-card-info p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.photo-card-arrow-btn {
    width: 36px;
    height: 36px;
    background: #181820;
    border: 1px solid var(--border-active);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.archi-photo-card:hover .photo-card-arrow-btn {
    background: var(--archi-gold);
    border-color: var(--archi-gold);
    color: #09090b;
    transform: rotate(45deg);
}

/* Tarjetas y Contenedores */
.archi-card {
    background-color: var(--bg-card);
    padding: 24px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

.archi-card:hover {
    border-color: var(--border-active);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Métricas Resumen - Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--bg-card);
    padding: 20px 22px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.metric-card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
}

.metric-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.metric-title {
    font-size: 0.78rem;
    font-weight: 450;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.metric-icon-circle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #181820;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.metric-value {
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* Tarjeta Tip del Día */
.tip-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-surface);
    padding: 18px 22px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    margin-top: 24px;
}

.tip-thumb {
    width: 84px;
    height: 84px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
}

.tip-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--archi-gold);
    margin-bottom: 4px;
}

.tip-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tip-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ==========================================================================
   FILTROS ANGULARES (DÉBITO, CRÉDITO, EFECTIVO, TRANSFERENCIAS, MIXTO)
   ========================================================================== */
.filter-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 8px 16px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 450;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.filter-tab.active {
    background: #24242e;
    color: #ffffff;
    border: 1px solid var(--border-active);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Grilla de Métodos de Pago en Modal de Venta */
.sale-pay-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 3px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.sale-pay-grid .filter-tab {
    padding: 7px 4px !important;
    font-size: 0.72rem !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 520px) {
    .sale-pay-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* Botones ARCHI */
.btn-archi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    font-family: inherit;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.btn-archi:active {
    transform: scale(0.97);
}

.btn-archi:disabled, .btn-archi[disabled] {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: none !important;
}

.btn-archi.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-archi.is-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: calc(50% - 8px);
    left: calc(50% - 8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: archiSpin 0.7s linear infinite;
}

@keyframes archiSpin {
    to { transform: rotate(360deg); }
}

.btn-archi-primary {
    background: #f4f4f5;
    color: #09090b;
    border-color: #ffffff;
}

.btn-archi-primary:hover {
    background: var(--archi-gold);
    border-color: var(--archi-gold);
    color: #09090b;
}

.btn-archi-mint {
    background: #38bdf8;
    color: #0b111a;
    border-color: #38bdf8;
    font-weight: 600;
}

.btn-archi-mint:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

.btn-archi-outline {
    background: transparent;
    border: 1px solid var(--border-active);
    color: var(--text-primary);
}

.btn-archi-outline:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-secondary);
}

/* Variante secundaria: relleno sutil + borde gris (acciones comunes de apoyo) */
.btn-archi-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-active);
    color: var(--text-primary);
}

.btn-archi-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--text-secondary);
    color: #ffffff;
}

/* Variante terciaria: sin borde (acciones de bajo relieve) */
.btn-archi-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
}

.btn-archi-ghost:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

/* Botones secundarios sutiles para ventanas modales (cierre / cancelacion sin distraccion visual) */
.btn-modal-subtle-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    border: none;
    color: #94a3b8;
    padding: 7px 18px;
    font-size: 0.80rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
}

.btn-modal-subtle-close:hover {
    background: #27354a;
    color: #ffffff;
}

.btn-modal-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 7px 18px;
    font-size: 0.80rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
}

.btn-modal-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

/* Tarjetas de resumen estandarizadas para encabezados de modales financieros */
.financial-modal-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 12px 14px;
    transition: border-color 0.15s ease;
}

.financial-modal-card .card-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 2px;
}

.financial-modal-card .card-amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    font-family: monospace;
    margin: 3px 0;
}

.financial-modal-card .card-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
}


/* Variante destructiva / anulación */
.btn-archi-danger {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #f43f5e;
}

.btn-archi-danger:hover {
    background: rgba(244, 63, 94, 0.22);
    border-color: #f43f5e;
    color: #ffffff;
}

/* Compatibilidad con clases anteriores */
.btn-tesla {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    background: #181820;
    color: #ffffff;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-tesla-red {
    background: #e11d48 !important;
    border-color: #e11d48 !important;
}

.btn-outline-tesla {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    min-height: 40px;
    font-weight: 500;
    font-size: 0.82rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #f4f4f6;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-outline-tesla:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.22);
}

/* Badges Semánticos Estilo Soft-Badge (Sin bordes, fondo con baja opacidad) */
.table-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 6px;
    border: none !important;
}

.badge-cash {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
    border: none !important;
}

.badge-card {
    background: rgba(56, 189, 248, 0.12) !important;
    color: #38bdf8 !important;
    border: none !important;
}

.badge-debit {
    background: rgba(56, 189, 248, 0.14) !important;
    color: #38bdf8 !important;
    border: none !important;
}

.badge-credit {
    background: rgba(168, 85, 247, 0.12) !important;
    color: #c084fc !important;
    border: none !important;
}

.badge-transfer {
    background: rgba(229, 169, 60, 0.14) !important;
    color: #e5a93c !important;
    border: none !important;
}

.badge-mixed {
    background: rgba(244, 63, 94, 0.12) !important;
    color: #fb7185 !important;
    border: none !important;
}

.badge-paid {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
    border: none !important;
}

.badge-unpaid {
    background: rgba(244, 63, 94, 0.12) !important;
    color: #fb7185 !important;
    border: none !important;
}

.badge-neutral {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-secondary) !important;
    border: none !important;
}

/* Tabla de Ventas e Inventario en Desktop */
.archi-table-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    overflow-x: auto;
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox: oculta la barra gris */
    -ms-overflow-style: none; /* IE y Edge: oculta la barra gris */
}

.archi-table-container::-webkit-scrollbar {
    display: none !important; /* Chrome, Edge, Safari, Opera: elimina barra nativa gris */
    width: 0 !important;
    height: 0 !important;
}

.tesla-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tesla-table::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.tesla-table th {
    padding: 12px 14px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 700;
    background: #0f172a;
    border-bottom: 2px solid #334155;
    border-top: none;
    border-left: none;
    border-right: none;
    white-space: nowrap;
}

.tesla-table td {
    padding: 10px 14px;
    min-height: 44px;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-top: none;
    border-left: none;
    border-right: none;
    color: var(--text-primary);
    vertical-align: middle;
    white-space: nowrap;
}

.tesla-table td.td-wrap {
    white-space: normal;
    min-width: 130px;
    max-width: 220px;
    word-break: break-word;
}

#supp-templates-table td {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.tesla-table tr:last-child td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tesla-table tbody tr:nth-child(odd) {
    background-color: #16181d;
}

.tesla-table tbody tr:nth-child(even) {
    background-color: #1e222a;
}

.tesla-table tbody tr:hover,
.tesla-table tbody tr:active {
    background-color: #262f40 !important;
}

.tesla-table tbody tr:hover td,
.tesla-table tbody tr:active td {
    background-color: transparent !important;
}

/* Botones de acción en tabla táctiles (Fondo semi-translúcido visible, sin contornos finos) */
.btn-action-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    min-height: 38px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(229, 169, 60, 0.16);
    color: #f5c05c;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-right: 6px;
}

.btn-action-edit:hover {
    background: var(--archi-gold);
    color: #09090b;
}

.btn-action-void {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    min-height: 38px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(244, 63, 94, 0.16);
    color: #fb7185;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-action-void:hover {
    background: var(--archi-coral);
    color: #ffffff;
}

/* Botón compacto 'X' para eliminar en tabla de inventario */
.btn-delete-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(244, 63, 94, 0.12);
    color: var(--tesla-red);
    border: 1px solid rgba(244, 63, 94, 0.35);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-left: 5px;
    line-height: 1;
    padding: 0;
    vertical-align: middle;
}

.btn-delete-x:hover {
    background: var(--tesla-red);
    color: #ffffff;
    border-color: var(--tesla-red);
    transform: scale(1.08);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
}

/* ==========================================================================
   PANEL LATERAL DERECHO DE IMAGEN Y FICHA DE PRODUCTO (INVENTARIO)
   ========================================================================== */
.inventory-desktop-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

.inventory-preview-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 18px;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
}

.inventory-preview-img-container {
    width: 100%;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.inventory-preview-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.inventory-preview-img-container:hover img {
    transform: scale(1.05);
}

.inventory-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 20px;
}

.inventory-row-active {
    background: rgba(90, 200, 250, 0.09) !important;
}

@media (max-width: 1100px) {
    .inventory-desktop-layout {
        grid-template-columns: 1fr !important;
    }
    .inventory-preview-panel {
        display: none !important;
    }
}

/* ==========================================================================
   VISTA RESPONSIVE EN TARJETAS PARA CELULARES (< 768px)
   ========================================================================== */
.sales-mobile-cards,
.suppliers-mobile-cards {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.suppliers-table-wrap {
    display: block;
}

.inventory-mobile-cards {
    display: none !important;
}

.sale-mobile-card {
    background: var(--bg-surface);
    padding: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: var(--transition-smooth);
}

.sale-mobile-card:active {
    transform: scale(0.98);
}

.sale-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sale-mobile-time {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.sale-mobile-customer {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.sale-mobile-ref {
    font-size: 0.78rem;
    font-family: monospace;
    color: var(--text-secondary);
}

.sale-mobile-amounts {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px dashed var(--border-subtle);
}

.sale-mobile-total {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text-primary);
}

.sale-mobile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 6px;
}

/* ==========================================================================
   BARRA BOTTOM NAV MÓVIL Y BOTÓN FLOTANTE FAB (BASE ESCRITORIO)
   ========================================================================== */
.archi-bottom-nav {
    display: none;
}

.archi-mobile-fab {
    display: none;
}

/* ==========================================================================
   MODALES Y FORMULARIOS ANGULARES (ORION MINIMALISM)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
}

#login-view:not(.active) {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
#login-view.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.modal-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9);
    max-width: 580px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: modalSpring 0.25s ease forwards;
}

.modal-container form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

@keyframes modalSpring {
    0% { transform: scale(0.96) translateY(10px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    padding: 18px 22px 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.modal-footer {
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

/* Formularios */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 450;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--border-active);
    background: var(--bg-card);
    box-shadow: 0 0 0 1px var(--border-active);
}

/* ==========================================================================
   PANTALLA DE LOGIN MINIMALISTA MODERNA (ESTILO ORION - NEGROS Y GRISES)
   ========================================================================== */
#login-view {
    background-color: #070709 !important;
    background-image: none !important;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 24px;
}

#login-view .modal-container {
    background: #111114 !important;
    border: 1px solid #25252e !important;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.9) !important;
    max-width: 440px;
    width: 100%;
    padding: 38px 32px !important;
    animation: none !important;
}

.login-brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    text-align: center;
}

.login-brand-logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 14px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.login-brand-title {
    font-size: 1.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #f4f4f5;
    margin-bottom: 4px;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.login-brand-title .dot {
    color: var(--archi-gold);
}

.login-brand-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #71717a;
    font-weight: 450;
}

#login-view .form-group label {
    font-size: 0.76rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a1a1aa;
    margin-bottom: 8px;
    display: block;
}

#login-view .form-control {
    background: #09090b !important;
    border: 1px solid #282832 !important;
    color: #f4f4f5 !important;
    padding: 12px 14px;
    font-size: 0.94rem;
}

#login-view .form-control:focus {
    border-color: var(--archi-gold) !important;
    background: #0f0f13 !important;
    box-shadow: none !important;
}

#login-submit-btn {
    background: #f4f4f5 !important;
    color: #09090b !important;
    border: 1px solid #ffffff !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 13px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

#login-submit-btn:hover {
    background: var(--archi-gold) !important;
    border-color: var(--archi-gold) !important;
    color: #09090b !important;
}

.login-credentials-box {
    margin-top: 26px;
    padding: 14px 16px;
    background: #0a0a0c;
    border: 1px solid #202028;
    font-size: 0.78rem;
    color: #8c8c9a;
    line-height: 1.6;
    text-align: left;
}

/* Notificaciones Toast */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.tesla-toast {
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 14px 20px;
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border-active);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    min-width: 280px;
    max-width: 420px;
    pointer-events: auto;
    animation: toastEnter 0.25s ease forwards;
}

@keyframes toastEnter {
    0% { transform: translateY(-10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   CALENDARIO INTERACTIVO DE VENTAS Y TELEMETRÍA POR FECHA
   ========================================================================== */
.calendar-widget-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 20px 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.calendar-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.calendar-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-month-heading {
    font-size: 1.20rem;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: -0.01em;
    text-transform: capitalize;
}

.calendar-nav-btn {
    background: #181822;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-smooth);
    border-radius: 4px;
}

.calendar-nav-btn:hover {
    background: var(--archi-gold);
    color: #09090b;
    border-color: var(--archi-gold);
}

.calendar-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 960px) {
    .calendar-layout-grid {
        grid-template-columns: 360px minmax(0, 1fr);
    }
}

.calendar-table-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.calendar-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 3px;
    box-sizing: border-box;
}

.calendar-table th {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 6px 0;
}

.calendar-day-cell {
    height: 44px;
    min-height: 44px;
    min-width: 44px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    user-select: none;
    border-radius: 6px;
    box-sizing: border-box;
    padding: 0;
}

.calendar-day-cell:hover:not(.day-empty) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.calendar-day-cell.day-empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

.calendar-day-cell.day-future {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.03) !important;
    opacity: 0.22 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    color: var(--text-muted) !important;
}

.calendar-day-cell.day-today {
    border-color: #38bdf8 !important;
}

.calendar-day-cell.day-has-sales {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.25);
}

.calendar-day-cell.day-has-sales:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
}

.calendar-day-cell.day-selected {
    background: #38bdf8 !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

.calendar-day-cell.day-selected .day-num {
    color: #0b111a !important;
    font-weight: 700;
}

.calendar-day-cell.day-selected .day-sales-dot {
    background: #0b111a !important;
}

.calendar-day-cell.day-range-start,
.calendar-day-cell.day-range-end {
    background: #38bdf8 !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

.calendar-day-cell.day-range-start .day-num,
.calendar-day-cell.day-range-end .day-num {
    color: #0b111a !important;
    font-weight: 700;
}

.calendar-day-cell.day-range-start .day-sales-dot,
.calendar-day-cell.day-range-end .day-sales-dot {
    background: #0b111a !important;
}

.calendar-day-cell.day-in-range {
    background: rgba(56, 189, 248, 0.20) !important;
    border-color: rgba(56, 189, 248, 0.40) !important;
}

.calendar-day-cell.day-in-range .day-num {
    color: #ffffff !important;
    font-weight: 600;
}

/* Toolbar de Rango Personalizado y Filtros (Base) */
.cal-range-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 8px 8px 0 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.cal-range-picker-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cal-section-label {
    font-size: 0.80rem;
    font-weight: 500;
    color: var(--archi-gold);
    white-space: nowrap;
}

.cal-range-inputs-flex {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cal-range-field {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cal-field-tag {
    font-size: 0.76rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 450;
}

.cal-date-input {
    width: 135px;
    padding: 5px 8px;
    font-size: 0.82rem;
    height: 34px;
}

.cal-btn-sumar {
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e5a93c 0%, #cf8b22 100%);
    color: #09090b;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(229, 169, 60, 0.25);
}

.cal-btn-sumar:hover {
    background: linear-gradient(135deg, #f0b44a 0%, #da942b 100%);
    box-shadow: 0 3px 12px rgba(229, 169, 60, 0.35);
}

.cal-btn-sumar:active {
    transform: scale(0.98);
}

.cal-topbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cal-status-badge {
    font-size: 0.78rem;
    font-weight: 450;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    display: inline-block;
    line-height: 1.3;
}

.cal-quick-chips-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cal-quick-chips-wrapper button {
    padding: 5px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.cal-filters-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
}

.cal-filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cal-filter-tag {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 450;
    white-space: nowrap;
}

.cal-filter-select {
    padding: 4px 8px;
    font-size: 0.80rem;
    height: 32px;
}

.ranking-card-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 14px 16px;
    transition: all 0.2s ease;
}

.ranking-card-item:hover {
    border-color: rgba(229, 169, 60, 0.4);
    background: rgba(255, 255, 255, 0.04);
}

.ranking-bar-track {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

.ranking-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.day-num {
    font-size: 0.85rem;
    font-weight: 450;
    color: var(--text-primary);
    display: block;
    line-height: 1;
    margin: 0;
}

.day-sales-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #30d158;
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

/* Panel de Detalle del Día / Período (KPIs de Telemetría) */
.day-details-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;
    min-width: 0;
    box-sizing: border-box;
}

.day-details-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

@media (max-width: 768px) {
    .day-details-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.day-kpi-card {
    background: #111116;
    border: 1px solid var(--border-subtle);
    padding: 10px 12px;
    border-radius: 6px;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 84px;
}

.day-kpi-footer-action {
    margin-top: auto;
    padding-top: 6px;
    display: flex;
    align-items: center;
}

.day-kpi-badge-action {
    font-size: 0.68rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap !important;
    flex-shrink: 0;
    line-height: 1.25;
    transition: all 0.2s ease;
    cursor: pointer;
}

.day-kpi-action-gold {
    color: var(--archi-gold);
    background: rgba(229, 169, 60, 0.12);
    border: 1px solid rgba(229, 169, 60, 0.25);
}

.day-kpi-action-gold:hover {
    background: rgba(229, 169, 60, 0.22);
    border-color: var(--archi-gold);
}

.day-kpi-action-danger {
    color: #ff453a;
    background: rgba(255, 69, 58, 0.12);
    border: 1px solid rgba(255, 69, 58, 0.25);
}

.day-kpi-action-danger:hover {
    background: rgba(255, 69, 58, 0.22);
    border-color: #ff453a;
}

.day-kpi-card.highlight-total {
    border: 1px solid var(--border-subtle);
}

.day-kpi-card.highlight-cash {
    border: 1px solid var(--border-subtle);
}

.day-kpi-card.highlight-debit {
    border: 1px solid var(--border-subtle);
}

.day-kpi-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-muted);
}

.day-kpi-value {
    font-size: 1.15rem;
    font-weight: 500;
    color: #ffffff;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

/* Sección de Transacciones a Ancho Completo (Sin desplazamiento lateral) */
.day-sales-full-section {
    width: 100%;
    box-sizing: border-box;
}

.day-sales-table-wrapper {
    width: 100%;
    max-height: 440px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: #0d0d12;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(229, 169, 60, 0.35) rgba(0, 0, 0, 0.2);
}

.day-sales-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    table-layout: auto;
}

.day-sales-table th {
    background: #0f172a;
    padding: 12px 14px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: nowrap;
    border-bottom: 2px solid #334155;
    border-top: none;
    border-left: none;
    border-right: none;
}

.day-sales-table tbody tr {
    min-height: 44px;
    height: 44px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.15s ease;
}

.day-sales-table tbody tr:nth-child(odd) {
    background-color: #16181d;
}

.day-sales-table tbody tr:nth-child(even) {
    background-color: #1e222a;
}

.day-sales-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-top: none;
    border-left: none;
    border-right: none;
    color: var(--text-primary);
    white-space: nowrap;
    vertical-align: middle;
}

.day-sales-table tbody tr:hover,
.day-sales-table tbody tr:active {
    background-color: #262f40 !important;
}

.day-sales-table tbody tr:hover td,
.day-sales-table tbody tr:active td {
    background-color: transparent !important;
}

/* ==========================================================================
   OPTIMIZACIÓN POS / PANTALLA 7" (1024x600 px) Y TERMINALES COMPACTAS (FASE 3)
   Garantiza que la barra lateral quepa completa sin cortes verticales, que
   los modales se adapten a 600px de alto y que el contenido aproveche el ancho.
   ========================================================================== */
@media screen and (min-width: 901px) and (max-height: 660px),
       screen and (min-width: 901px) and (max-width: 1080px) and (max-height: 720px) {
    /* Barra lateral compacta que cabe 100% en 600px de altura */
    .sidebar {
        width: 215px !important;
        padding: 10px 10px !important;
        overflow-y: auto !important;
        scrollbar-width: thin !important;
    }
    
    .brand-logo {
        padding: 0 4px 8px 4px !important;
        margin-bottom: 8px !important;
        gap: 8px !important;
    }
    
    .brand-logo-img {
        width: 26px !important;
        height: 26px !important;
    }
    
    .brand-name {
        font-size: 1.15rem !important;
    }
    
    .brand-tagline {
        font-size: 0.65rem !important;
    }
    
    .nav-section-label {
        padding: 4px 8px 1px 8px !important;
        font-size: 0.65rem !important;
        margin-top: 2px !important;
    }
    
    .nav-item {
        padding: 6px 10px !important;
        gap: 8px !important;
        font-size: 0.82rem !important;
        min-height: 32px !important;
    }
    
    .nav-item svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .sidebar-user {
        padding: 6px 8px !important;
        margin-top: 6px !important;
        gap: 8px !important;
    }
    
    .sidebar-avatar {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.72rem !important;
    }

    /* Topbar y área de contenido compactas */
    .topbar {
        height: 48px !important;
        padding: 0 16px !important;
    }
    
    .content-area {
        padding: 12px 16px 20px 16px !important;
        max-width: 100% !important;
    }
    
    .main-wrapper {
        padding-bottom: 20px !important;
    }
    
    /* Encabezados de página y títulos */
    .archi-page-header,
    .view-header-bar,
    .ds-header-bar,
    .supp-header-bar,
    .cashflow-header-bar,
    .taxes-header-bar {
        margin-bottom: 12px !important;
        gap: 8px !important;
    }
    
    .archi-header-title {
        font-size: 1.25rem !important;
    }
    
    /* Hero Banner y widget de telemetría compactos */
    .archi-hero-banner {
        padding: 14px 18px !important;
        margin-bottom: 12px !important;
        gap: 12px !important;
    }
    
    .archi-hero-banner h1 {
        font-size: 1.35rem !important;
        margin-bottom: 4px !important;
    }
    
    .archi-circle-widget {
        width: 135px !important;
        height: 135px !important;
        padding: 8px !important;
    }
    
    .circle-amount {
        font-size: 1.30rem !important;
    }
    
    .hero-actions-container {
        gap: 6px !important;
    }
    
    .hero-actions-container .btn-archi {
        padding: 7px 12px !important;
        font-size: 0.78rem !important;
    }

    /* Modales adaptados a altura de 600px */
    .modal-overlay {
        padding: 8px !important;
    }
    
    .modal-container {
        max-height: 96vh !important;
        max-width: 580px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .modal-header {
        padding: 10px 16px 8px 16px !important;
        flex-shrink: 0 !important;
    }
    
    .modal-header h3 {
        font-size: 1.10rem !important;
    }
    
    .modal-body {
        padding: 12px 16px !important;
        overflow-y: auto !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
    }
    
    .modal-footer {
        padding: 8px 16px !important;
        flex-shrink: 0 !important;
    }
    
    .form-group {
        margin-bottom: 8px !important;
    }
    
    .form-group label {
        font-size: 0.74rem !important;
        margin-bottom: 3px !important;
    }
    
    .form-control {
        padding: 7px 10px !important;
        font-size: 0.88rem !important;
    }

    /* Grids de Métricas y KPIs */
    .metrics-grid,
    .supp-kpis-grid,
    .cashflow-kpis-grid {
        gap: 10px !important;
        margin-bottom: 12px !important;
    }
    
    .metric-card {
        padding: 10px 12px !important;
    }
    
    .metric-value {
        font-size: 1.30rem !important;
    }
    
    /* Tablas adaptadas con scroll vertical contenido */
    .table-responsive {
        max-height: calc(100vh - 180px) !important;
        overflow-y: auto !important;
    }
    
    .table-modern th,
    .table-modern td,
    .archi-table th,
    .archi-table td {
        padding: 7px 10px !important;
        font-size: 0.80rem !important;
    }
    
    /* Sub-pestañas pill */
    .archi-subnav-tabs {
        margin-bottom: 12px !important;
        padding-bottom: 6px !important;
    }
    
    .archi-subnav-btn {
        padding: 6px 12px !important;
        font-size: 0.76rem !important;
        min-height: 34px !important;
    }

    /* Vista OCR optimizada para 1024x600 y terminales 7" (Fase 3) */
    .ocr-view-section,
    #view-ocr {
        padding-bottom: 24px !important;
    }

    .ocr-main-grid {
        gap: 12px !important;
    }

    .ocr-main-grid > .archi-card {
        padding: 12px 14px !important;
    }

    .ocr-meta-grid {
        gap: 8px !important;
        margin-bottom: 8px !important;
    }

    .ocr-form-field .ocr-label {
        font-size: 0.70rem !important;
        margin-bottom: 2px !important;
    }

    .ocr-input-ctrl {
        height: 32px !important;
        font-size: 0.80rem !important;
        padding: 4px 8px !important;
    }

    .ocr-payments-section {
        padding: 8px 10px !important;
        margin-bottom: 8px !important;
        border-radius: 8px !important;
    }

    .ocr-payments-header {
        margin-bottom: 6px !important;
    }

    .ocr-payments-title {
        font-size: 0.68rem !important;
    }

    .ocr-payments-grid {
        gap: 6px !important;
    }

    .ocr-pay-card {
        padding: 6px 8px !important;
        gap: 4px !important;
    }

    .ocr-pay-name {
        font-size: 0.70rem !important;
    }

    .ocr-currency-badge {
        font-size: 0.62rem !important;
        padding: 1px 3px !important;
    }

    .ocr-input-currency-wrapper {
        height: 32px !important;
        padding: 0 8px !important;
        gap: 4px !important;
    }

    .ocr-pay-input,
    input.form-control.ocr-pay-input {
        height: 100% !important;
        min-height: 0 !important;
        font-size: 0.84rem !important;
        padding: 0 !important;
    }

    .ocr-currency-symbol {
        position: static !important;
        left: auto !important;
        font-size: 0.76rem !important;
    }

    .ocr-total-display-card {
        padding: 8px 12px !important;
        margin-bottom: 8px !important;
        border-radius: 8px !important;
    }

    .ocr-total-card-header {
        margin-bottom: 2px !important;
    }

    .ocr-total-card-label {
        font-size: 0.70rem !important;
    }

    .ocr-total-card-badge {
        font-size: 0.66rem !important;
        padding: 1px 6px !important;
    }

    .ocr-total-card-number {
        font-size: 1.45rem !important;
        margin: 2px 0 !important;
    }

    .ocr-total-card-footer {
        font-size: 0.68rem !important;
        margin-top: 2px !important;
    }

    .ocr-confirm-actions {
        margin-top: 4px !important;
        margin-bottom: 8px !important;
        padding-bottom: 4px !important;
    }

    .ocr-submit-btn {
        min-height: 38px !important;
        padding: 8px 16px !important;
        font-size: 0.84rem !important;
    }

    #ocr-drop-zone {
        padding: 14px 10px !important;
    }

    #ocr-drop-zone svg {
        width: 30px !important;
        height: 30px !important;
        margin-bottom: 4px !important;
    }

    .ocr-upload-actions-grid {
        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    .ocr-upload-actions-grid .btn-archi {
        padding: 8px 8px !important;
        font-size: 0.80rem !important;
    }

    /* Calendario Interactivo y Telemetría en 1024x600 y terminales 7" */
    .calendar-widget-card {
        padding: 12px 14px !important;
        margin-bottom: 12px !important;
    }

    .cal-range-toolbar {
        padding: 8px 10px !important;
        margin-bottom: 8px !important;
        gap: 8px !important;
    }

    .cal-range-picker-box {
        gap: 6px !important;
    }

    .cal-range-field .cal-date-input {
        height: 28px !important;
        font-size: 0.80rem !important;
        padding: 2px 6px !important;
    }

    .cal-quick-chips-wrapper button {
        padding: 3px 8px !important;
        font-size: 0.72rem !important;
    }

    .cal-filters-inline {
        gap: 6px !important;
    }

    .cal-filter-select {
        height: 28px !important;
        font-size: 0.76rem !important;
        padding: 2px 6px !important;
    }

    .calendar-topbar {
        margin-bottom: 8px !important;
        gap: 6px !important;
    }

    .calendar-month-heading {
        font-size: 1.02rem !important;
    }

    .calendar-nav-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.80rem !important;
    }

    .cal-status-badge {
        font-size: 0.70rem !important;
        padding: 2px 8px !important;
    }

    .calendar-layout-grid {
        grid-template-columns: 310px minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    .calendar-table th {
        font-size: 0.70rem !important;
        padding: 2px 0 !important;
    }

    .calendar-day-cell {
        height: 44px !important;
        min-height: 44px !important;
        min-width: 44px !important;
    }

    .day-num {
        font-size: 0.78rem !important;
    }

    .day-details-panel {
        padding: 8px 10px !important;
        gap: 6px !important;
    }

    .day-details-panel h3 {
        font-size: 0.90rem !important;
    }

    .day-details-date-badge {
        font-size: 0.70rem !important;
    }

    .day-details-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    .day-kpi-card {
        padding: 5px 7px !important;
        border-radius: 5px !important;
        min-height: auto !important;
    }

    .day-kpi-label {
        font-size: 0.65rem !important;
    }

    .day-kpi-value {
        font-size: 0.95rem !important;
        margin-top: 1px !important;
    }

    .day-kpi-badge-action {
        font-size: 0.62rem !important;
        padding: 1px 4px !important;
    }
}

/* ==========================================================================
   CONSIDERACIONES RESPONSIVE (CELULARES)
   ========================================================================== */
@media (max-width: 900px) {
    .sidebar {
        display: none !important;
    }
    .topbar-mobile-brand {
        display: flex;
    }
    .archi-hero-banner {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
        gap: 18px;
    }
    .archi-hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    .hero-actions-container {
        justify-content: center !important;
    }
    .archi-hero-beach-bg {
        display: block !important;
        opacity: 0.4;
    }
    
    /* Dock de Navegación Inferior Ergonómico */
    .archi-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        min-height: calc(56px + env(safe-area-inset-bottom, 0px));
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)) 6px;
        background: rgba(12, 13, 16, 0.96);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        align-items: center;
        justify-content: space-around;
        z-index: 1000;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
        border-radius: 16px 16px 0 0;
    }
    
    .mobile-nav-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 48px;
        padding: 4px 0;
        background: transparent;
        border: none;
        color: #8e8e93;
        cursor: pointer;
        border-radius: 8px;
        transition: color 0.18s ease, transform 0.12s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .mobile-nav-btn:active {
        transform: scale(0.92);
    }
    
    .mobile-nav-btn.active {
        color: #ffffff;
    }
    
    .mobile-nav-btn.active svg {
        stroke: var(--archi-gold);
        filter: drop-shadow(0 0 6px rgba(229, 169, 60, 0.45));
    }
    
    .mobile-nav-btn .nav-label {
        font-size: 0.75rem;
        font-weight: 450;
        letter-spacing: 0.02em;
        line-height: 1;
    }
    
    .mobile-nav-btn.active .nav-label {
        color: var(--archi-gold);
        font-weight: 500;
    }
}

@media (max-width: 768px) {
    /* Área de Contenido con Espacio Seguro para Gestos, Dock y FAB */
    .content-area {
        padding: 10px 12px calc(140px + env(safe-area-inset-bottom, 0px)) 12px !important;
    }
    
    .view-section {
        padding-bottom: 24px !important;
    }

    /* Proporciones de Encabezados en Móvil (Protección de Espacio Vertical) */
    .archi-header-title {
        font-size: 1.25rem !important;
    }

    .archi-page-header,
    .view-header-bar,
    .ds-header-bar,
    .supp-header-bar,
    .cashflow-header-bar,
    .taxes-header-bar {
        margin-bottom: 14px !important;
        gap: 10px !important;
    }
    
    /* Barra Superior Compacta */
    .topbar {
        padding: 0 14px !important;
        height: 52px !important;
    }
    
    .topbar .btn-archi-primary {
        display: none !important; /* Reemplazado ergonómicamente por el FAB móvil en la zona del pulgar */
    }
    
    /* Botón Flotante Rápido Nueva Venta Centrado Ergonómicamente */
    .archi-mobile-fab {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 7px;
        position: fixed;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 28px;
        padding: 10px 22px;
        font-size: 0.90rem;
        font-weight: 500;
        letter-spacing: 0.02em;
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
        z-index: 1050;
        cursor: pointer;
        transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .archi-mobile-fab:active {
        transform: translateX(-50%) scale(0.93) !important;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

    /* Botones de Acción de Telemetría Central (Hero) Centrados y Uniformes en Móvil */
    .hero-actions-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 14px auto 0 auto !important;
        gap: 10px !important;
    }
    
    .hero-actions-container .btn-archi {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 12px 18px !important;
        font-size: 0.88rem !important;
        letter-spacing: 0.03em !important;
        box-sizing: border-box !important;
    }

    /* Botones de Encabezado en Vistas Móviles */
    .view-header-actions {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
    }
    
    .view-header-actions button {
        flex: 1 1 auto !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* Boton Ver Ventas & Historial Centrado y Agrandado en Movil */
    .analytics-header-bar {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 12px !important;
        margin-bottom: 18px !important;
    }

    .analytics-header-title-box {
        text-align: center !important;
        align-items: center !important;
        width: 100% !important;
    }

    .analytics-header-actions {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 4px auto 0 auto !important;
    }

    .btn-analytics-history {
        width: 100% !important;
        max-width: 320px !important;
        padding: 13px 24px !important;
        font-size: 0.96rem !important;
        font-weight: 600 !important;
        min-height: 48px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    /* Modales Transformados en Native Bottom Sheets */
    .modal-overlay {
        align-items: flex-end !important;
        justify-content: center !important;
        padding: 0 !important;
        background: rgba(0, 0, 0, 0.82) !important;
    }

    .modal-container {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 88vh !important;
        border-radius: 22px 22px 0 0 !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-bottom: none !important;
        box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.9) !important;
        animation: slideUpBottomSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
        display: flex;
        flex-direction: column;
        margin: 0 !important;
    }

    .modal-container::before {
        content: '';
        display: block;
        width: 44px;
        height: 4.5px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 3px;
        margin: 10px auto 4px auto;
        flex-shrink: 0;
    }

    .modal-header {
        padding: 10px 18px 12px 18px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        flex-shrink: 0;
    }

    .modal-container form {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .modal-body {
        padding: 16px 14px calc(55px + env(safe-area-inset-bottom, 0px)) 14px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex: 1 1 auto;
    }

    .modal-footer {
        position: sticky !important;
        bottom: 0 !important;
        background: rgba(14, 15, 19, 0.97) !important;
        backdrop-filter: blur(14px) !important;
        -webkit-backdrop-filter: blur(14px) !important;
        padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)) 16px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5) !important;
        flex-shrink: 0;
        z-index: 10;
        display: flex;
        gap: 10px;
    }

    .modal-footer button {
        min-height: 46px !important;
        font-size: 0.92rem !important;
        flex: 1;
        justify-content: center;
        border-radius: 8px !important;
    }

    /* Prevenir el Auto-Zoom forzado de Safari / Android Chrome en Inputs */
    .form-control, input, select, textarea {
        font-size: 16px !important;
        border-radius: 8px !important;
    }

    /* Ocultar Tablas Rígidas en Móvil */
    .archi-table-container {
        display: none !important;
    }

    /* Tarjetas Móviles de Ventas, Inventario y Proveedores */
    .sales-mobile-cards,
    .inventory-mobile-cards,
    .suppliers-mobile-cards {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .suppliers-table-wrap {
        display: none !important;
    }

    .sale-mobile-card,
    .inventory-mobile-card {
        background: var(--bg-surface) !important;
        border: 1px solid var(--border-subtle) !important;
        border-radius: 12px !important;
        padding: 15px !important;
        display: flex;
        flex-direction: column;
        gap: 10px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
        transition: transform 0.15s ease;
    }

    .sale-mobile-card:active,
    .inventory-mobile-card:active {
        transform: scale(0.985);
    }

    .sale-mobile-actions,
    .inventory-card-actions {
        display: flex;
        gap: 8px;
        margin-top: 4px;
        flex-wrap: wrap;
    }

    .sale-mobile-actions button,
    .inventory-card-actions button {
        min-height: 44px !important;
        padding: 8px 14px !important;
        font-size: 0.84rem !important;
        font-weight: 500 !important;
        border-radius: 6px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sale-mobile-actions button:active,
    .inventory-card-actions button:active {
        transform: scale(0.95);
    }

    /* Métricas Financieras en Móvil (Grilla 2x2 Limpia) */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .metric-card {
        padding: 12px 14px !important;
        border-radius: 10px !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .metric-card .metric-label {
        font-size: 0.75rem !important;
        line-height: 1.25 !important;
    }

    .metric-value {
        font-size: 1.18rem !important;
    }

    .metric-card .metric-trend {
        font-size: 0.75rem !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
    }

    /* Panel de Control de Metas y Costos Fijos en Móvil */
    .dash-goal-card {
        padding: 14px 12px !important;
        margin-bottom: 18px !important;
        border-radius: 12px !important;
    }

    .dash-goal-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .dash-goal-header-actions {
        width: 100% !important;
    }

    .dash-adjust-goal-btn {
        width: 100% !important;
        justify-content: center !important;
        height: 38px !important;
        font-size: 0.82rem !important;
    }

    .dash-goal-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .dash-goal-subcards-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .dash-goal-modal-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Barra Deslizable de Filtros Rápidos (Horizontal Scroll sin corte) */
    .filter-tabs {
        padding: 4px;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        max-width: 100%;
        display: flex !important;
        gap: 6px !important;
        scrollbar-width: none;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-tab {
        padding: 8px 14px !important;
        font-size: 0.82rem !important;
        min-height: 38px !important;
        border-radius: 6px !important;
        flex-shrink: 0;
    }

    /* Toolbar de Rango Personalizado en Móvil */
    .cal-range-toolbar {
        padding: 12px 10px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .cal-range-picker-box {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 10px !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }

    .cal-section-label {
        font-size: 0.75rem !important;
        font-weight: 500 !important;
        color: var(--archi-gold) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.04em !important;
        display: block !important;
    }

    .cal-range-inputs-flex {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .cal-range-field {
        display: flex !important;
        flex-direction: column !important;
        gap: 3px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .cal-field-tag {
        font-size: 0.75rem !important;
        color: var(--text-muted) !important;
        font-weight: 500 !important;
        text-transform: uppercase !important;
        display: block !important;
    }

    .cal-date-input {
        width: 100% !important;
        min-width: 0 !important;
        height: 42px !important;
        padding: 6px 8px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        background: var(--bg-input) !important;
        color: #ffffff !important;
        border: 1px solid var(--border-subtle) !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    .cal-date-input::-webkit-calendar-picker-indicator {
        filter: invert(0.85);
        cursor: pointer;
        padding: 2px;
    }

    .cal-btn-sumar {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        min-height: 44px !important;
        height: 44px !important;
        font-size: 0.90rem !important;
        font-weight: 500 !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: linear-gradient(135deg, #e5a93c 0%, #d4952b 100%) !important;
        color: #09090b !important;
        border: none !important;
        box-shadow: 0 4px 14px rgba(229, 169, 60, 0.35) !important;
        cursor: pointer !important;
        letter-spacing: 0.02em !important;
    }

    .cal-btn-sumar:active {
        transform: scale(0.97) !important;
    }

    /* Accesos rápidos en carrusel horizontal */
    .cal-quick-chips-wrapper {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        gap: 6px !important;
        width: 100% !important;
        scrollbar-width: none !important;
        padding-bottom: 2px !important;
        box-sizing: border-box !important;
    }

    .cal-quick-chips-wrapper::-webkit-scrollbar {
        display: none;
    }

    .cal-quick-chips-wrapper button {
        flex-shrink: 0 !important;
        min-height: 38px !important;
        padding: 8px 14px !important;
        font-size: 0.82rem !important;
        border-radius: 6px !important;
    }

    /* Selectores de Sucursal y Vendedor en 2 columnas */
    .cal-filters-inline {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .cal-filter-item {
        display: flex !important;
        flex-direction: column !important;
        gap: 3px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .cal-filter-tag {
        font-size: 0.75rem !important;
        color: var(--text-muted) !important;
        font-weight: 500 !important;
        text-transform: uppercase !important;
        display: block !important;
    }

    .cal-filter-select {
        width: 100% !important;
        min-width: 0 !important;
        height: 40px !important;
        padding: 6px 8px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
        background: var(--bg-input) !important;
        color: #ffffff !important;
        border: 1px solid var(--border-subtle) !important;
        box-sizing: border-box !important;
    }
}

@keyframes slideUpBottomSheet {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .archi-photo-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }
    .photo-card-img {
        height: 110px;
        padding: 8px;
    }
    .photo-card-badge {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    .photo-card-body {
        padding: 10px 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .photo-card-info h4 {
        font-size: 0.84rem;
        line-height: 1.25;
    }
    .photo-card-info p {
        display: none;
    }
    .photo-card-arrow-btn {
        width: 28px;
        height: 28px;
        font-size: 0.84rem;
        align-self: flex-end;
    }
    .tip-card {
        padding: 14px;
        gap: 12px;
    }
    .tip-thumb {
        width: 68px;
        height: 68px;
        min-width: 68px;
    }
    .tip-title {
        font-size: 0.88rem;
    }
    .tip-desc {
        font-size: 0.78rem;
    }
}

/* ==========================================================================
   TELEMETRÍA CENTRAL RESPONSIVA Y BOTONES OCR / IA
   ========================================================================== */
/* Reglas universales para evitar desbordamiento de gráficos Canvas */
canvas {
    max-width: 100% !important;
}

.chart-container-responsive {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.dashboard-charts-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.dashboard-charts-grid > .archi-card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

@media (max-width: 768px) {
    #view-dashboard {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .dashboard-charts-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .dashboard-charts-grid > .archi-card {
        padding: 16px 14px !important;
        border-radius: 10px !important;
    }

    .chart-container-responsive {
        height: 240px !important;
    }

    .dash-alert-podium-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    .dash-alert-podium-grid > .archi-card {
        padding: 14px 12px !important;
    }

    .branch-monitoring-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
        gap: 10px !important;
    }

    .branch-telemetry-card {
        padding: 12px 10px !important;
    }

    .compare-selectors-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 12px !important;
    }

    .compare-vs-badge {
        text-align: center !important;
        padding: 2px 0 !important;
    }

    .compare-submit-btn {
        width: 100% !important;
    }
}

.ocr-upload-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .ocr-upload-actions-grid {
        grid-template-columns: 1fr;
    }
}

.ai-vision-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    background: rgba(0, 113, 227, 0.12);
    color: #5ac8fa;
    border: 1px solid rgba(0, 113, 227, 0.35);
}

.ai-vision-pill.active {
    background: rgba(48, 209, 88, 0.12);
    color: #30d158;
    border-color: rgba(48, 209, 88, 0.35);
}

.ai-vision-pill.warning {
    background: rgba(255, 159, 10, 0.12);
    color: #ff9f0a;
    border-color: rgba(255, 159, 10, 0.35);
}

/* ==========================================================================
   PANEL DE VERIFICACION Y CONFIRMACION DE CIFRAS (OCR)
   ========================================================================== */

.ocr-main-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.92fr) minmax(380px, 1.25fr);
    gap: 24px;
    align-items: start;
}

@media (min-width: 1050px) {
    .ocr-main-grid > .archi-card:first-child {
        position: sticky;
        top: 18px;
    }
}

@media (max-width: 980px) {
    .ocr-main-grid {
        grid-template-columns: 1fr;
    }
}

.ocr-verify-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.ocr-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .ocr-meta-grid {
        grid-template-columns: 1fr;
    }
}

.ocr-form-field {
    display: flex;
    flex-direction: column;
}

.ocr-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: block;
}

.ocr-req {
    color: var(--archi-gold);
    font-weight: 600;
}

.ocr-input-ctrl {
    width: 100% !important;
    height: 40px !important;
    font-size: 0.85rem !important;
    padding: 6px 12px !important;
    background: var(--bg-input) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 7px !important;
    color: #ffffff !important;
}

.ocr-input-ctrl:focus {
    border-color: var(--archi-gold) !important;
    outline: none !important;
}

/* Desglose por Medio de Pago */
.ocr-payments-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}

.ocr-payments-header {
    margin-bottom: 12px;
}

.ocr-payments-title {
    font-size: 0.76rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ocr-payments-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.ocr-pay-card {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.ocr-pay-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

.ocr-pay-title-group {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.ocr-pay-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ocr-pay-name {
    font-size: 0.74rem;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
}

.ocr-pay-name-ext {
    display: inline;
}

@media (max-width: 1250px) {
    .ocr-pay-name-ext {
        display: none;
    }
}

.ocr-currency-badge {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-mono);
    flex-shrink: 0;
    padding: 1px 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    line-height: 1.2;
}

.ocr-input-currency-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.ocr-input-currency-wrapper:focus-within {
    border-color: var(--archi-gold);
    background: rgba(255, 255, 255, 0.04);
}

.ocr-currency-symbol {
    position: static !important;
    left: auto !important;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    pointer-events: none;
    flex-shrink: 0;
    user-select: none;
}

.ocr-pay-input,
input.form-control.ocr-pay-input {
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    font-size: 0.94rem !important;
    font-weight: 600 !important;
    font-family: 'JetBrains Mono', monospace !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

.ocr-pay-input:focus,
input.form-control.ocr-pay-input:focus {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Tarjetas de Ítems Extraídos */
.ocr-item-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 10px 12px;
    transition: border-color 0.2s ease;
}

.ocr-item-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.ocr-item-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.ocr-item-title-wrap {
    min-width: 0;
    flex: 1 1 auto;
}

.ocr-item-name {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.ocr-item-metrics {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ocr-item-qty-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    padding: 2px 7px;
    white-space: nowrap;
}

.ocr-item-pack-pill {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--archi-mint);
    background: rgba(62, 207, 178, 0.10);
    border: 1px solid rgba(62, 207, 178, 0.28);
    border-radius: 4px;
    padding: 1px 6px;
}

.ocr-item-subtotal {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--archi-gold);
    white-space: nowrap;
}

.ocr-item-card-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.ocr-item-scan-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ocr-item-scan-input,
input.form-control.ocr-item-scan-input {
    flex: 1 1 170px;
    min-width: 0 !important;
    height: 32px !important;
    min-height: 32px !important;
    font-size: 0.76rem !important;
    font-family: 'JetBrains Mono', monospace !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
}

.ocr-item-cam-btn {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 0.74rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
}

.ocr-item-conv-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 8px;
}

.ocr-item-conv-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ocr-mini-num-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.71rem;
    color: var(--text-secondary);
}

.ocr-mini-num,
input.form-control.ocr-mini-num {
    width: 60px !important;
    min-width: 60px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 2px 6px !important;
    text-align: center !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
}

.ocr-item-stock-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.73rem;
}

.ocr-item-total-units {
    color: var(--archi-positive);
    font-weight: 700;
}

.ocr-item-badge-learned {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--archi-positive);
    background: rgba(48, 209, 88, 0.12);
    border: 1px solid rgba(48, 209, 88, 0.3);
    border-radius: 4px;
    padding: 1px 6px;
}

.ocr-item-badge-pending {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--archi-gold);
    background: rgba(229, 169, 60, 0.10);
    border: 1px solid rgba(229, 169, 60, 0.28);
    border-radius: 4px;
    padding: 1px 6px;
}

.ocr-item-select,
select.form-control.ocr-item-select {
    width: 100% !important;
    min-width: 0 !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 0.78rem !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
}

.ocr-item-unit-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.71rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Tarjeta del Total Calculado de la Jornada (Maxima Opacidad y Brillo) */
.ocr-total-display-card {
    background: linear-gradient(135deg, rgba(229, 169, 60, 0.12), rgba(20, 20, 26, 0.95)) !important;
    border: 1px solid rgba(229, 169, 60, 0.45) !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.ocr-total-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 6px;
}

.ocr-total-card-label {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    opacity: 1 !important;
}

.ocr-total-card-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--archi-gold);
    background: rgba(229, 169, 60, 0.15);
    border: 1px solid rgba(229, 169, 60, 0.3);
    border-radius: 12px;
    padding: 2px 8px;
}

.ocr-total-card-number {
    font-size: 2.1rem !important;
    font-weight: 700 !important;
    color: var(--archi-gold) !important;
    font-family: 'JetBrains Mono', monospace !important;
    text-shadow: 0 0 24px rgba(229, 169, 60, 0.4) !important;
    line-height: 1.25 !important;
    margin: 4px 0 !important;
    opacity: 1 !important;
}

.ocr-total-card-footer {
    font-size: 0.75rem !important;
    color: var(--text-secondary) !important;
    margin-top: 4px !important;
    opacity: 1 !important;
}

.ocr-confirm-actions {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
    margin-bottom: 24px;
    padding-bottom: 12px;
}

.ocr-submit-btn {
    width: 100% !important;
    max-width: 360px !important;
    min-height: 48px !important;
    padding: 13px 22px !important;
    font-size: 0.94rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 8px !important;
    cursor: pointer;
}

@media (max-width: 600px) {
    .ocr-payments-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .ocr-pay-card {
        padding: 10px 14px !important;
    }
    .ocr-pay-name {
        font-size: 0.78rem !important;
    }
    .ocr-pay-input {
        height: 42px !important;
        font-size: 1.05rem !important;
    }
    .ocr-total-card-number {
        font-size: 2rem !important;
    }
    .ocr-confirm-actions {
        margin-bottom: 40px !important;
        padding-bottom: 20px !important;
    }
}

/* ==========================================================================
   OPTIMIZACIONES MÓVILES PARA CALENDARIO DE TELEMETRÍA (AMBOS APARTADOS)
   ========================================================================== */
@media (max-width: 768px) {
    .calendar-widget-card {
        padding: 12px 10px !important;
        border-radius: 12px !important;
        margin-bottom: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .calendar-topbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        margin-bottom: 12px !important;
    }

    .calendar-title-group {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    .calendar-month-heading {
        font-size: 1.05rem !important;
        text-align: center;
    }

    .calendar-nav-btn {
        width: 36px !important;
        height: 36px !important;
        border-radius: 6px !important;
    }

    .cal-topbar-actions {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 6px !important;
    }

    .cal-status-badge {
        width: 100% !important;
        text-align: center !important;
        display: block !important;
        font-size: 0.75rem !important;
        padding: 6px 8px !important;
        border-radius: 6px !important;
        box-sizing: border-box !important;
    }

    .btn-reset-date-filter {
        width: 100% !important;
        justify-content: center !important;
        height: 36px !important;
        font-size: 0.80rem !important;
        border-radius: 6px !important;
    }

    .calendar-layout-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .calendar-table-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        box-sizing: border-box !important;
    }

    .calendar-table {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        border-collapse: separate !important;
        border-spacing: 2px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .calendar-table th {
        font-size: 0.75rem !important;
        padding: 4px 0 !important;
        width: auto !important;
        text-align: center !important;
    }

    .calendar-day-cell {
        height: 44px !important;
        min-height: 44px !important;
        min-width: 44px !important;
        width: auto !important;
        border-radius: 6px !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        position: relative !important;
    }

    .day-num {
        font-size: 0.82rem !important;
        font-weight: 500 !important;
        line-height: 1 !important;
    }

    .day-sales-dot {
        width: 4px !important;
        height: 4px !important;
        position: absolute !important;
        bottom: 3px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        pointer-events: none !important;
    }

    .day-details-panel {
        padding: 12px 10px !important;
        border-radius: 10px !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Grilla simétrica 2x2 en teléfonos móviles para los KPIs del día */
    .day-details-kpis {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .day-kpi-card {
        padding: 8px 10px !important;
        border-radius: 6px !important;
        min-height: auto !important;
    }

    .day-kpi-label {
        font-size: 0.75rem !important;
    }

    .day-kpi-value {
        font-size: 1.02rem !important;
    }

    /* Tabla de transacciones diaria con scroll horizontal fluido en móvil */
    .day-sales-table-wrapper {
        max-height: 340px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .day-sales-table {
        min-width: 620px !important;
    }

    .day-sales-table th,
    .day-sales-table td {
        padding: 8px 10px !important;
        font-size: 0.78rem !important;
    }
}

@media (max-width: 480px) {
    .calendar-widget-card {
        padding: 10px 8px !important;
        border-radius: 12px !important;
    }

    .calendar-table {
        border-spacing: 2px !important;
        width: 100% !important;
    }

    .calendar-table th {
        font-size: 0.75rem !important;
        padding: 4px 0 !important;
        width: auto !important;
    }

    .calendar-day-cell {
        height: 36px !important;
        width: auto !important;
        padding: 0 !important;
    }

    .day-num {
        font-size: 0.78rem !important;
    }

    .day-kpi-value {
        font-size: 0.95rem !important;
    }
}

/* ==========================================================================
   ESTILOS PARA GESTIÓN DE CATEGORÍAS EN MODAL
   ========================================================================== */
.badge-cat-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.badge-cat-count.has-products {
    background: rgba(0, 113, 227, 0.12);
    color: #5ac8fa;
    border-color: rgba(0, 113, 227, 0.35);
}

.btn-change-cat-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 5px 11px;
    min-height: 32px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
    user-select: none;
    font-family: inherit;
    line-height: 1.2;
}

.btn-change-cat-badge:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: var(--border-active);
    color: var(--text-primary);
}

.btn-change-cat-badge:active {
    transform: translateY(0);
}

.btn-cat-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-cat-edit {
    background: rgba(229, 169, 60, 0.12);
    color: #e5a93c;
    border-color: rgba(229, 169, 60, 0.3);
    margin-right: 6px;
}

.btn-cat-edit:hover {
    background: rgba(229, 169, 60, 0.25);
    border-color: #e5a93c;
}

.btn-cat-delete {
    background: rgba(255, 69, 58, 0.12);
    color: #ff453a;
    border-color: rgba(255, 69, 58, 0.3);
}

.btn-cat-delete:hover:not(:disabled) {
    background: rgba(255, 69, 58, 0.25);
    border-color: #ff453a;
}

.btn-cat-delete:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.category-inline-input {
    background: #09090c;
    border: 1px solid var(--archi-gold);
    color: #ffffff;
    padding: 4px 8px;
    font-size: 0.82rem;
    border-radius: 4px;
    width: 100%;
}

@media (max-width: 600px) {
    .cat-form-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Botón de acción para Ticket */
.btn-action-ticket {
    background: rgba(255, 255, 255, 0.08);
    color: #e4e4e7;
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 6px;
    transition: var(--transition-smooth);
}

.btn-action-ticket:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-color: #ffffff;
}

.btn-action-void {
    background: rgba(255, 69, 58, 0.1);
    color: var(--archi-coral);
    border: 1px solid rgba(255, 69, 58, 0.25);
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-action-void:hover {
    background: rgba(255, 69, 58, 0.25);
    border-color: var(--archi-coral);
    color: #ffffff;
}

/* Estilos de Ticket Térmico POS (58mm / 80mm) */
.ticket-wrapper {
    background: #ffffff;
    color: #000000;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    width: 100%;
    max-width: 330px;
    margin: 0 auto;
    padding: 16px 14px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.35;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.ticket-header {
    text-align: center;
    border-bottom: 1px dashed #444;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.ticket-title {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #000000;
}

.ticket-divider {
    border-top: 1px dashed #777;
    margin: 7px 0;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    color: #111;
}

.ticket-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 14.5px;
    font-weight: 500;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 6px 0;
    margin: 7px 0;
    color: #000;
}

.ticket-footer {
    text-align: center;
    font-size: 12px;
    color: #444;
    margin-top: 10px;
    border-top: 1px dashed #444;
    padding-top: 6px;
}

@page {
    size: auto;
    margin: 0;
}

@media print {
    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
    }

    /* =========================================================================
       CASO A: IMPRESIÓN DE TICKET TÉRMICO DE VENTA (Modal de Ticket Activo)
       ========================================================================= */
    body.printing-ticket > *,
    body:has(#modal-sale-ticket.active) > * {
        display: none !important;
    }

    body.printing-ticket > #modal-sale-ticket,
    body:has(#modal-sale-ticket.active) > #modal-sale-ticket {
        display: block !important;
        position: static !important;
        background: transparent !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    #modal-sale-ticket .modal-header,
    #modal-sale-ticket .modal-footer,
    #modal-sale-ticket .modal-close-btn,
    .no-print {
        display: none !important;
    }

    #modal-sale-ticket .modal-container,
    #modal-sale-ticket .modal-body {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: none !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #printable-ticket-area {
        display: block !important;
        visibility: visible !important;
        position: static !important;
        width: 100% !important;
        max-width: 80mm !important;
        margin: 0 auto !important;
        padding: 4mm 6mm !important;
        background: #ffffff !important;
        color: #000000 !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
    }

    .ticket-wrapper {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        font-family: 'Courier New', Courier, monospace, sans-serif !important;
        font-size: 13px !important;
        line-height: 1.35 !important;
        color: #000000 !important;
        background: #ffffff !important;
    }

    .ticket-title {
        font-size: 17.5px !important;
        font-weight: bold !important;
    }

    .ticket-row {
        font-size: 12.5px !important;
        color: #000000 !important;
    }

    .ticket-total-row {
        font-size: 16px !important;
        font-weight: bold !important;
        border-top: 1.5px solid #000 !important;
        border-bottom: 1.5px solid #000 !important;
        color: #000000 !important;
    }

    .ticket-footer {
        font-size: 12px !important;
        color: #333333 !important;
        border-top: 1px dashed #000 !important;
    }

    /* =========================================================================
       CASO B: IMPRESIÓN DE REPORTES Y FORMULARIO 29 (Impuestos / Vistas Normales)
       ========================================================================= */
    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) #modal-sale-ticket {
        display: none !important;
    }

    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) #app-shell {
        display: block !important;
        position: static !important;
        width: 100% !important;
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) .sidebar,
    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) .topbar,
    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) .bottom-nav-mobile,
    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) .modal-overlay,
    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) .btn-archi,
    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) .chip-tax-btn,
    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) .btn-info-icon,
    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) .info-help-desc,
    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) button:not(.btn-keep-print) {
        display: none !important;
    }

    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) .main-wrapper,
    body:not(.printing-ticket):not(:has(#modal-sale-ticket.active)) .content-area {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    /* Formato de Impresión para la Vista de Impuestos y F29 (Hoja de Oficio / Legal) */
    @page {
        size: legal portrait;
        margin: 10mm 12mm 10mm 12mm;
    }

    body.printing-tax-report {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    }

    /* Ocultar en la impresión de impuestos todos los componentes interactivos y no solicitados */
    body.printing-tax-report .sidebar,
    body.printing-tax-report .topbar,
    body.printing-tax-report .modal-backdrop,
    body.printing-tax-report .modal,
    body.printing-tax-report .no-print,
    body.printing-tax-report .taxes-header-bar,
    body.printing-tax-report .taxes-toolbar-card,
    body.printing-tax-report #tax-compliance-card,
    body.printing-tax-report .metrics-grid,
    body.printing-tax-report .rcv-mirror-card,
    body.printing-tax-report .analytics-card,
    body.printing-tax-report #tax-f29-verdict-box,
    body.printing-tax-report .tax-dte-scroll-container,
    body.printing-tax-report footer,
    body.printing-tax-report #toast-container {
        display: none !important;
    }

    body.printing-tax-report #view-taxes {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    body.printing-tax-report #tax-print-sheet {
        display: block !important;
        width: 100% !important;
        background: #ffffff !important;
        color: #000000 !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    body.printing-tax-report .tax-print-header {
        display: block !important;
    }

    body.printing-tax-report .tax-print-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 11px !important;
        color: #000000 !important;
        page-break-inside: avoid !important;
    }

    body.printing-tax-report .tax-print-table th,
    body.printing-tax-report .tax-print-table td {
        border: 1px solid #777777 !important;
        color: #000000 !important;
        padding: 4px 6px !important;
    }

    body.printing-tax-report .tax-print-table th {
        background: #eaeaea !important;
        font-weight: 700 !important;
    }

    body.printing-tax-report .tax-print-table tfoot tr {
        background: #f4f4f4 !important;
        font-weight: 700 !important;
    }

    body.printing-tax-report #tax-print-verdict-box {
        border: 2px solid #000000 !important;
        background: #f8f8f8 !important;
        color: #000000 !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    body.printing-tax-report span,
    body.printing-tax-report strong,
    body.printing-tax-report div,
    body.printing-tax-report h1,
    body.printing-tax-report h2,
    body.printing-tax-report td,
    body.printing-tax-report th {
        color: #000000 !important;
    }
}

/* Ocultar en pantalla normal cualquier elemento exclusivo de impresión tributaria */
.tax-print-only,
#tax-print-sheet,
.tax-print-header {
    display: none !important;
}

/* ==========================================================================
   VISTA DE VENTAS DIARIAS (RESPONSIVE ADAPTATION)
   ========================================================================== */
.ds-desktop-table-card {
    display: block;
}

.ds-mobile-list-wrapper {
    display: none;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
        flex-direction: column !important;
    }

    .topbar button {
        white-space: nowrap !important;
    }

    .ds-desktop-table-card {
        display: none !important;
    }

    .ds-mobile-list-wrapper {
        display: flex !important;
        flex-direction: column;
    }

    .ds-kpi-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    #view-daily-sales,
    #view-analytics,
    #view-inventory,
    #view-dashboard,
    #view-suppliers,
    #view-ocr {
        padding-bottom: 130px !important;
    }

    .ds-filter-panel select.form-control,
    .ds-filter-panel input.form-control,
    .ds-filter-control {
        height: 44px !important;
        min-height: 44px !important;
        padding: 9px 12px !important;
        font-size: 15px !important;
        line-height: normal !important;
        box-sizing: border-box !important;
    }

    .ranking-card-item {
        padding: 11px 13px !important;
        overflow: hidden !important;
    }
}

/* ==========================================================================
   ESTILOS ROBUSTOS PARA FILTROS DE VENTAS E HISTORIAL (SIN RECORTE VERTICAL)
   ========================================================================== */
.ds-filter-panel select.form-control,
.ds-filter-panel input.form-control,
.ds-filter-control {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 8px 12px !important;
    font-size: 0.88rem !important;
    line-height: normal !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    background-color: #141418 !important;
    color: #f4f4f5 !important;
    border: 1px solid var(--border-subtle) !important;
    display: block !important;
}

.ds-filter-panel select.form-control:focus,
.ds-filter-panel input.form-control:focus,
.ds-filter-control:focus {
    border-color: var(--archi-gold) !important;
    background-color: #18181f !important;
}

/* ==========================================================================
   ESTILOS EJECUTIVOS GLOBALES PARA DETALLE DE TRANSACCIONES Y VENTAS (SIN EMOJIS)
   ========================================================================== */
.ds-group-divider {
    background: linear-gradient(90deg, rgba(229, 169, 60, 0.12) 0%, rgba(20, 20, 24, 0.95) 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 8px 16px !important;
}

.ds-badge-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ds-badge-cash {
    background: rgba(48, 209, 88, 0.12);
    color: #30d158;
    border: 1px solid rgba(48, 209, 88, 0.3);
}

.ds-badge-card {
    background: rgba(90, 200, 250, 0.12);
    color: #5ac8fa;
    border: 1px solid rgba(90, 200, 250, 0.3);
}

.ds-badge-transfer {
    background: rgba(191, 90, 242, 0.12);
    color: #bf5af2;
    border: 1px solid rgba(191, 90, 242, 0.3);
}

.ds-badge-mixed {
    background: rgba(229, 169, 60, 0.12);
    color: #e5a93c;
    border: 1px solid rgba(229, 169, 60, 0.3);
}

.ds-branch-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.ds-branch-1 {
    background: rgba(90, 200, 250, 0.10);
    color: #5ac8fa;
    border: 1px solid rgba(90, 200, 250, 0.25);
}

.ds-branch-2 {
    background: rgba(191, 90, 242, 0.10);
    color: #bf5af2;
    border: 1px solid rgba(191, 90, 242, 0.25);
}

.ds-branch-21 {
    background: rgba(100, 210, 255, 0.10);
    color: #64d2ff;
    border: 1px solid rgba(100, 210, 255, 0.25);
}

.ds-branch-3 {
    background: rgba(229, 169, 60, 0.10);
    color: #e5a93c;
    border: 1px solid rgba(229, 169, 60, 0.25);
}

.ds-branch-default {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.ds-accordion-drawer {
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 18px;
}

.ds-row-main {
    transition: background-color 0.15s ease;
}

.ds-row-main:hover {
    background: rgba(255, 255, 255, 0.035) !important;
}

.ds-row-main.is-expanded {
    background: rgba(229, 169, 60, 0.05) !important;
}

/* ==========================================================================
   ALINEACION Y ESTILOS DE MODAL DE VENTA ARCHI
   ========================================================================== */
.sale-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sale-product-add-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.sale-product-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sale-qty-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 2px 8px;
    flex-shrink: 0;
}

.sale-pay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 6px;
}

@media (max-width: 580px) {
    .sale-form-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

/* ==========================================================================
   BARRA DE PAGINACION MOVIL DE VENTAS
   ========================================================================== */
#ds-mobile-pagination {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

#ds-mobile-pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

/* ==========================================================================
   APARTADO DE GASTOS Y PROVEEDORES (OPTIMIZADO PARA MOVIL)
   ========================================================================== */
/* Pestañas Unificadas de Control de Gastos */
.supp-subnav-tabs {
    display: inline-flex !important;
    gap: 0 !important;
    background: #0f172a !important;
    padding: 3px !important;
    border-radius: 8px !important;
    border: 1px solid #334155 !important;
    margin-bottom: 12px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.supp-subnav-btn {
    border: 1px solid transparent !important;
    background: transparent !important;
    color: #94a3b8 !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    padding: 5px 14px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    outline: none !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    min-height: unset !important;
}

.supp-subnav-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

.supp-subnav-btn.btn-archi-primary,
.supp-subnav-btn.active {
    background: #1e293b !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

.supp-subnav-btn.btn-archi-outline {
    border: 1px solid transparent !important;
    background: transparent !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

.supp-kpis-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.15fr) 2.85fr;
    gap: 8px;
    margin-bottom: 10px;
    align-items: stretch;
}

.supp-kpi-main {
    background: radial-gradient(circle at top left, rgba(229, 169, 60, 0.12) 0%, rgba(30, 41, 59, 0.98) 75%), #1e293b !important;
    border: 1px solid rgba(229, 169, 60, 0.35) !important;
    border-left: 4px solid var(--archi-gold, #e5a93c) !important;
    border-radius: 8px;
    padding: 8px 12px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.supp-kpi-main .metric-label {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: var(--archi-gold, #e5a93c) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 2px !important;
}

.supp-kpi-main .metric-value {
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em !important;
}

.supp-kpi-main .metric-trend {
    font-size: 0.70rem !important;
    color: #94a3b8 !important;
    margin-top: 2px !important;
}

.supp-kpis-subgrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.supp-kpis-subgrid .metric-card {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 8px;
    padding: 6px 10px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    min-height: unset !important;
}

.supp-kpis-subgrid .metric-card .metric-label {
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    margin-bottom: 2px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.supp-kpis-subgrid .metric-card .metric-value {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #f1f5f9 !important;
    line-height: 1.15 !important;
}

.supp-kpis-subgrid .metric-card .metric-trend {
    font-size: 0.66rem !important;
    color: #64748b !important;
    margin-top: 1px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.supp-sub-salaries { border-left: 3px solid #818cf8 !important; }
.supp-sub-fixed { border-left: 3px solid #38bdf8 !important; }
.supp-sub-purchases { border-left: 3px solid #34d399 !important; }
.supp-sub-services { border-left: 3px solid #fbbf24 !important; }

/* =========================================================================
   PANEL DE FILTROS PRE-MIUM DE GASTOS Y PROVEEDORES (Estética Compacta / Orion)
   ========================================================================= */
.supp-filter-card {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 8px;
    padding: 8px 12px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.supp-filter-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.supp-filter-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: 6px;
}

.supp-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
    gap: 6px 10px !important;
}

.supp-templates-filter-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 14px;
    align-items: flex-end;
}

@media (max-width: 1024px) {
    .supp-templates-filter-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .supp-templates-filter-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.supp-filter-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    width: 100%;
}

.supp-filter-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
    color: #94a3b8;
}

.supp-ctrl {
    width: 100% !important;
    height: 30px !important;
    min-height: 30px !important;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 4px 8px;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid #334155 !important;
    border-radius: 6px;
    color: #ffffff !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.supp-ctrl:hover {
    border-color: rgba(56, 189, 248, 0.4) !important;
    background: rgba(15, 23, 42, 0.8) !important;
}

.supp-ctrl:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
}

.supp-ctrl option {
    background: #141419;
    color: #ffffff;
    padding: 8px;
}

/* Banner de Rango Temporal Activo en Proveedores */
.supp-range-active-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(229, 169, 60, 0.12) 0%, rgba(229, 169, 60, 0.04) 100%);
    border: 1px solid rgba(229, 169, 60, 0.35);
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 14px;
    animation: fadeIn 0.3s ease;
}

.supp-form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* Boton Ver Ventas & Historial en Centro de Analisis */
.analytics-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 14px;
}

.analytics-header-title-box {
    display: flex;
    flex-direction: column;
}

.analytics-header-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-analytics-history {
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.22);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    white-space: nowrap;
}

.btn-analytics-history:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.32);
}

@media (min-width: 768px) and (max-width: 1150px) {
    .supp-kpis-grid {
        grid-template-columns: minmax(210px, 1.15fr) 2fr !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    .supp-kpis-subgrid {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
}

@media (max-width: 767px) {
    .supp-kpis-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }
    .supp-kpis-subgrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
}

@media (max-width: 600px) {
    .supp-header-actions {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .supp-header-actions .supp-btn-new {
        grid-column: 1 / -1 !important;
        order: -1;
    }
    .supp-kpis-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
    }
    .supp-kpis-subgrid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .supp-filter-card {
        padding: 12px !important;
        margin-bottom: 14px !important;
    }
    .supp-filter-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .supp-filter-field-status {
        grid-column: 1 / -1 !important;
    }
    .supp-form-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

/* =========================================================================
   MODAL DE SELECCIÓN DE VARIANTES (TALLAS) PARA POS (OPTIMIZADO TOUCH)
   ========================================================================= */
.pos-variant-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid #334155 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    min-height: 60px !important;
    margin-bottom: 2px !important;
}

.pos-variant-row:hover {
    background: #262930 !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28) !important;
}

.pos-variant-row:active {
    background: #2e323b !important;
    border-color: var(--archi-gold, #e5a93c) !important;
    transform: scale(0.99) !important;
}

.pos-variant-badge {
    width: 44px !important;
    height: 44px !important;
    border-radius: 8px !important;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
}

.pos-variant-row:hover .pos-variant-badge,
.pos-variant-row:active .pos-variant-badge {
    background: #283347 !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.pos-variant-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 0 !important;
}

.pos-variant-name {
    font-weight: 700 !important;
    font-size: 1.00rem !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
}

.pos-variant-meta {
    font-size: 0.74rem !important;
    color: #94a3b8 !important;
    font-family: monospace !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.pos-variant-stock-num {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.pos-variant-stock-num.is-out {
    color: #f87171 !important;
}

.pos-variant-right {
    text-align: right !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
}

.pos-variant-price-block {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 3px !important;
}

.pos-variant-price {
    font-weight: 800 !important;
    color: #ffffff !important;
    font-size: 1.08rem !important;
    font-family: monospace !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
}

.pos-stock-badge {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    line-height: 1.2 !important;
}

.pos-stock-badge.badge-out-of-stock {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

.pos-stock-badge.badge-low-stock {
    background: rgba(245, 158, 11, 0.16) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

.pos-variant-add-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
}

.pos-variant-row:hover .pos-variant-add-icon,
.pos-variant-row:active .pos-variant-add-icon {
    background: #334155 !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.btn-pos-modal-cancel {
    background: #1e293b !important;
    border: none !important;
    color: #94a3b8 !important;
    padding: 8px 20px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
}

.btn-pos-modal-cancel:hover {
    background: #262930 !important;
    color: #ffffff !important;
}

.btn-pos-modal-close {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    font-size: 1.35rem !important;
    line-height: 1 !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.btn-pos-modal-close:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

/* =========================================================================
   ESTILOS DE MÓDULO TRIBUTARIO Y FORMULARIO 29 (SII CHILE)
   ========================================================================= */
.btn-analytics-taxes {
    padding: 10px 18px;
    font-size: 0.90rem;
    font-weight: 600;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
    letter-spacing: 0.02em;
    background: rgba(255, 214, 10, 0.12);
    border: 1px solid rgba(255, 214, 10, 0.4);
    color: #ffd60a;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    white-space: nowrap;
}

.btn-analytics-taxes:hover {
    background: rgba(255, 214, 10, 0.22);
    border-color: #ffd60a;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 214, 10, 0.2);
}

.tax-field-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tax-field-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.tax-pm-card {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.tax-pm-card:hover {
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .taxes-header-bar {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }
    .taxes-header-actions {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
    }
    .taxes-toolbar-card > div {
        flex-direction: column;
        align-items: stretch !important;
    }
    .tax-field-group {
        flex-direction: column;
        align-items: flex-start !important;
        width: 100%;
    }
    .tax-field-group input,
    .tax-field-group select {
        width: 100% !important;
    }
    .tax-pm-cards-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
}

@media (max-width: 480px) {
    .tax-pm-cards-grid {
        grid-template-columns: 1fr !important;
    }
    .taxes-header-actions {
        grid-template-columns: 1fr !important;
    }
}

/* Tabs & Badges Tributarios SII & RCV */
.tax-tab-group {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
}

.tax-tab-btn {
    padding: 7px 16px;
    font-size: 0.80rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tax-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.tax-tab-btn.active {
    color: #ffffff;
    background: var(--bg-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.badge-dte {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: monospace;
    border-radius: 6px;
    background: rgba(10, 132, 255, 0.15);
    color: #0a84ff;
    border: 1px solid rgba(10, 132, 255, 0.3);
}

.badge-tax-recuperable {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(48, 209, 88, 0.12);
    color: #30d158;
    border: 1px solid rgba(48, 209, 88, 0.3);
}

.badge-tax-rechazado {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(255, 69, 58, 0.12);
    color: #ff453a;
    border: 1px solid rgba(255, 69, 58, 0.3);
}

.badge-tax-aceptado {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(90, 200, 250, 0.12);
    color: #5ac8fa;
    border: 1px solid rgba(90, 200, 250, 0.3);
}

.badge-tax-exento {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(255, 214, 10, 0.12);
    color: #ffd60a;
    border: 1px solid rgba(255, 214, 10, 0.3);
}

.badge-tax-caja {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(191, 90, 242, 0.12);
    color: #bf5af2;
    border: 1px solid rgba(191, 90, 242, 0.3);
}

.rcv-mirror-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
}

.rcv-mirror-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Switch buttons para Medios de Pago en Impuestos */
.tax-switches-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.tax-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.tax-switch-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.tax-switch-btn.active {
    background: rgba(255, 214, 10, 0.12);
    border-color: rgba(255, 214, 10, 0.45);
    color: #ffffff;
}

.tax-switch-pill {
    width: 28px;
    height: 16px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.tax-switch-btn.active .tax-switch-pill {
    background: #ffd60a;
}

.tax-switch-knob {
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
}

.tax-switch-btn.active .tax-switch-knob {
    transform: translateX(12px);
    background: #000000;
}

.tax-switch-badge {
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.2s ease;
}

.tax-switch-btn.active .tax-switch-badge {
    background: rgba(255, 214, 10, 0.22);
    color: #ffd60a;
}

/* Prevención estricta de quiebre de línea en valores monetarios */
#view-taxes td,
#view-taxes th,
#view-taxes .metric-value,
.table-modern td,
.table-modern th {
    white-space: nowrap !important;
}

/* Reglas móviles para vistas de impuestos */
@media (max-width: 768px) {
    #view-taxes {
        padding-bottom: 160px !important;
    }

    .rcv-mirror-card,
    #view-taxes .analytics-card {
        padding: 14px 12px !important;
        margin-bottom: 16px !important;
    }

    .tax-tab-group {
        overflow-x: auto;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        width: 100%;
    }

    .tax-switches-bar {
        overflow-x: auto;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        width: 100%;
    }

    .tax-switches-bar .tax-switch-btn {
        flex-shrink: 0;
    }

    .tax-tab-group .tax-tab-btn {
        flex-shrink: 0;
    }

}

/* =========================================================================
   TABLA DESPLEGABLE DE MEDIOS DE PAGO (IMPUESTOS & F29)
   ========================================================================= */
#tax-pm-table-wrapper {
    animation: fadeInSlide 0.25s ease forwards;
}

#btn-toggle-pm-table {
    transition: all 0.2s ease;
    user-select: none;
}

#btn-toggle-pm-table:hover {
    background: rgba(255, 214, 10, 0.12) !important;
}

/* =========================================================================
   ESTILOS DEDICADOS: MÓDULO DE CONFIGURACIÓN DEL SISTEMA & RESPALDO (TESLA STYLE)
   ========================================================================= */
#view-settings {
    padding-bottom: 140px !important;
}

.settings-nav-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    width: 100%;
}

.settings-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.settings-nav-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.settings-nav-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(229, 169, 60, 0.16), rgba(229, 169, 60, 0.05));
    border: 1px solid var(--archi-gold);
    box-shadow: 0 4px 14px rgba(229, 169, 60, 0.22);
    font-weight: 600;
}

.btn-settings-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #e4e4e7 100%);
    color: #09090b;
    font-weight: 600;
    font-size: 0.86rem;
    padding: 10px 22px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-settings-primary:hover {
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.btn-settings-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-weight: 500;
    font-size: 0.84rem;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-settings-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.btn-settings-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(229, 169, 60, 0.18), rgba(229, 169, 60, 0.08));
    color: var(--archi-gold);
    font-weight: 600;
    font-size: 0.84rem;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid rgba(229, 169, 60, 0.45);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-settings-accent:hover {
    background: rgba(229, 169, 60, 0.28);
    border-color: var(--archi-gold);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(229, 169, 60, 0.25);
    transform: translateY(-1px);
}

/* Filas responsivas de inputs y botones en configuración */
.cfg-responsive-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    width: 100%;
}

.cfg-responsive-row .form-group {
    flex: 1;
    margin-bottom: 0;
    min-width: 0;
}

.cfg-buttons-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Tarjetas móviles para usuarios, bitácora y respaldos */
.settings-mobile-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .cfg-responsive-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .cfg-responsive-row .form-group {
        width: 100% !important;
    }

    .cfg-responsive-row .cfg-buttons-group {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }

    .cfg-responsive-row .cfg-buttons-group button {
        flex: 1 !important;
        text-align: center !important;
        justify-content: center !important;
        min-height: 44px !important;
    }

    .settings-nav-bar {
        display: none !important;
    }

    .settings-mobile-nav {
        display: block !important;
        margin-bottom: 18px !important;
    }
}

@media (min-width: 769px) {
    .settings-mobile-nav {
        display: none !important;
    }
}

/* ==========================================================================
   PUNTITOS DEL CALENDARIO: VENTAS (VERDE) Y GASTOS (ROJO)
   ========================================================================== */

.day-dots-wrapper {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    pointer-events: none;
    z-index: 2;
}

.cal-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.cal-dot-sale {
    background: #30d158;
    box-shadow: 0 0 5px rgba(48, 209, 88, 0.6);
}

.cal-dot-expense {
    background: #ff453a;
    box-shadow: 0 0 5px rgba(255, 69, 58, 0.6);
}

.calendar-day-cell.day-selected .cal-dot-sale,
.calendar-day-cell.day-range-start .cal-dot-sale,
.calendar-day-cell.day-range-end .cal-dot-sale {
    background: #09090b !important;
    box-shadow: none !important;
}

.calendar-day-cell.day-selected .cal-dot-expense,
.calendar-day-cell.day-range-start .cal-dot-expense,
.calendar-day-cell.day-range-end .cal-dot-expense {
    background: #991b1b !important;
    box-shadow: none !important;
}

/* ==========================================================================
   ESTILOS PREMIUM: TABLA CONTROL DE GASTOS Y REGISTRO MENSUAL
   ========================================================================== */

.expenses-table-container {
    background: rgba(18, 18, 24, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 24px;
}

.expenses-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.84rem;
}

.expenses-table thead th {
    background: rgba(22, 22, 30, 0.95);
    backdrop-filter: blur(8px);
    color: #a1a1aa;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 5;
}

.expenses-table tbody tr {
    transition: background 0.18s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.expenses-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.012);
}

.expenses-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.035);
}

.expenses-table tbody td {
    padding: 12px 14px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.exp-folio-chip {
    display: inline-block;
    font-family: monospace;
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e4e4e7;
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
}

.exp-payment-pill {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #d4d4d8;
    padding: 3px 7px;
    border-radius: 5px;
    white-space: nowrap;
}

.badge-type-stock {
    background: rgba(48, 209, 88, 0.12) !important;
    color: #30d158 !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-type-salary {
    background: rgba(191, 90, 242, 0.12) !important;
    color: #c084fc !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-type-rent {
    background: rgba(255, 159, 10, 0.12) !important;
    color: #fbbf24 !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-type-gc {
    background: rgba(90, 200, 250, 0.12) !important;
    color: #60a5fa !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-type-services {
    background: rgba(250, 204, 21, 0.12) !important;
    color: #facc15 !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-type-supplies {
    background: rgba(56, 189, 248, 0.12) !important;
    color: #38bdf8 !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-type-general {
    background: rgba(161, 161, 170, 0.12) !important;
    color: #a1a1aa !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-tax-iva {
    background: rgba(56, 189, 248, 0.12) !important;
    color: #38bdf8 !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-tax-rent {
    background: rgba(192, 132, 252, 0.12) !important;
    color: #c084fc !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-branch-l1 {
    background: rgba(255, 255, 255, 0.07) !important;
    color: var(--text-primary) !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-branch-l2 {
    background: rgba(255, 255, 255, 0.07) !important;
    color: var(--text-primary) !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-branch-l21 {
    background: rgba(255, 255, 255, 0.07) !important;
    color: var(--text-primary) !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-branch-l3 {
    background: rgba(255, 255, 255, 0.07) !important;
    color: var(--text-primary) !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

.badge-branch-central {
    background: rgba(255, 255, 255, 0.07) !important;
    color: var(--text-primary) !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

/* Modulo de Flujo de Caja y Tesoreria */
.cashflow-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 20px;
    width: 100%;
    min-width: 0;
}

@media (max-width: 1150px) {
    .cashflow-advisor-grid,
    .cashflow-bottom-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

/* Badges y Casillas para Gastos Fijos vs Variables y Detalle Interactivo */
.badge-fixed-expense {
    background: rgba(229, 169, 60, 0.14) !important;
    color: #f5c05c !important;
    border: none !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.4px !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    display: inline-block;
}

.badge-variable-expense {
    background: rgba(148, 163, 184, 0.12) !important;
    color: #94a3b8 !important;
    border: none !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    display: inline-block;
}

.expense-clickable-row {
    cursor: pointer !important;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.expense-clickable-row:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

.expense-clickable-row.row-is-fixed {
    border-left: 2px solid var(--border-subtle) !important;
}

.expense-paid-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    margin: 0;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.expense-paid-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.expense-paid-checkbox {
    accent-color: #30d158;
    width: 17px;
    height: 17px;
    cursor: pointer;
    margin: 0;
}

.paid-indicator {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    display: inline-block;
    transition: all 0.2s ease;
}

.paid-indicator.is-paid {
    background: rgba(48, 209, 88, 0.12);
    color: #30d158;
    border: none;
}

.paid-indicator.is-pending {
    background: rgba(255, 214, 10, 0.12);
    color: #ffd60a;
    border: none;
}

.badge-paid-static {
    background: rgba(48, 209, 88, 0.10);
    color: #30d158;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.btn-action-view {
    background: rgba(56, 189, 248, 0.16);
    border: none;
    color: #38bdf8;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 7px 12px;
    min-height: 38px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-action-view:hover {
    background: rgba(56, 189, 248, 0.28);
    color: #ffffff;
}

.voided-chip {
    font-size: 0.75rem;
    color: var(--archi-coral, #ff453a);
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(255, 69, 58, 0.12);
    border-radius: 6px;
    border: none;
}

/* Contenedor con Scroll Autónomo y Encabezado Fijo */
.expenses-table-container {
    max-height: 560px;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.2);
}

.expenses-table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.expenses-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.expenses-table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.expenses-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 15 !important;
    background: #14141c !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

/* Contenedor con barra de navegación y scroll para Tabla Matriz ABC */
.abc-table-scroll-container {
    max-height: 480px;
    overflow-y: auto;
    overflow-x: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(90, 200, 250, 0.45) rgba(0, 0, 0, 0.3);
    -webkit-overflow-scrolling: touch;
}

.abc-table-scroll-container::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
    display: block !important;
}

.abc-table-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.abc-table-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(90, 200, 250, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.abc-table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(90, 200, 250, 0.75);
}

.abc-table-scroll-container thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: #0f172a !important;
    border-bottom: 2px solid #334155 !important;
    color: #94a3b8 !important;
    font-weight: 700 !important;
    font-size: 0.76rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Contenedor con barra de navegación y scroll vertical para Clasificación DTE */
.tax-dte-scroll-container {
    max-height: 480px;
    overflow-y: auto;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(10, 132, 255, 0.45) rgba(0, 0, 0, 0.3);
    -webkit-overflow-scrolling: touch;
}

.tax-dte-scroll-container::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
    display: block !important;
}

.tax-dte-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.tax-dte-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(10, 132, 255, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tax-dte-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(10, 132, 255, 0.75);
}

.tax-dte-scroll-container thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: #14141c !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* Botón de Configuración Rápida (Tuerca ⚙) en barra superior y móvil */
.btn-gear-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f4f4f5;
    border-radius: 6px;
    width: 32px;
    height: 28px;
    min-width: 32px;
    padding: 0;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-gear-icon:hover {
    background: rgba(229, 169, 60, 0.18);
    border-color: var(--archi-gold);
    color: var(--archi-gold);
    transform: rotate(30deg);
}

.btn-gear-icon svg {
    pointer-events: none;
    transition: transform 0.25s ease;
}

/* Botón Icono Informativo "i" y Cuadros Explicativos Ocultables */
.btn-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #5ac8fa;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    min-width: 18px;
    font-size: 12px;
    font-weight: 700;
    font-style: normal;
    font-family: inherit;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-info-icon:hover,
.btn-info-icon.active {
    background: rgba(90, 200, 250, 0.2);
    border-color: #5ac8fa;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(90, 200, 250, 0.35);
    transform: scale(1.1);
}

.info-help-desc {
    display: none;
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 10px 14px;
    background: rgba(10, 132, 255, 0.06);
    border: 1px solid rgba(10, 132, 255, 0.22);
    border-radius: 8px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.45;
    animation: infoSlideFade 0.22s ease-out;
}

@keyframes infoSlideFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   PLAN INTELIGENTE DE REABASTECIMIENTO DE STOCK (ARIS) & FLUJO DE CAJA
   ========================================================================== */
.cashflow-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 24px;
    box-sizing: border-box;
    max-width: 100%;
}

.replenish-card {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.replenish-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
}

.replenish-header-title {
    min-width: 0;
    flex: 1 1 auto;
}

.replenish-header-title h3 {
    margin: 4px 0 0;
    font-size: 1.22rem;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    word-break: break-word;
}

.replenish-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.replenish-toolbar {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.replenish-filter-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
}

.replenish-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.replenish-filter-label {
    font-size: 0.80rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.replenish-filter-select {
    width: auto;
    padding: 5px 10px;
    font-size: 0.82rem;
    background: var(--bg-input);
    color: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    min-width: 0;
}

.replenish-window-tag {
    font-size: 0.76rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.replenish-kpis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.replenish-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 18px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Reglas Responsivas ARIS & Flujo de Caja para Móviles (< 768px) */
@media (max-width: 768px) {
    .cashflow-card {
        padding: 14px 12px !important;
        margin-bottom: 16px !important;
        border-radius: 12px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .replenish-card {
        padding: 14px 12px !important;
        overflow-x: hidden !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .replenish-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 14px !important;
    }

    .replenish-header-title h3 {
        font-size: 1.10rem !important;
        line-height: 1.35 !important;
    }

    .replenish-header-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .replenish-btn-pdf,
    .replenish-btn-csv {
        width: 100% !important;
        justify-content: center !important;
        font-size: 0.76rem !important;
        padding: 8px 6px !important;
        box-sizing: border-box !important;
    }

    .replenish-btn-order {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        justify-content: center !important;
        font-size: 0.82rem !important;
        padding: 10px 12px !important;
        box-sizing: border-box !important;
        font-weight: 600 !important;
    }

    .replenish-toolbar {
        padding: 12px 10px !important;
        margin-bottom: 14px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .replenish-filter-row {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .replenish-filter-group {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 4px !important;
    }

    .replenish-filter-label {
        font-size: 0.74rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.04em !important;
        color: var(--text-muted) !important;
        font-weight: 600 !important;
        display: block !important;
        width: 100% !important;
    }

    .replenish-filter-select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 38px !important;
        font-size: 0.84rem !important;
        padding: 6px 10px !important;
        box-sizing: border-box !important;
        text-overflow: ellipsis !important;
    }

    .replenish-window-tag {
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
        white-space: normal !important;
    }

    .replenish-kpis-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 14px !important;
        width: 100% !important;
    }

    .replenish-kpis-grid > div {
        padding: 10px 10px !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .replenish-kpis-grid > div:last-child {
        grid-column: 1 / -1 !important;
    }

    .replenish-kpis-grid div[id^="rep-kpi-"] {
        font-size: 1.05rem !important;
    }

    .cashflow-advisor-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .cashflow-bottom-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .cashflow-toolbar-card {
        padding: 12px 10px !important;
        margin-bottom: 14px !important;
    }

    .cashflow-toolbar-card > div {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .cashflow-toolbar-card > div > div:first-child {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .cashflow-toolbar-card .tax-field-group {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 4px !important;
    }

    .cashflow-toolbar-card .tax-field-group span {
        font-size: 0.74rem !important;
        text-transform: uppercase !important;
        color: var(--text-muted) !important;
        font-weight: 600 !important;
    }

    .cashflow-toolbar-card .tax-field-group .form-control {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        height: 38px !important;
    }

    .cashflow-toolbar-card #cashflow-period-tag {
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .cashflow-toolbar-card > div > div:last-child {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 6px !important;
    }

    .cashflow-toolbar-card > div > div:last-child button {
        width: 100% !important;
        padding: 8px 4px !important;
        font-size: 0.72rem !important;
        text-align: center !important;
        justify-content: center !important;
    }

    /* Mobile para tarjeta de mes en Analisis */
    .analytics-month-card {
        padding: 12px 14px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .analytics-month-card > div:first-child {
        width: 100% !important;
    }

    .analytics-month-card .analytics-month-controls {
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
    }

    .analytics-month-card .analytics-month-controls input[type="month"] {
        flex: 1 1 auto !important;
    }

    /* Mobile para barra de fecha y reporte PDF en Resumen General */
    .dash-date-toolbar-card {
        padding: 12px 14px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .dash-date-toolbar-card > div:first-child {
        width: 100% !important;
    }

    .dash-date-toolbar-card .dash-date-controls-group {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .dash-date-toolbar-card .dash-quick-chips,
    .dash-date-toolbar-card .dash-day-stepper {
        width: 100% !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
    }

    .dash-date-toolbar-card .dash-quick-chips button {
        flex: 1 1 50% !important;
        text-align: center !important;
    }

    .dash-date-toolbar-card .dash-day-stepper input[type="date"] {
        flex: 1 1 auto !important;
        text-align: center !important;
    }

    .dash-date-toolbar-card #btn-dash-pdf-report {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ==========================================================================
   TARJETA DE MES ACTIVO EN ANÁLISIS & BARRA DE FECHA EN TELEMETRÍA DASHBOARD
   ========================================================================== */
.analytics-month-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.analytics-month-card:hover {
    border-color: rgba(229, 169, 60, 0.45) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.dash-date-toolbar-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-date-toolbar-card:hover {
    border-color: rgba(0, 229, 255, 0.45) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.dash-day-stepper input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.75;
    cursor: pointer;
}

.dash-day-stepper input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.analytics-month-controls input[type="month"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.75;
    cursor: pointer;
}

.analytics-month-controls input[type="month"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.dash-quick-chips .btn-archi.active {
    background: rgba(0, 229, 255, 0.2) !important;
    color: #00e5ff !important;
    border: 1px solid rgba(0, 229, 255, 0.4) !important;
}

/* ==========================================================================
   PUNTO DE VENTA (POS) - SISTEMA DE CAJA & CARRITO DE COMPRAS
   Compatibilidad: Monitores PC, Tablets 7" (1024x600/1280x800) y Móviles
   ========================================================================== */

.pos-view-section {
    padding-bottom: 90px;
}

.pos-layout-grid {
    display: grid;
    grid-template-columns: 1fr 430px;
    gap: 18px;
    align-items: start;
}

.pos-catalog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.pos-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2px 14px;
    transition: all 0.25s ease;
}

.pos-search-box:focus-within {
    border-color: var(--archi-gold);
    box-shadow: 0 0 15px rgba(229, 169, 60, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.pos-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.95rem;
    padding: 10px 8px;
    font-family: inherit;
}

.pos-search-input::placeholder {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.pos-laser-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(48, 209, 88, 0.12);
    color: #30d158;
    border: 1px solid rgba(48, 209, 88, 0.3);
    white-space: nowrap;
}

.pos-laser-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #30d158;
    box-shadow: 0 0 8px #30d158;
    animation: pulseLaserDot 1.5s infinite;
}

@keyframes pulseLaserDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.pos-category-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0 6px 0;
    scrollbar-width: thin;
}

.pos-category-carousel::-webkit-scrollbar {
    height: 4px;
}

.pos-category-carousel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.pos-cat-pill {
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.pos-cat-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.pos-cat-pill.active {
    background: rgba(229, 169, 60, 0.18);
    border-color: var(--archi-gold);
    color: var(--archi-gold);
    font-weight: 600;
    box-shadow: 0 0 10px rgba(229, 169, 60, 0.2);
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 14px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}

.pos-product-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.pos-product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(229, 169, 60, 0.4);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.pos-product-card:active {
    transform: scale(0.98);
}

.pos-card-img-box {
    width: 100%;
    height: 105px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.pos-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pos-card-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 34px;
}

.pos-card-sku {
    font-size: 0.70rem;
    color: #5ac8fa;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pos-card-price {
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
}

.pos-card-stock {
    font-size: 0.70rem;
    font-weight: 600;
}

.pos-card-stock.in-stock {
    color: #30d158;
}

.pos-card-stock.low-stock {
    color: var(--archi-coral);
}

.pos-card-stock.out-of-stock {
    color: var(--text-muted);
}

/* Panel Derecho: Carrito de Compras POS */
.pos-cart-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    position: sticky;
    top: 75px;
}

.pos-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
}

.pos-cart-items-box {
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 2px;
    margin-bottom: 14px;
}

.pos-cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
    transition: background 0.15s ease;
}

.pos-cart-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.pos-cart-item-thumb {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    border-radius: 8px !important;
    background: rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.pos-cart-item-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    padding: 2px !important;
    display: block !important;
}

.pos-cart-item-info {
    flex: 1;
    min-width: 0;
}

.pos-cart-item-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-cart-item-meta {
    font-size: 0.70rem;
    color: var(--text-muted);
}

.pos-qty-stepper {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.pos-qty-btn {
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.pos-qty-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pos-qty-input {
    width: 32px;
    height: 26px;
    background: transparent;
    border: none;
    text-align: center;
    color: #ffffff;
    font-size: 0.80rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
}

.pos-item-subtotal {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    min-width: 65px;
    text-align: right;
}

.pos-item-del-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.pos-item-del-btn:hover {
    color: var(--tesla-red);
    background: rgba(232, 33, 39, 0.12);
}

.pos-totals-summary {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.pos-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.pos-totals-row.grand-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    color: #ffffff;
    font-weight: 700;
}

.pos-grand-total-amount {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.5px;
}

.pos-pay-methods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.pos-pay-btn {
    padding: 8px 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: all 0.15s ease;
}

.pos-pay-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.pos-pay-btn.active {
    background: rgba(48, 209, 88, 0.15);
    border-color: #30d158;
    color: #30d158;
    font-weight: 700;
}

.pos-cash-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.pos-cash-chip {
    padding: 5px 4px;
    font-size: 0.74rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    cursor: pointer;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.15s ease;
}

.pos-cash-chip:hover {
    background: rgba(229, 169, 60, 0.15);
    border-color: var(--archi-gold);
    color: var(--archi-gold);
}

.pos-btn-checkout {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #e5a93c 0%, #b88220 100%);
    color: #000000;
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 18px rgba(229, 169, 60, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.3px;
}

.pos-btn-checkout:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(229, 169, 60, 0.5);
    filter: brightness(1.06);
}

.pos-btn-checkout:active {
    transform: scale(0.99);
}

.pos-btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   CONFIGURADOR ESTÉTICO & VISTA PREVIA DE COMPROBANTE TÉRMICO
   ========================================================================== */

.ticket-config-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 22px;
    align-items: start;
}

.ticket-paper-preview {
    background: #ffffff;
    color: #111111;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.35;
    padding: 18px 14px;
    border-radius: 4px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: 0 auto;
    transition: width 0.3s ease;
}

.ticket-paper-preview::before,
.ticket-paper-preview::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(45deg, #ffffff, #ffffff 4px, transparent 4px, transparent 8px);
}

.ticket-paper-preview::before {
    top: -6px;
}

.ticket-paper-preview::after {
    bottom: -6px;
}

.ticket-preview-header {
    text-align: center;
    border-bottom: 1px dashed #444;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.ticket-preview-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #000;
    margin-bottom: 2px;
}

.ticket-preview-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    font-size: 11px;
}

.ticket-preview-divider {
    border-top: 1px dashed #444;
    margin: 8px 0;
}

.ticket-preview-total {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: bold;
    margin: 6px 0;
    padding: 4px 0;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
}

.ticket-preview-barcode {
    text-align: center;
    margin: 8px 0 4px 0;
    font-family: monospace;
    font-size: 10px;
    letter-spacing: 3px;
}

.ticket-preview-footer {
    text-align: center;
    font-size: 10px;
    color: #444;
    margin-top: 8px;
}

/* Bancos de Pruebas de Hardware */
.hardware-test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.hardware-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.hardware-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.laser-scanner-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed rgba(229, 169, 60, 0.4);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.laser-scanner-box:hover,
.laser-scanner-box.active {
    border-color: var(--archi-gold);
    background: rgba(229, 169, 60, 0.05);
}

/* ==========================================================================
   ADAPTATIVIDAD RESPONSIVA PARA DISPOSITIVOS DE 7" Y TELÉFONOS MÓVILES
   ========================================================================== */

@media (max-width: 1024px) {
    .pos-layout-grid {
        grid-template-columns: 1fr 370px;
        gap: 14px;
    }
    .ticket-config-grid {
        grid-template-columns: 1fr;
    }
    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    .pos-layout-grid {
        grid-template-columns: 1fr;
    }
    .pos-cart-panel {
        position: static;
        margin-top: 14px;
    }
    .pos-product-grid {
        grid-template-columns: repeat(2, 1fr);
        max-height: 480px;
    }
}

/* ==========================================================================
   TERMINAL PUNTO DE VENTA (ARCHI POS) & COMPONENTES COMPLETOS
   ========================================================================== */
.pos-layout-container {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.pos-catalog-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pos-catalog-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 14px;
}

.pos-category-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
    padding: 2px 0;
}
.pos-category-scroll::-webkit-scrollbar { display: none; }

.pos-cat-pill {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.pos-cat-pill:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}
.pos-cat-pill.active {
    background: rgba(255, 214, 10, 0.15);
    border-color: var(--archi-gold);
    color: var(--archi-gold);
    font-weight: 700;
}

.pos-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    max-height: calc(100vh - 210px);
    overflow-y: auto;
    padding-right: 4px;
}

.pos-product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}
.pos-product-card:hover {
    border-color: rgba(255, 214, 10, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.pos-product-card:active {
    transform: scale(0.98);
}

.pos-prod-img-wrap {
    position: relative;
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
.pos-prod-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.pos-product-card:hover .pos-prod-img {
    transform: scale(1.06);
}
.pos-prod-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.pos-stock-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    border: none !important;
    backdrop-filter: blur(8px);
}
.pos-stock-badge.in-stock {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #4ade80 !important;
    border: none !important;
}
.pos-stock-badge.low-stock {
    background: rgba(251, 191, 36, 0.15) !important;
    color: #fbbf24 !important;
    border: none !important;
}
.pos-stock-badge.out-stock {
    background: rgba(248, 113, 113, 0.15) !important;
    color: #f87171 !important;
    border: none !important;
}

.pos-variant-indicator {
    position: absolute;
    bottom: 6px;
    left: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.14) !important;
    border: none !important;
    color: #e2e8f0 !important;
}

.pos-prod-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.pos-prod-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 32px;
}
.pos-prod-sku {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: monospace;
    margin-bottom: 6px;
}
.pos-prod-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid var(--border-subtle);
}
.pos-prod-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--archi-gold);
    font-family: monospace;
}
.pos-btn-add {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pos-btn-add:hover,
.pos-btn-add:active {
    background: #38bdf8;
    border-color: #38bdf8;
    color: #0b111a;
    transform: scale(0.92);
}

/* Panel del Carrito */
.pos-cart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0,0,0,0.4);
    position: sticky;
    top: 75px;
}

.pos-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
}

.pos-btn-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.74rem;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}
.pos-btn-clear:hover {
    color: var(--tesla-red);
    background: rgba(255, 69, 58, 0.1);
}

.pos-cart-items-scroll {
    min-height: 180px;
    max-height: 260px;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pos-cart-empty {
    text-align: center;
    padding: 30px 10px;
    margin: auto;
}

.pos-cart-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    transition: background 0.15s;
}
.pos-cart-item-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.pos-cart-item-info {
    flex: 1;
    min-width: 0;
}
.pos-cart-item-title {
    font-size: 0.80rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pos-cart-variant-tag {
    font-size: 0.68rem;
    color: #bf5af2;
    background: rgba(191, 90, 242, 0.15);
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
}
.pos-cart-item-meta {
    font-size: 0.70rem;
    color: var(--text-muted);
    font-family: monospace;
}

.pos-cart-stepper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    overflow: hidden;
}
.pos-step-btn {
    width: 22px;
    height: 24px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pos-step-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
.pos-step-input {
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    font-family: monospace;
    outline: none;
}

.pos-cart-item-subtotal {
    font-size: 0.84rem;
    font-weight: 700;
    color: #ffffff;
    font-family: monospace;
    min-width: 60px;
    text-align: right;
}

.pos-cart-item-del {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}
.pos-cart-item-del:hover {
    color: var(--tesla-red);
}

.pos-checkout-section {
    display: flex;
    flex-direction: column;
    padding: 10px 14px 14px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
    animation: posFadeInUp 0.22s ease-out;
}

@keyframes posFadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pos-totals-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
}
.pos-subtotals-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}
.pos-sep-dot {
    opacity: 0.35;
    margin: 0 4px;
}
.pos-num-mono {
    font-family: monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #ffffff;
}
.pos-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pos-grand-total {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.pos-total-lbl {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
}
.pos-total-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--archi-gold);
    font-family: monospace;
    font-variant-numeric: tabular-nums;
}

/* Disparador de Cobro Inicial (Fase 1) */
.pos-step-trigger-wrap {
    width: 100%;
    margin-top: 4px;
}

.pos-btn-cobrar-lg {
    width: 100% !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 14px !important;
    font-size: 0.96rem !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #ffd60a, #d4a700) !important;
    color: #000000 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 14px rgba(255, 214, 10, 0.25) !important;
    user-select: none !important;
}

.pos-btn-cobrar-lg:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 214, 10, 0.4) !important;
    background: linear-gradient(135deg, #ffe033, #e5b400) !important;
}

.pos-btn-cobrar-lg:active {
    transform: scale(0.98) !important;
}

/* Panel Desplegable de Pago (Fase 2) */
.pos-payment-drawer {
    display: flex;
    flex-direction: column;
    animation: posDrawerExpand 0.22s ease-out;
}

@keyframes posDrawerExpand {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pos-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pos-btn-back-cart {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.pos-btn-back-cart:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.pos-payment-tag {
    font-size: 0.68rem;
    color: var(--archi-gold);
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
}

.pos-card-info-box {
    background: rgba(255, 214, 10, 0.05);
    border: 1px dashed rgba(255, 214, 10, 0.35);
    border-radius: 8px;
    padding: 7px 10px;
    margin-bottom: 6px;
    animation: posFadeInUp 0.18s ease-out;
}

.pos-card-info-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.74rem;
    color: #e2e8f0;
}

.pos-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}
.pos-lbl-sm {
    font-size: 0.68rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
    display: block;
    font-weight: 600;
}
.pos-input-sm {
    font-size: 0.76rem !important;
    padding: 4px 6px !important;
    height: 28px !important;
}

.pos-payment-wrap {
    margin-bottom: 8px;
}
.pos-payment-methods {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}
.pos-pay-btn {
    padding: 5px 2px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.15s;
}
.pos-pay-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}
.pos-pay-btn.active {
    background: rgba(255, 214, 10, 0.15);
    border-color: var(--archi-gold);
    color: var(--archi-gold);
    font-weight: 700;
}

.pos-cash-panel {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 6px 8px;
    margin-bottom: 8px;
}
.pos-cash-quick-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.pos-quick-bills {
    display: flex;
    gap: 3px;
}
.pos-quick-bill-btn {
    padding: 2px 5px;
    font-size: 0.64rem;
    font-weight: 600;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: monospace;
}
.pos-quick-bill-btn:hover {
    background: rgba(255, 214, 10, 0.15);
    color: var(--archi-gold);
    border-color: var(--archi-gold);
}

.pos-cash-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    align-items: center;
}
.pos-cash-input-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    height: 30px;
    overflow: hidden;
}
.pos-cash-input-box:focus-within {
    border-color: var(--archi-gold);
}
.pos-cash-prefix {
    position: absolute;
    left: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--archi-gold);
    font-family: monospace;
    pointer-events: none;
}
.pos-cash-field {
    width: 100%;
    height: 100%;
    border: none !important;
    background: transparent !important;
    padding-left: 20px !important;
    padding-right: 6px !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    font-family: monospace !important;
    outline: none !important;
}

.pos-change-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    height: 30px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pos-change-box.has-debt {
    border-color: rgba(255, 69, 58, 0.5);
    background: rgba(255, 69, 58, 0.08);
}
.pos-change-lbl {
    font-size: 0.68rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}
.pos-change-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #30d158;
    font-family: monospace;
    font-variant-numeric: tabular-nums;
}

.pos-action-buttons {
    display: grid !important;
    grid-template-columns: 1.22fr 1fr !important;
    gap: 8px !important;
    margin-top: 6px !important;
    flex-shrink: 0 !important;
}

.pos-btn-checkout-primary {
    width: 100% !important;
    height: 38px !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    border: none !important;
    background: linear-gradient(135deg, #ffd60a 0%, #d4af37 100%) !important;
    color: #000000 !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: 0 4px 14px rgba(255, 214, 10, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap !important;
    user-select: none !important;
}

.pos-btn-checkout-primary:hover:not(:disabled) {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(255, 214, 10, 0.4) !important;
}

.pos-btn-checkout-primary:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.pos-btn-checkout-secondary {
    width: 100% !important;
    height: 38px !important;
    padding: 0 8px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: var(--text-secondary) !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
    user-select: none !important;
}

.pos-btn-checkout-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.pos-btn-checkout-secondary:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

/* Vista Previa de Ticket Térmico en Configuración */
.pos-ticket-paper-preview {
    background: #ffffff;
    color: #000000;
    font-family: 'Courier New', Courier, monospace;
    width: 310px;
    padding: 16px 14px;
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.3);
    position: relative;
    transition: width 0.3s ease;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,0.4));
}
.pos-ticket-paper-preview.width-58mm {
    width: 240px;
    font-size: 10.5px;
}
.ticket-zigzag-top, .ticket-zigzag-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 5px;
    background-size: 10px 5px;
    background-repeat: repeat-x;
}
.ticket-zigzag-top {
    top: -5px;
    background-image: linear-gradient(135deg, #ffffff 5px, transparent 0), linear-gradient(-135deg, #ffffff 5px, transparent 0);
}
.ticket-zigzag-bottom {
    bottom: -5px;
    background-image: linear-gradient(45deg, #ffffff 5px, transparent 0), linear-gradient(-45deg, #ffffff 5px, transparent 0);
}
.ticket-dashed-divider {
    border-top: 1px dashed #000000;
    margin: 6px 0;
}
.ticket-solid-divider {
    border-top: 1.5px solid #000000;
    margin: 6px 0;
}

/* ==========================================================================
   OPTIMIZACIONES PUNTO DE VENTA (ARCHI POS) - 1024x600 & PANTALLAS TÁCTILES 7"
   ========================================================================== */

/* En pantallas de escritorio estándar */
.pos-layout-container {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.pos-variant-row:hover {
    background: rgba(255, 214, 10, 0.08) !important;
    border-color: rgba(255, 214, 10, 0.4) !important;
}
.pos-variant-row:active {
    transform: scale(0.98);
}

/* ==========================================================================
   OPTIMIZACION ERGONOMICA Y VISUAL PARA TABLET 9.7" EN LANDSCAPE (1024x768 / 1280x800)
   ========================================================================== */

/* Fluidez tactil global y prevencion de retardo o zoom accidental */
html, body {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

button, a, input, select, 
.pos-product-card, .pos-quick-bill-btn, .pos-pay-btn, 
.pos-variant-row, .pos-btn-add, .pos-step-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* 1. MODO GESTION (FUERA DE POS): SIDEBAR COMPACTO EN TABLET LANDSCAPE */
@media screen and (max-width: 1080px) {
    body:not(.pos-kiosk-mode) .sidebar {
        width: 74px !important;
        padding: 16px 8px !important;
        align-items: center !important;
        transition: width 0.25s ease !important;
        flex-shrink: 0 !important;
    }
    body:not(.pos-kiosk-mode) .sidebar .brand-name,
    body:not(.pos-kiosk-mode) .sidebar .brand-tagline,
    body:not(.pos-kiosk-mode) .sidebar .nav-item span,
    body:not(.pos-kiosk-mode) .sidebar .nav-section-label,
    body:not(.pos-kiosk-mode) .sidebar .sidebar-user,
    body:not(.pos-kiosk-mode) .sidebar #low-stock-badge {
        display: none !important;
    }
    body:not(.pos-kiosk-mode) .sidebar .sidebar-brand {
        padding: 0 0 14px 0 !important;
        margin-bottom: 14px !important;
        justify-content: center !important;
        border-bottom: 1px solid var(--border-subtle) !important;
    }
    body:not(.pos-kiosk-mode) .sidebar .brand-logo-icon {
        width: 38px !important;
        height: 38px !important;
    }
    body:not(.pos-kiosk-mode) .sidebar .nav-item {
        justify-content: center !important;
        padding: 10px !important;
        border-radius: 10px !important;
        margin-bottom: 6px !important;
        width: 48px !important;
        height: 48px !important;
    }
    body:not(.pos-kiosk-mode) .sidebar .nav-item svg {
        width: 22px !important;
        height: 22px !important;
    }
    body:not(.pos-kiosk-mode) .main-wrapper {
        width: calc(100vw - 74px) !important;
        flex: 1 1 calc(100vw - 74px) !important;
        min-width: 0 !important;
    }
    body:not(.pos-kiosk-mode) .topbar {
        height: 58px !important;
        padding: 0 16px !important;
    }
    body:not(.pos-kiosk-mode) .content-area {
        padding: 16px !important;
        max-width: 100% !important;
    }
}

/* 2. OPTIMIZACION DE PUNTO DE VENTA (POS) EN TABLET 9.7" HORIZONTAL */
@media screen and (min-width: 769px) and (max-width: 1280px) {
    .pos-layout-container {
        grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr) !important;
        gap: 12px !important;
        height: calc(100dvh - 48px) !important;
        max-height: calc(100dvh - 48px) !important;
        min-height: 0 !important;
        padding: 0 10px 8px 10px !important;
    }
    body.pos-kiosk-mode .pos-layout-container {
        grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr) !important;
        gap: 12px !important;
        flex: 1 1 0% !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: 100% !important;
        padding: 0 10px 8px 10px !important;
    }

    /* Grilla de productos: 3 columnas limpias y tactiles */
    .pos-products-grid,
    body.pos-kiosk-mode .pos-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        grid-auto-rows: minmax(200px, auto) !important;
        gap: 9px !important;
        padding-right: 4px !important;
    }

    .pos-product-card,
    body.pos-kiosk-mode .pos-product-card {
        min-height: 200px !important;
        border-radius: 12px !important;
        background: #12141a !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        transition: transform 0.15s ease, border-color 0.15s ease !important;
    }
    .pos-product-card:active,
    body.pos-kiosk-mode .pos-product-card:active {
        transform: scale(0.97) !important;
        border-color: var(--archi-gold) !important;
    }

    .pos-prod-img-wrap,
    body.pos-kiosk-mode .pos-prod-img-wrap {
        height: 92px !important;
        min-height: 92px !important;
        max-height: 92px !important;
    }

    .pos-prod-name,
    body.pos-kiosk-mode .pos-prod-name {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
        min-height: 32px !important;
        max-height: 32px !important;
        margin-bottom: 2px !important;
    }

    .pos-prod-sku,
    body.pos-kiosk-mode .pos-prod-sku {
        font-size: 0.68rem !important;
        margin-bottom: 4px !important;
    }

    .pos-prod-price,
    body.pos-kiosk-mode .pos-prod-price {
        font-size: 1.05rem !important;
        font-weight: 800 !important;
    }

    /* Boton de agregar al carrito: 38x38px comodo para tocar */
    .pos-btn-add,
    body.pos-kiosk-mode .pos-btn-add {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        border-radius: 8px !important;
        font-size: 1.25rem !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        color: #f1f5f9 !important;
    }
    .pos-btn-add:active,
    body.pos-kiosk-mode .pos-btn-add:active,
    .pos-btn-add:hover,
    body.pos-kiosk-mode .pos-btn-add:hover {
        background: #38bdf8 !important;
        border-color: #38bdf8 !important;
        color: #0b111a !important;
        transform: scale(0.92) !important;
    }

    /* Columna Carrito */
    .pos-cart-header,
    body.pos-kiosk-mode .pos-cart-header {
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 12px !important;
    }

    .pos-cart-item-row,
    body.pos-kiosk-mode .pos-cart-item-row {
        padding: 8px 10px !important;
        gap: 8px !important;
        min-height: 56px !important;
        border-radius: 10px !important;
    }

    .pos-cart-item-thumb,
    body.pos-kiosk-mode .pos-cart-item-thumb {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        border-radius: 8px !important;
    }

    .pos-cart-item-title,
    body.pos-kiosk-mode .pos-cart-item-title {
        font-size: 0.88rem !important;
        font-weight: 700 !important;
    }

    /* Stepper de cantidad: botones tactiles de 34x34px */
    .pos-cart-stepper,
    body.pos-kiosk-mode .pos-cart-stepper {
        display: flex !important;
        align-items: center !important;
        gap: 2px !important;
    }

    .pos-step-btn,
    body.pos-kiosk-mode .pos-step-btn {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        border-radius: 7px !important;
        font-size: 1.15rem !important;
        font-weight: 800 !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.22) !important;
        color: #ffffff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }
    .pos-step-btn:active,
    body.pos-kiosk-mode .pos-step-btn:active {
        background: var(--archi-gold) !important;
        color: #000000 !important;
        transform: scale(0.92) !important;
    }

    .pos-step-input,
    body.pos-kiosk-mode .pos-step-input {
        width: 36px !important;
        height: 34px !important;
        font-size: 0.95rem !important;
        font-weight: 800 !important;
        text-align: center !important;
        border-radius: 6px !important;
        background: rgba(0, 0, 0, 0.45) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
    }

    .pos-cart-item-subtotal,
    body.pos-kiosk-mode .pos-cart-item-subtotal {
        font-size: 0.95rem !important;
        font-weight: 800 !important;
        color: #ffffff !important;
    }

    .pos-cart-item-del,
    body.pos-kiosk-mode .pos-cart-item-del {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        border-radius: 7px !important;
        font-size: 1.25rem !important;
        background: rgba(255, 69, 58, 0.12) !important;
        border: 1px solid rgba(255, 69, 58, 0.35) !important;
        color: #ff453a !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }

    /* Seccion Checkout y Cobro */
    .pos-checkout-section,
    body.pos-kiosk-mode .pos-checkout-section {
        padding: 8px 12px 10px !important;
    }

    .pos-totals-box,
    body.pos-kiosk-mode .pos-totals-box {
        padding: 6px 10px !important;
        margin-bottom: 6px !important;
        border-radius: 8px !important;
    }

    .pos-total-banner,
    body.pos-kiosk-mode .pos-total-banner {
        padding: 6px 10px !important;
        border-radius: 8px !important;
        margin-top: 4px !important;
    }

    .pos-total-banner-label,
    body.pos-kiosk-mode .pos-total-banner-label {
        font-size: 0.86rem !important;
        font-weight: 800 !important;
    }

    .pos-total-banner-val,
    #pos-grand-total,
    body.pos-kiosk-mode .pos-total-banner-val,
    body.pos-kiosk-mode #pos-grand-total {
        font-size: 1.30rem !important;
        font-weight: 900 !important;
    }

    /* Boton Inicial Cobrar */
    .pos-btn-cobrar-lg,
    body.pos-kiosk-mode .pos-btn-cobrar-lg {
        height: 48px !important;
        font-size: 1.00rem !important;
        font-weight: 800 !important;
        border-radius: 10px !important;
        padding: 0 16px !important;
    }

    /* Drawer de Pago Desplegado */
    .pos-btn-back-cart,
    body.pos-kiosk-mode .pos-btn-back-cart {
        height: 36px !important;
        padding: 0 12px !important;
        font-size: 0.80rem !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
    }

    .pos-payment-methods,
    body.pos-kiosk-mode .pos-payment-methods {
        gap: 4px !important;
    }

    .pos-pay-btn,
    body.pos-kiosk-mode .pos-pay-btn {
        height: 44px !important;
        padding: 4px 2px !important;
        font-size: 0.74rem !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        gap: 3px !important;
    }
    .pos-pay-btn svg,
    body.pos-kiosk-mode .pos-pay-btn svg {
        width: 15px !important;
        height: 15px !important;
    }

    /* Billetes Rapidos y Efectivo Recibido */
    .pos-cash-panel,
    body.pos-kiosk-mode .pos-cash-panel {
        padding: 6px 8px !important;
        margin-bottom: 6px !important;
        border-radius: 8px !important;
    }

    .pos-quick-bills,
    body.pos-kiosk-mode .pos-quick-bills {
        gap: 4px !important;
    }

    .pos-quick-bill-btn,
    body.pos-kiosk-mode .pos-quick-bill-btn {
        height: 36px !important;
        padding: 0 8px !important;
        font-size: 0.78rem !important;
        font-weight: 800 !important;
        border-radius: 6px !important;
    }

    .pos-cash-input-box,
    body.pos-kiosk-mode .pos-cash-input-box {
        height: 38px !important;
        border-radius: 8px !important;
    }

    .pos-cash-field,
    #pos-cash-received,
    body.pos-kiosk-mode .pos-cash-field,
    body.pos-kiosk-mode #pos-cash-received {
        height: 38px !important;
        font-size: 1.10rem !important;
        font-weight: 800 !important;
    }

    .pos-change-box,
    body.pos-kiosk-mode .pos-change-box {
        height: 38px !important;
        border-radius: 8px !important;
        padding: 0 10px !important;
    }

    .pos-change-val,
    #pos-cash-change,
    body.pos-kiosk-mode .pos-change-val,
    body.pos-kiosk-mode #pos-cash-change {
        font-size: 1.20rem !important;
        font-weight: 900 !important;
    }

    /* Botones de Finalizacion */
    .pos-action-buttons,
    body.pos-kiosk-mode .pos-action-buttons {
        display: grid !important;
        grid-template-columns: 1.25fr 1fr !important;
        gap: 8px !important;
        margin-top: 6px !important;
    }

    .pos-btn-checkout-primary,
    body.pos-kiosk-mode .pos-btn-checkout-primary {
        height: 48px !important;
        font-size: 0.88rem !important;
        font-weight: 800 !important;
        border-radius: 9px !important;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        color: #ffffff !important;
        box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
    }

    .pos-btn-checkout-secondary,
    body.pos-kiosk-mode .pos-btn-checkout-secondary {
        height: 44px !important;
        font-size: 0.80rem !important;
        font-weight: 700 !important;
        border-radius: 9px !important;
    }
}

/* 3. OPTIMIZACION DE CONTINGENCIA SOLO PARA PANTALLAS ULTRA-PEQUEÑAS (<600px de altura) */
@media screen and (max-height: 600px) and (max-width: 1024px) {
    .pos-btn-cobrar-lg { height: 38px !important; font-size: 0.90rem !important; }
    .pos-pay-btn { height: 28px !important; font-size: 0.64rem !important; }
    .pos-quick-bill-btn { height: 28px !important; font-size: 0.65rem !important; padding: 0 4px !important; }
    .pos-cash-input-box, .pos-change-box { height: 28px !important; }
    .pos-btn-checkout-primary { height: 36px !important; font-size: 0.78rem !important; }
    .pos-btn-checkout-secondary { height: 34px !important; font-size: 0.74rem !important; }
}

@media (max-width: 768px) {
    .pos-layout-container {
        grid-template-columns: 1fr !important;
    }
    .pos-cart-card {
        position: static !important;
        margin-top: 12px !important;
        max-height: none !important;
    }
    .pos-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        height: auto !important;
        max-height: 380px !important;
    }
}

/* ==========================================================================
   MODO PANTALLA COMPLETA TOTAL (POS KIOSK MODE) - MAXIMIZACIÓN ABSOLUTA
   ========================================================================== */
body.pos-kiosk-mode {
    overflow: hidden !important;
}

body.pos-kiosk-mode .sidebar {
    display: none !important;
}

body.pos-kiosk-mode .topbar {
    display: none !important;
}

body.pos-kiosk-mode .bottom-nav {
    display: none !important;
}

body.pos-kiosk-mode #app-shell {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #08090b !important;
    z-index: 1000 !important;
    overflow: hidden !important;
}

body.pos-kiosk-mode .main-wrapper {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 0% !important;
    overflow: hidden !important;
}

body.pos-kiosk-mode .content-area {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 6px 12px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

body.pos-kiosk-mode #view-pos {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Barra Superior Kiosk */
body.pos-kiosk-mode .pos-topbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 40px !important;
    min-height: 40px !important;
    margin-bottom: 6px !important;
    flex-shrink: 0 !important;
    gap: 8px !important;
}

.pos-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pos-exit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.pos-exit-btn:hover {
    background: rgba(255, 69, 58, 0.2);
    border-color: rgba(255, 69, 58, 0.5);
    color: #ff453a;
}
.pos-exit-btn:active {
    transform: scale(0.97);
}

.pos-topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 214, 10, 0.12);
    border: 1px solid rgba(255, 214, 10, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--archi-gold);
    flex-shrink: 0;
}

.pos-screen-title {
    margin: 0;
    font-size: 1.10rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.pos-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-branch-badge-box {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px 8px;
    height: 32px;
    color: var(--text-muted);
}

.pos-branch-lbl {
    font-size: 0.74rem;
    color: var(--text-secondary);
    font-weight: 600;
}


.pos-scanner-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 214, 10, 0.4);
    border-radius: 8px;
    padding: 2px 8px;
    height: 32px;
    width: 220px;
    box-shadow: 0 0 10px rgba(255, 214, 10, 0.08);
}
.pos-scanner-box input {
    background: transparent !important;
    border: none !important;
    padding: 4px 6px !important;
    font-size: 0.80rem !important;
    font-family: monospace !important;
    color: #ffffff !important;
    width: 100% !important;
    outline: none !important;
    height: auto !important;
}
.pos-scanner-box button {
    background: none;
    border: none;
    color: var(--archi-gold);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
}

.pos-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 5px 10px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.pos-fullscreen-btn:hover {
    background: rgba(255, 214, 10, 0.12);
    border-color: var(--archi-gold);
    color: var(--archi-gold);
}

/* Layout Maestro Kiosk */
body.pos-kiosk-mode .pos-layout-container {
    display: grid !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) !important;
    gap: 14px !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: 100% !important;
    align-items: stretch !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Columna Catálogo */
body.pos-kiosk-mode .pos-catalog-column {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    min-width: 0 !important;
    gap: 8px !important;
}

body.pos-kiosk-mode .pos-catalog-toolbar {
    padding: 6px 10px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
    gap: 8px !important;
}

body.pos-kiosk-mode .pos-products-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(198px, auto) !important;
    gap: 9px !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overflow-anchor: none !important;
    padding-right: 6px !important;
    align-content: start !important;
}

body.pos-kiosk-mode .pos-product-card {
    height: 100% !important;
    min-height: 198px !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    background: #12141a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    overflow: hidden !important;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
    cursor: pointer !important;
    user-select: none !important;
}

body.pos-kiosk-mode .pos-product-card:hover,
body.pos-kiosk-mode .pos-product-card:active {
    border-color: rgba(255, 214, 10, 0.45) !important;
    transform: scale(0.98) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5) !important;
}

body.pos-kiosk-mode .pos-prod-img-wrap {
    position: relative !important;
    width: 100% !important;
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
    background: rgba(0, 0, 0, 0.45) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 4px !important;
}

body.pos-kiosk-mode .pos-prod-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 2px !important;
    transition: transform 0.25s ease !important;
}

body.pos-kiosk-mode .pos-product-card:hover .pos-prod-img {
    transform: scale(1.06) !important;
}

body.pos-kiosk-mode .pos-prod-info {
    padding: 7px 9px 9px !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    background: #14171e !important;
}

body.pos-kiosk-mode .pos-prod-name {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.25 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 32px !important;
    max-height: 32px !important;
    margin-bottom: 2px !important;
}

body.pos-kiosk-mode .pos-prod-sku {
    font-size: 0.68rem !important;
    color: var(--text-muted) !important;
    font-family: 'JetBrains Mono', monospace !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-bottom: 4px !important;
}

body.pos-kiosk-mode .pos-prod-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: auto !important;
    padding-top: 4px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.pos-kiosk-mode .pos-prod-price {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: var(--archi-gold) !important;
    font-family: 'JetBrains Mono', monospace !important;
    letter-spacing: -0.02em !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

body.pos-kiosk-mode .pos-btn-add {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-size: 1.25rem !important;
    flex-shrink: 0 !important;
}

body.pos-kiosk-mode .pos-btn-add:hover,
body.pos-kiosk-mode .pos-btn-add:active {
    background: #38bdf8 !important;
    border-color: #38bdf8 !important;
    color: #0b111a !important;
    transform: scale(0.92) !important;
}

/* Columna Carrito: Máximo aprovechamiento vertical y sin límites que oculten ítems */
body.pos-kiosk-mode .pos-cart-column {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    width: 100% !important;
    min-width: 0 !important;
}

body.pos-kiosk-mode .pos-cart-card {
    position: static !important;
    top: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #0f1115 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
}

body.pos-kiosk-mode .pos-cart-header {
    padding: 10px 14px !important;
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

body.pos-kiosk-mode .pos-cart-items-scroll {
    flex: 1 1 auto !important;
    min-height: 70px !important;
    max-height: none !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 6px 10px !important;
    gap: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    -webkit-overflow-scrolling: touch !important;
}

body.pos-kiosk-mode .pos-cart-item-row {
    padding: 8px 10px !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 10px !important;
    min-height: 56px !important;
}

body.pos-kiosk-mode .pos-cart-stepper {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
}

body.pos-kiosk-mode .pos-step-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 7px !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

body.pos-kiosk-mode .pos-step-btn:active {
    background: var(--archi-gold) !important;
    color: #000000 !important;
    transform: scale(0.92) !important;
}

body.pos-kiosk-mode .pos-step-input {
    width: 36px !important;
    height: 34px !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    border-radius: 6px !important;
    background: rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    font-family: monospace !important;
}

body.pos-kiosk-mode .pos-cart-item-del {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 7px !important;
    font-size: 1.25rem !important;
    background: rgba(255, 69, 58, 0.12) !important;
    border: 1px solid rgba(255, 69, 58, 0.35) !important;
    color: #ff453a !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

body.pos-kiosk-mode .pos-checkout-section {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    padding: 8px 12px 10px !important;
    background: #090b0e !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    max-height: calc(100vh - 100px) !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
}

/* ==========================================================================
   CORRECCIONES VISUALES BUSCADOR POS & SELECTOR DE SUCURSAL
   ========================================================================== */
.pos-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.pos-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--archi-gold);
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pos-catalog-search-input,
#pos-catalog-search.pos-catalog-search-input {
    padding-left: 42px !important;
    padding-right: 30px !important;
    height: 38px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}
.pos-catalog-search-input:focus {
    border-color: var(--archi-gold) !important;
    box-shadow: 0 0 10px rgba(255, 214, 10, 0.15) !important;
}

/* Selector de Sucursal Personalizado Dark Theme */
.pos-branch-select {
    color-scheme: dark !important;
    background-color: #121418 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 214, 10, 0.4) !important;
    border-radius: 6px !important;
    padding: 3px 26px 3px 8px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffd60a' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    outline: none !important;
}
.pos-branch-select:focus {
    border-color: var(--archi-gold) !important;
    box-shadow: 0 0 8px rgba(255, 214, 10, 0.25) !important;
}
.pos-branch-select option {
    background-color: #16181e !important;
    color: #ffffff !important;
    padding: 10px 14px !important;
    font-size: 0.85rem !important;
}
.pos-branch-select option:checked,
.pos-branch-select option:hover {
    background-color: #262933 !important;
    color: var(--archi-gold) !important;
}

.pos-branch-locked-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 214, 10, 0.1);
    border: 1px solid rgba(255, 214, 10, 0.3);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.80rem;
    font-weight: 700;
    color: #ffffff;
}

/* Indicador de scroll visible para el catálogo de productos */
.pos-products-grid::-webkit-scrollbar {
    width: 6px !important;
}
.pos-products-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 4px !important;
}
.pos-products-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 214, 10, 0.35) !important;
    border-radius: 4px !important;
}
.pos-products-grid::-webkit-scrollbar-thumb:hover {
    background: var(--archi-gold) !important;
}

/* Interacción con productos en el carrito para abrir ficha de detalle */
.pos-cart-item-info {
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.pos-cart-item-info:hover .pos-cart-item-title span {
    color: var(--archi-gold) !important;
}

/* ==========================================================================
   OPTIMIZACION UI/UX UNIFICADA PARA TABLET 9.7" & SUPERFICIES SLATE DARK
   - Eliminacion de bordes saturados y arcos iris
   - Superficie diferenciada con borde neutro
   - Tamano minimo de toque (44px) en celdas, selects y botones
   - Jerarquia tipografica: datos en blanco puro (#ffffff), etiquetas en gris neutro
   ========================================================================== */

/* 1. Normalización de Superficies y Tarjetas */
.metric-card,
.analytics-card,
.branch-telemetry-card,
.dash-goal-subcard,
.archi-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

.metric-card:hover,
.branch-telemetry-card:hover {
    border-color: var(--border-active) !important;
}

/* 2. Jerarquía Tipográfica de Métricas */
.metric-title,
.metric-label,
.dash-goal-left-col span:first-child {
    color: var(--text-secondary) !important;
    font-size: 0.76rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.metric-value {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-family: inherit !important;
}

/* 3. Tamaño Táctil Mínimo Tablet 9.7" (>= 44px) */
select.form-control,
input.form-control,
.ds-filter-control,
.form-select {
    min-height: 44px !important;
    padding: 10px 14px !important;
    font-size: 0.90rem !important;
    border-radius: 6px !important;
}

.btn-archi {
    min-height: 42px !important;
    padding: 10px 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

.btn-archi-sm {
    min-height: 38px !important;
    padding: 8px 14px !important;
}

/* Celdas de tablas con altura táctil cómoda en tablet */
.tesla-table td {
    padding: 12px 14px !important;
}

.tesla-table th {
    padding: 12px 14px !important;
}

/* Botones de acción en tabla táctiles y visibles */
.btn-action-edit,
.btn-action-void,
.btn-action-view,
.btn-action-ticket {
    min-height: 38px !important;
    padding: 8px 14px !important;
    border-radius: 6px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}
/* Botones de filtro y navegación sólidos con contraste moderado */
.chip-period-btn,
.cal-quick-chips-wrapper button,
.btn-nav-solid {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
    border-radius: 6px !important;
    padding: 8px 14px !important;
    min-height: 40px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    transition: all 0.15s ease !important;
}

.chip-period-btn:hover,
.chip-period-btn:active,
.cal-quick-chips-wrapper button:hover,
.cal-quick-chips-wrapper button:active,
.btn-nav-solid:hover,
.btn-nav-solid:active {
    background: #38bdf8 !important;
    border-color: #38bdf8 !important;
    color: #0b111a !important;
}

/* Área táctil mínima de 44x44px para celdas del calendario */
.calendar-day-cell {
    min-height: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
}

/* Fondo uniforme #1e293b y borde sutil #334155 para tarjetas estándar */
.day-kpi-card,
.metric-card,
.branch-telemetry-card,
.dash-goal-subcard,
.cashflow-card:not(.analyst-grid-card):not(.replenish-section):not(.cashflow-advisor-card) {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}

/* ==========================================================================
   PATRÓN DE CUADRÍCULA OSCURA (GRID PATTERN) & PROFUNDIDAD ANALÍTICA
   ========================================================================== */
#sec-replenish-plan,
.replenish-section,
.cashflow-advisor-grid > .cashflow-card,
.cashflow-advisor-card,
.analyst-grid-card {
    background-color: #121821 !important;
    background-image: 
        linear-gradient(to right, #0c1017 1px, transparent 1px),
        linear-gradient(to bottom, #0c1017 1px, transparent 1px) !important;
    background-size: 28px 28px !important;
    border: 1px solid #334155 !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
    position: relative;
}

/* Elevación de Superficies Opacas sobre el Fondo Cuadriculado */
.replenish-kpis-grid > div,
.replenish-toolbar,
#replenish-diagnosis-banner,
.replenish-table-wrapper,
#replenish-table,
#replenish-unfunded-container,
#replenish-overstock-container,
#replenish-transfers-container,
#replenish-unfunded-details,
#replenish-overstock-details,
#replenish-transfers-details,
#advisor-vat-balance-box,
#advisor-recommendation-box,
#advisor-pacing-box,
#advisor-m1-box,
#advisor-f2-container,
#sim-results-box,
#sim-risk-box {
    background-color: #1e293b !important;
    background-image: none !important;
    border: 1px solid #334155 !important;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
}

/* ==========================================================================
   SISTEMA INTEGRAL DE TABLAS DE DATOS: CONTRASTE, ZEBRA STRIPING Y TOUCH HOVER
   ========================================================================== */

/* 1. Contraste en el Encabezado (thead): #0F172A sólido + 2px solid #334155 */
.tesla-table thead th,
.table-custom thead th,
.table-modern thead th,
.day-sales-table thead th,
.expenses-table thead th,
#replenish-table thead th,
#replenish-unfunded-details thead th,
#replenish-overstock-details thead th,
#replenish-transfers-details thead th,
.modal-body table thead th {
    background-color: #0f172a !important;
    background-image: none !important;
    color: #94a3b8 !important;
    font-weight: 700 !important;
    font-size: 0.76rem !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 2px solid #334155 !important;
    padding: 12px 14px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

/* 2. Filas del cuerpo: Altura táctil ergonómica (mínimo 44px) */
.tesla-table tbody tr,
.table-custom tbody tr,
.table-modern tbody tr,
.day-sales-table tbody tr,
.expenses-table tbody tr,
#replenish-table tbody tr,
#replenish-unfunded-details tbody tr,
#replenish-overstock-details tbody tr,
#replenish-transfers-details tbody tr,
.modal-body table tbody tr {
    min-height: 44px !important;
    height: 44px !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: background-color 0.15s ease !important;
}

/* 3. Filas Alternas (Efecto Cebra / Zebra Striping): Impares #16181D / Pares #1E222A */
.tesla-table tbody tr:nth-child(odd),
.table-custom tbody tr:nth-child(odd),
.table-modern tbody tr:nth-child(odd),
.day-sales-table tbody tr:nth-child(odd),
.expenses-table tbody tr:nth-child(odd),
#replenish-table tbody tr:nth-child(odd),
#replenish-unfunded-details tbody tr:nth-child(odd),
#replenish-overstock-details tbody tr:nth-child(odd),
#replenish-transfers-details tbody tr:nth-child(odd),
.modal-body table tbody tr:nth-child(odd) {
    background-color: #16181d !important;
}

.tesla-table tbody tr:nth-child(even),
.table-custom tbody tr:nth-child(even),
.table-modern tbody tr:nth-child(even),
.day-sales-table tbody tr:nth-child(even),
.expenses-table tbody tr:nth-child(even),
#replenish-table tbody tr:nth-child(even),
#replenish-unfunded-details tbody tr:nth-child(even),
#replenish-overstock-details tbody tr:nth-child(even),
#replenish-transfers-details tbody tr:nth-child(even),
.modal-body table tbody tr:nth-child(even) {
    background-color: #1e222a !important;
}

/* 4. Celdas: Separadores horizontales ultra-finos sin líneas divisorias verticales */
.tesla-table tbody td,
.table-custom tbody td,
.table-modern tbody td,
.day-sales-table tbody td,
.expenses-table tbody td,
#replenish-table tbody td,
#replenish-unfunded-details tbody td,
#replenish-overstock-details tbody td,
#replenish-transfers-details tbody td,
.modal-body table tbody td {
    background-color: transparent !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 10px 14px !important;
    vertical-align: middle !important;
    color: var(--text-primary);
}

/* 5. Estado de Interacción (Touch / Hover): Iluminación #262F40 */
.tesla-table tbody tr:hover,
.tesla-table tbody tr:active,
.table-custom tbody tr:hover,
.table-custom tbody tr:active,
.table-modern tbody tr:hover,
.table-modern tbody tr:active,
.day-sales-table tbody tr:hover,
.day-sales-table tbody tr:active,
.expenses-table tbody tr:hover,
.expenses-table tbody tr:active,
#replenish-table tbody tr:hover,
#replenish-table tbody tr:active,
#replenish-unfunded-details tbody tr:hover,
#replenish-unfunded-details tbody tr:active,
#replenish-overstock-details tbody tr:hover,
#replenish-overstock-details tbody tr:active,
#replenish-transfers-details tbody tr:hover,
#replenish-transfers-details tbody tr:active,
.modal-body table tbody tr:hover,
.modal-body table tbody tr:active {
    background-color: #262f40 !important;
}

.tesla-table tbody tr:hover td,
.tesla-table tbody tr:active td,
.table-custom tbody tr:hover td,
.table-custom tbody tr:active td,
.table-modern tbody tr:hover td,
.table-modern tbody tr:active td,
.day-sales-table tbody tr:hover td,
.day-sales-table tbody tr:active td,
.expenses-table tbody tr:hover td,
.expenses-table tbody tr:active td,
#replenish-table tbody tr:hover td,
#replenish-table tbody tr:active td,
#replenish-unfunded-details tbody tr:hover td,
#replenish-unfunded-details tbody tr:active td,
#replenish-overstock-details tbody tr:hover td,
#replenish-overstock-details tbody tr:active td,
#replenish-transfers-details tbody tr:hover td,
#replenish-transfers-details tbody tr:active td,
.modal-body table tbody tr:hover td,
.modal-body table tbody tr:active td {
    background-color: transparent !important;
}

/* Contenedores de Alertas y Detalles con fondo opaco y borde neutro */
#replenish-unfunded-details,
#replenish-overstock-details,
#replenish-transfers-details {
    background-color: #16181d !important;
    background-image: none !important;
    border: none !important;
    border-top: 1px solid #334155 !important;
    border-radius: 0 0 10px 10px !important;
}

#replenish-unfunded-details table,
#replenish-overstock-details table,
#replenish-transfers-details table {
    background-color: #16181d !important;
    background-image: none !important;
    width: 100%;
    border-collapse: collapse;
}

/* Detalle Plegable Matriz ABC: Fondo más oscuro #0B0F19 para separar de la fila principal */
.abc-detail-row,
.abc-detail-row > td {
    background-color: #0b0f19 !important;
    background-image: none !important;
    border-bottom: 1px solid #334155 !important;
}

.abc-detail-row:hover,
.abc-detail-row:hover > td,
.abc-detail-row:active,
.abc-detail-row:active > td {
    background-color: #0b0f19 !important;
}

.abc-detail-card {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

/* Tarjetas de Métricas Interactivas tipo Acordeón (Pozo Acumulado) */
.pool-accordion-card {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 10px !important;
    padding: 0 !important;
    margin: 0;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    user-select: none !important;
    overflow: hidden !important;
    position: relative !important;
    outline: none !important;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

.pool-accordion-card:hover {
    background: #2a374a !important;
    border-color: #38bdf8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 14px rgba(56, 189, 248, 0.15) !important;
}

.pool-accordion-card:active {
    transform: translateY(0) !important;
    background: #1a2332 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

.pool-accordion-card:focus-visible {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35) !important;
}

/* Variante especial para Pozo Total Vivo (Verde de éxito) */
.pool-accordion-card.pool-card-success:hover {
    border-color: #30d158 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 14px rgba(48, 209, 88, 0.2) !important;
}

.pool-accordion-card.pool-card-success:focus-visible {
    border-color: #30d158 !important;
    box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.35) !important;
}

.pool-accordion-card-body {
    padding: 16px 18px 14px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.pool-accordion-card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 6px !important;
}

.pool-accordion-title {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #94a3b8 !important;
}

.pool-accordion-card.pool-card-success .pool-accordion-title {
    color: #30d158 !important;
}

.pool-accordion-value {
    font-size: 1.65rem !important;
    font-weight: 700 !important;
    font-family: var(--font-mono, monospace) !important;
    line-height: 1.25 !important;
    color: #ffffff !important;
    letter-spacing: -0.02em !important;
}

.pool-accordion-card.pool-card-success .pool-accordion-value {
    color: #30d158 !important;
}

.pool-accordion-sublabel {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    line-height: 1.35 !important;
    font-weight: 450 !important;
    margin-top: 2px !important;
}

/* Barra inferior (Footer de acción) de ~32px */
.pool-accordion-card-footer {
    height: 32px !important;
    min-height: 32px !important;
    background: rgba(255, 255, 255, 0.035) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 16px !important;
    transition: background 0.18s ease, border-color 0.18s ease !important;
}

.pool-accordion-card:hover .pool-accordion-card-footer {
    background: rgba(56, 189, 248, 0.08) !important;
    border-top-color: rgba(56, 189, 248, 0.2) !important;
}

.pool-accordion-card.pool-card-success:hover .pool-accordion-card-footer {
    background: rgba(48, 209, 88, 0.08) !important;
    border-top-color: rgba(48, 209, 88, 0.2) !important;
}

.pool-accordion-action-text {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    letter-spacing: 0.02em !important;
    transition: color 0.18s ease !important;
}

.pool-accordion-card:hover .pool-accordion-action-text {
    color: #38bdf8 !important;
}

.pool-accordion-card.pool-card-success:hover .pool-accordion-action-text {
    color: #30d158 !important;
}

.pool-accordion-chevron {
    font-size: 0.75rem !important;
    line-height: 1 !important;
    display: inline-block !important;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pool-accordion-card:hover .pool-accordion-chevron {
    transform: translateY(1.5px) !important;
}

/* ==========================================================================
   IDENTIDAD GLOBAL ARCHI: AZUL PIZARRA ANÁLOGO (90%) + ÁMBAR MATE (10%)
   Soporte dual Modo Oscuro (default) y Modo Claro ([data-theme="light"])
   ========================================================================== */

body {
    background-color: var(--bg-main) !important;
    color: var(--text-primary) !important;
}

#app-shell,
.main-wrapper {
    background-color: var(--bg-main) !important;
}

/* Botón selector de tema Claro / Oscuro en Topbar */
.btn-archi-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 11px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-archi-theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--archi-analog);
}

/* Sidebar, Topbar & Bottom Nav */
.sidebar {
    background-color: var(--bg-surface) !important;
    border-right: 1px solid var(--border-subtle) !important;
}

.brand-logo {
    border-bottom-color: var(--border-subtle) !important;
}

.brand-name {
    color: var(--text-primary) !important;
}

.brand-name .dot {
    color: var(--archi-comp) !important;
}

.nav-item {
    color: var(--text-secondary) !important;
}

.nav-item:hover {
    background-color: var(--bg-card-hover) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-subtle) !important;
}

.nav-item.active {
    background-color: var(--archi-analog-soft) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--archi-analog-border) !important;
}

.nav-item.active svg {
    stroke: var(--archi-analog) !important;
}

.sidebar-user {
    background: var(--bg-card) !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.sidebar-avatar {
    background: var(--archi-analog-soft) !important;
    border-color: var(--archi-analog-border) !important;
    color: var(--text-primary) !important;
}

.topbar {
    background-color: var(--bg-surface) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

.bottom-nav {
    background-color: var(--bg-surface) !important;
    border-top: 1px solid var(--border-subtle) !important;
}

.mobile-nav-btn {
    color: var(--text-secondary) !important;
}

.mobile-nav-btn.active {
    color: var(--archi-analog) !important;
}

/* Botones Globales (90% Análogo / 10% Complementario Ámbar) */
.btn-archi-primary {
    background: var(--archi-comp) !important;
    color: var(--archi-comp-text) !important;
    border: 1px solid var(--archi-comp) !important;
    box-shadow: none !important;
}

.btn-archi-primary:hover:not(:disabled) {
    background: var(--archi-comp-hover) !important;
    border-color: var(--archi-comp-hover) !important;
}

.btn-archi-secondary {
    background: var(--archi-analog-soft) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--archi-analog-border) !important;
}

.btn-archi-secondary:hover:not(:disabled) {
    background: var(--bg-card-hover) !important;
    border-color: var(--archi-analog) !important;
}

.btn-archi-outline {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
}

.btn-archi-outline:hover:not(:disabled) {
    background: var(--bg-card-hover) !important;
    border-color: var(--archi-analog) !important;
}

.archi-subnav-tabs {
    border-bottom-color: var(--border-subtle) !important;
}

.archi-subnav-btn.btn-archi-primary {
    color: var(--text-primary) !important;
    background: var(--archi-analog-soft) !important;
    border: 1px solid var(--archi-analog-border) !important;
    box-shadow: none !important;
}

.archi-subnav-btn.btn-archi-outline {
    color: var(--text-secondary) !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
}

.archi-subnav-btn.btn-archi-outline:hover {
    color: var(--text-primary) !important;
    background: var(--bg-card-hover) !important;
    border-color: var(--border-active) !important;
}

/* Superficies, Tarjetas y Contenedores ERP */
.metric-card,
.analytics-card,
.branch-telemetry-card,
.dash-goal-subcard,
.archi-card,
.day-kpi-card,
.cashflow-card:not(.analyst-grid-card):not(.replenish-section):not(.cashflow-advisor-card),
.pool-accordion-card,
.abc-detail-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
}

.metric-card:hover,
.branch-telemetry-card:hover,
.pool-accordion-card:hover {
    border-color: var(--archi-analog-border) !important;
    background: var(--bg-card-hover) !important;
    box-shadow: none !important;
}

.metric-value,
.pool-accordion-value {
    color: var(--text-primary) !important;
}

.metric-title,
.metric-label,
.pool-accordion-title,
.pool-accordion-sublabel {
    color: var(--text-secondary) !important;
}

.pool-accordion-card-footer {
    background: var(--bg-surface) !important;
    border-top: 1px solid var(--border-subtle) !important;
}

.pool-accordion-card:hover .pool-accordion-card-footer {
    background: var(--archi-analog-soft) !important;
    border-top-color: var(--archi-analog-border) !important;
}

.pool-accordion-card:hover .pool-accordion-action-text {
    color: var(--archi-analog) !important;
}

.pool-accordion-card.pool-card-success .pool-accordion-title,
.pool-accordion-card.pool-card-success .pool-accordion-value,
.pool-accordion-card.pool-card-success:hover .pool-accordion-action-text {
    color: var(--archi-positive) !important;
}

/* Secciones Analíticas / ARIS sin grilla neón */
#sec-replenish-plan,
.replenish-section,
.cashflow-advisor-grid > .cashflow-card,
.cashflow-advisor-card,
.analyst-grid-card {
    background-color: var(--bg-surface) !important;
    background-image: none !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
}

.replenish-kpis-grid > div,
.replenish-toolbar,
#replenish-diagnosis-banner,
.replenish-table-wrapper,
#replenish-table,
#replenish-unfunded-container,
#replenish-overstock-container,
#replenish-transfers-container,
#replenish-unfunded-details,
#replenish-overstock-details,
#replenish-transfers-details,
#advisor-vat-balance-box,
#advisor-recommendation-box,
#advisor-pacing-box,
#advisor-m1-box,
#advisor-f2-container,
#sim-results-box,
#sim-risk-box {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
}

.abc-detail-row,
.abc-detail-row > td {
    background-color: var(--bg-main) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

/* Tablas del Sistema (Contraste dual Oscuro/Claro) */
.tesla-table thead th,
.table-custom thead th,
.table-modern thead th,
.day-sales-table thead th,
.expenses-table thead th,
#replenish-table thead th,
#replenish-unfunded-details thead th,
#replenish-overstock-details thead th,
#replenish-transfers-details thead th,
.modal-body table thead th {
    background-color: var(--bg-table-head) !important;
    color: var(--text-secondary) !important;
    border-bottom: 2px solid var(--border-subtle) !important;
}

.tesla-table tbody tr,
.table-custom tbody tr,
.table-modern tbody tr,
.day-sales-table tbody tr,
.expenses-table tbody tr,
#replenish-table tbody tr,
#replenish-unfunded-details tbody tr,
#replenish-overstock-details tbody tr,
#replenish-transfers-details tbody tr,
.modal-body table tbody tr {
    border-bottom: 1px solid var(--border-subtle) !important;
}

.tesla-table tbody tr:nth-child(odd),
.table-custom tbody tr:nth-child(odd),
.table-modern tbody tr:nth-child(odd),
.day-sales-table tbody tr:nth-child(odd),
.expenses-table tbody tr:nth-child(odd),
#replenish-table tbody tr:nth-child(odd),
#replenish-unfunded-details tbody tr:nth-child(odd),
#replenish-overstock-details tbody tr:nth-child(odd),
#replenish-transfers-details tbody tr:nth-child(odd),
.modal-body table tbody tr:nth-child(odd) {
    background-color: var(--bg-card) !important;
}

.tesla-table tbody tr:nth-child(even),
.table-custom tbody tr:nth-child(even),
.table-modern tbody tr:nth-child(even),
.day-sales-table tbody tr:nth-child(even),
.expenses-table tbody tr:nth-child(even),
#replenish-table tbody tr:nth-child(even),
#replenish-unfunded-details tbody tr:nth-child(even),
#replenish-overstock-details tbody tr:nth-child(even),
#replenish-transfers-details tbody tr:nth-child(even),
.modal-body table tbody tr:nth-child(even) {
    background-color: var(--bg-table-even) !important;
}

.tesla-table tbody td,
.table-custom tbody td,
.table-modern tbody td,
.day-sales-table tbody td,
.expenses-table tbody td,
#replenish-table tbody td,
#replenish-unfunded-details tbody td,
#replenish-overstock-details tbody td,
#replenish-transfers-details tbody td,
.modal-body table tbody td {
    border-bottom: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.tesla-table tbody tr:hover,
.table-custom tbody tr:hover,
.table-modern tbody tr:hover,
.day-sales-table tbody tr:hover,
.expenses-table tbody tr:hover,
#replenish-table tbody tr:hover,
.modal-body table tbody tr:hover {
    background-color: var(--bg-card-hover) !important;
}

/* Inputs, Selects y Modales */
.form-control,
.form-select,
select.form-control,
input.form-control,
textarea.form-control {
    background-color: var(--bg-input) !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--archi-analog) !important;
    box-shadow: none !important;
}

.modal-container,
.modal-content,
.login-card {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border-subtle) !important;
}

.modal-footer {
    border-top: 1px solid var(--border-subtle) !important;
}

.modal-close-btn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
}

.modal-close-btn:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--archi-analog) !important;
    color: var(--text-primary) !important;
}

.financial-modal-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
}

.financial-modal-card .card-amount {
    color: var(--text-primary) !important;
}

.financial-modal-card .card-subtext {
    color: var(--text-secondary) !important;
}

/* Tipografía y Encabezados Globales */
.archi-header-title,
.section-title,
.modal-header h2,
.modal-header h3 {
    color: var(--text-primary) !important;
}

.archi-header-tagline,
.brand-tagline {
    color: var(--archi-comp) !important;
}

.content-area h1:not(.archi-hero-banner h1),
.content-area h2,
.content-area h3,
.content-area h4,
.modal-container h2,
.modal-container h3,
.modal-container h4 {
    color: var(--text-primary);
}

#tax-print-sheet,
#tax-print-sheet h1,
#tax-print-sheet h2,
#tax-print-sheet h3,
#tax-print-sheet h4,
.ticket-wrapper,
.pos-ticket-paper-preview {
    color: #000000 !important;
}

.photo-card-arrow-btn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.archi-photo-card:hover .photo-card-arrow-btn {
    background: var(--archi-comp) !important;
    border-color: var(--archi-comp) !important;
    color: var(--archi-comp-text) !important;
}

/* Logo, Topbar, Bottom Nav Móvil y Login */
:root[data-theme="light"] .brand-logo-img,
:root[data-theme="light"] .topbar-mobile-brand img,
:root[data-theme="light"] .login-brand-logo-img {
    filter: brightness(0.15);
}

.btn-gear-icon {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.btn-gear-icon:hover {
    background: var(--archi-analog-soft) !important;
    border-color: var(--archi-analog) !important;
    color: var(--archi-analog) !important;
}

.btn-info-icon {
    background: var(--archi-analog-soft) !important;
    border: 1px solid var(--archi-analog-border) !important;
    color: var(--archi-analog) !important;
}

.btn-info-icon:hover,
.btn-info-icon.active {
    background: var(--archi-analog) !important;
    border-color: var(--archi-analog) !important;
    color: var(--archi-analog-badge-text) !important;
    box-shadow: none !important;
}

.info-help-desc {
    background: var(--archi-analog-soft) !important;
    border: 1px solid var(--archi-analog-border) !important;
    color: var(--text-secondary) !important;
}

.archi-bottom-nav {
    background: var(--bg-surface) !important;
    border-top: 1px solid var(--border-subtle) !important;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12) !important;
}

.mobile-nav-btn {
    color: var(--text-secondary) !important;
}

.mobile-nav-btn.active {
    color: var(--archi-analog) !important;
}

.mobile-nav-btn.active svg {
    stroke: var(--archi-analog) !important;
    filter: none !important;
}

.mobile-nav-btn.active .nav-label {
    color: var(--archi-analog) !important;
}

.archi-mobile-fab {
    background: var(--archi-comp) !important;
    color: var(--archi-comp-text) !important;
    border: 1px solid var(--archi-comp) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2) !important;
}

#login-view {
    background-color: var(--bg-main) !important;
}

#login-view .modal-container {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22) !important;
    color: var(--text-primary) !important;
}

.login-brand-title {
    color: var(--text-primary) !important;
}

.login-brand-subtitle,
#login-view .form-group label {
    color: var(--text-secondary) !important;
}

#login-view .form-control {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

#login-view .form-control:focus {
    border-color: var(--archi-analog) !important;
    background: var(--bg-input) !important;
}

#login-submit-btn {
    background: var(--archi-comp) !important;
    color: var(--archi-comp-text) !important;
    border: 1px solid var(--archi-comp) !important;
}

#login-submit-btn:hover {
    background: var(--archi-comp-hover) !important;
    border-color: var(--archi-comp-hover) !important;
    color: var(--archi-comp-text) !important;
}

.login-credentials-box {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
}

/* Badges, Chips y Pills Globales (Tabla, Impuestos, Gastos y Sucursales) */
.badge-pending,
.paid-indicator.is-pending,
.badge-fixed-expense,
.badge-transfer,
.badge-tax-exento,
.badge-type-rent,
.badge-type-services {
    background: var(--color-warning-bg) !important;
    color: var(--archi-comp) !important;
    border: 1px solid var(--color-warning-border) !important;
}

.badge-paid,
.badge-paid-static,
.paid-indicator.is-paid,
.badge-cash,
.badge-tax-recuperable,
.badge-type-stock {
    background: var(--color-success-bg) !important;
    color: var(--archi-positive) !important;
    border: 1px solid var(--color-success-border) !important;
}

.badge-unpaid,
.voided-chip,
.badge-mixed,
.badge-tax-rechazado {
    background: var(--color-danger-bg) !important;
    color: var(--archi-alert) !important;
    border: 1px solid var(--color-danger-border) !important;
}

.badge-card,
.badge-debit,
.badge-credit,
.badge-dte,
.badge-tax-aceptado,
.badge-tax-caja,
.badge-tax-iva,
.badge-tax-rent,
.badge-type-salary,
.badge-type-gc,
.badge-type-supplies {
    background: var(--archi-analog-soft) !important;
    color: var(--archi-analog) !important;
    border: 1px solid var(--archi-analog-border) !important;
}

.badge-neutral,
.badge-variable-expense,
.badge-type-general,
.badge-branch-l1,
.badge-branch-l2,
.badge-branch-l21,
.badge-branch-l3,
.badge-branch-central,
.exp-folio-chip,
.exp-payment-pill {
    background: var(--bg-card-dark) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-subtle) !important;
}

/* Ventas Diarias: Filtros y Agrupadores */
.ds-filter-panel select.form-control,
.ds-filter-panel input.form-control,
.ds-filter-control {
    background-color: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
}

.ds-filter-panel select.form-control:focus,
.ds-filter-panel input.form-control:focus,
.ds-filter-control:focus {
    background-color: var(--bg-input) !important;
    border-color: var(--archi-analog) !important;
}

.ds-group-divider {
    background: var(--bg-surface) !important;
    border-top: 1px solid var(--border-subtle) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

/* Proveedores & Control de Gastos */
.supp-subnav-tabs {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
}

.supp-subnav-btn,
.supp-subnav-btn.btn-archi-outline {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}

.supp-subnav-btn:hover {
    color: var(--text-primary) !important;
    background: var(--bg-card-hover) !important;
}

.supp-subnav-btn.btn-archi-primary,
.supp-subnav-btn.active {
    background: var(--archi-analog-soft) !important;
    color: var(--archi-analog) !important;
    border: 1px solid var(--archi-analog-border) !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

.supp-kpi-main {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-left: 4px solid var(--archi-comp) !important;
    box-shadow: none !important;
}

.supp-kpi-main .metric-label {
    color: var(--archi-comp) !important;
}

.supp-kpi-main .metric-value {
    color: var(--text-primary) !important;
}

.supp-kpi-main .metric-trend {
    color: var(--text-secondary) !important;
}

.supp-kpis-subgrid .metric-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
}

.supp-kpis-subgrid .metric-card .metric-label {
    color: var(--text-secondary) !important;
}

.supp-kpis-subgrid .metric-card .metric-value {
    color: var(--text-primary) !important;
}

.supp-kpis-subgrid .metric-card .metric-trend {
    color: var(--text-muted) !important;
}

.supp-sub-salaries,
.supp-sub-fixed {
    border-left: 3px solid var(--archi-analog) !important;
}

.supp-sub-purchases {
    border-left: 3px solid var(--archi-positive) !important;
}

.supp-sub-services {
    border-left: 3px solid var(--archi-comp) !important;
}

.supp-filter-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
}

.supp-filter-card:hover {
    border-color: var(--archi-analog-border) !important;
    box-shadow: none !important;
}

.supp-filter-card-header {
    border-bottom: 1px solid var(--border-subtle) !important;
}

.supp-filter-label {
    color: var(--text-secondary) !important;
}

.supp-ctrl {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.supp-ctrl:hover,
.supp-ctrl:focus {
    background: var(--bg-input) !important;
    border-color: var(--archi-analog) !important;
    box-shadow: none !important;
}

.supp-ctrl option {
    background: var(--bg-surface) !important;
    color: var(--text-primary) !important;
}

/* Impuestos & Formulario 29 */
.rcv-mirror-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
}

.rcv-mirror-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 10px;
}

.tax-tab-group {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
}

.tax-tab-btn {
    color: var(--text-secondary) !important;
}

.tax-tab-btn:hover {
    color: var(--text-primary) !important;
    background: var(--bg-card-hover) !important;
}

.tax-tab-btn.active {
    background: var(--archi-analog-soft) !important;
    color: var(--archi-analog) !important;
    border: 1px solid var(--archi-analog-border) !important;
    box-shadow: none !important;
}

.tax-switch-btn {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-subtle) !important;
}

.tax-switch-btn:hover {
    background: var(--bg-card-hover) !important;
    color: var(--text-primary) !important;
}

.tax-switch-btn.active {
    background: var(--archi-analog-soft) !important;
    color: var(--text-primary) !important;
    border-color: var(--archi-analog-border) !important;
}

.tax-switch-btn.active .tax-switch-pill {
    background: var(--archi-analog) !important;
}

.tax-switch-btn.active .tax-switch-knob {
    background: #ffffff !important;
}

.tax-switch-btn.active .tax-switch-badge {
    background: var(--archi-analog-soft) !important;
    color: var(--archi-analog) !important;
}

.tax-dte-scroll-container,
.abc-table-scroll-container,
.expenses-table-container,
.day-sales-table-wrapper {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
}

.expenses-table thead th,
.abc-table-scroll-container thead th,
.tax-dte-scroll-container thead th {
    background: var(--bg-table-head) !important;
    color: var(--text-secondary) !important;
    border-bottom: 2px solid var(--border-subtle) !important;
    box-shadow: none !important;
}

.btn-analytics-taxes {
    background: var(--color-warning-bg) !important;
    border: 1px solid var(--color-warning-border) !important;
    color: var(--archi-comp) !important;
    box-shadow: none !important;
}

.btn-analytics-taxes:hover {
    background: var(--archi-comp) !important;
    color: var(--archi-comp-text) !important;
    border-color: var(--archi-comp) !important;
    box-shadow: none !important;
}

/* OCR de Comprobantes */
.ocr-meta-grid {
    background: transparent !important;
    border: none !important;
}

.ocr-payments-section,
.ocr-pay-card,
.ocr-item-card {
    background: var(--bg-surface) !important;
    border-color: var(--border-subtle) !important;
}

.ocr-payments-title,
.ocr-total-card-label {
    color: var(--text-primary) !important;
}

.ocr-input-ctrl {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.ocr-input-currency-wrapper {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-subtle) !important;
}

.ocr-input-currency-wrapper:focus-within {
    border-color: var(--archi-analog) !important;
}

.ocr-pay-input,
input.form-control.ocr-pay-input {
    background: transparent !important;
    border: none !important;
    color: var(--text-primary) !important;
}

.ocr-input-ctrl:focus {
    border-color: var(--archi-analog) !important;
    background: var(--bg-input) !important;
}

.ocr-pay-input:focus,
input.form-control.ocr-pay-input:focus {
    border: none !important;
    background: transparent !important;
}

.ocr-total-display-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--archi-comp) !important;
    box-shadow: none !important;
}

.ocr-total-card-number {
    color: var(--archi-comp) !important;
    text-shadow: none !important;
}

/* Calendario Analítico */
.calendar-widget-card,
.cal-range-toolbar,
.day-details-panel,
.ranking-card-item {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
}

.calendar-month-heading,
.day-kpi-value,
.day-num {
    color: var(--text-primary) !important;
}

.calendar-nav-btn,
.cal-date-input,
.cal-filter-select,
.cal-status-badge {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.calendar-nav-btn:hover {
    background: var(--archi-analog-soft) !important;
    color: var(--archi-analog) !important;
    border-color: var(--archi-analog) !important;
}

.cal-btn-sumar {
    background: var(--archi-comp) !important;
    color: var(--archi-comp-text) !important;
    box-shadow: none !important;
}

.cal-btn-sumar:hover {
    background: var(--archi-comp-hover) !important;
    box-shadow: none !important;
}

.calendar-day-cell {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.calendar-day-cell.day-empty {
    background: transparent !important;
    border-color: transparent !important;
}

.calendar-day-cell:hover:not(.day-empty) {
    background: var(--bg-card-hover) !important;
    border-color: var(--archi-analog) !important;
}

.calendar-day-cell.day-today {
    border-color: var(--archi-analog) !important;
}

.calendar-day-cell.day-has-sales {
    background: var(--archi-analog-soft) !important;
    border-color: var(--archi-analog-border) !important;
}

.calendar-day-cell.day-selected,
.calendar-day-cell.day-range-start,
.calendar-day-cell.day-range-end {
    background: var(--archi-analog) !important;
    border-color: var(--archi-analog) !important;
    box-shadow: none !important;
}

.calendar-day-cell.day-selected .day-num,
.calendar-day-cell.day-range-start .day-num,
.calendar-day-cell.day-range-end .day-num {
    color: var(--archi-analog-badge-text) !important;
}

.calendar-day-cell.day-in-range {
    background: var(--archi-analog-soft) !important;
    border-color: var(--archi-analog-border) !important;
}

.calendar-day-cell.day-in-range .day-num {
    color: var(--text-primary) !important;
}

.day-sales-dot {
    background: var(--archi-positive) !important;
}

.calendar-day-cell.day-selected .day-sales-dot,
.calendar-day-cell.day-range-start .day-sales-dot,
.calendar-day-cell.day-range-end .day-sales-dot {
    background: var(--archi-analog-badge-text) !important;
}

:root[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
:root[data-theme="light"] input[type="month"]::-webkit-calendar-picker-indicator {
    filter: none !important;
}

/* Configuración, Inventario, Categorías y Botones de Acción */
.settings-nav-bar {
    background: transparent !important;
}

.settings-nav-btn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
}

.settings-nav-btn:hover {
    color: var(--text-primary) !important;
    background: var(--bg-card-hover) !important;
    border-color: var(--border-active) !important;
}

.settings-nav-btn.active {
    background: var(--archi-analog-soft) !important;
    color: var(--archi-analog) !important;
    border-color: var(--archi-analog-border) !important;
    box-shadow: none !important;
}

.btn-settings-primary,
.btn-archi-mint {
    background: var(--archi-comp) !important;
    color: var(--archi-comp-text) !important;
    border: 1px solid var(--archi-comp) !important;
    box-shadow: none !important;
}

.btn-settings-primary:hover,
.btn-archi-mint:hover {
    background: var(--archi-comp-hover) !important;
    border-color: var(--archi-comp-hover) !important;
    color: var(--archi-comp-text) !important;
    box-shadow: none !important;
}

.btn-settings-secondary,
.btn-settings-accent,
.btn-tesla,
.btn-outline-tesla,
.btn-modal-subtle-close,
.btn-modal-ghost {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
}

.btn-settings-secondary:hover,
.btn-settings-accent:hover,
.btn-outline-tesla:hover,
.btn-modal-subtle-close:hover,
.btn-modal-ghost:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--archi-analog) !important;
    color: var(--text-primary) !important;
}

.hardware-card,
.laser-scanner-box {
    background: var(--bg-card) !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.inventory-preview-panel,
.inventory-preview-img-container {
    background: var(--bg-card) !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
}

.category-inline-input,
.replenish-filter-select {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-active) !important;
}

.btn-action-ticket,
.btn-action-view,
.btn-action-edit {
    background: var(--archi-analog-soft) !important;
    color: var(--archi-analog) !important;
    border: 1px solid var(--archi-analog-border) !important;
    box-shadow: none !important;
}

.btn-action-ticket:hover,
.btn-action-view:hover,
.btn-action-edit:hover {
    background: var(--archi-analog) !important;
    color: var(--archi-analog-badge-text) !important;
    border-color: var(--archi-analog) !important;
}

.btn-action-void,
.btn-archi-danger {
    background: var(--color-danger-bg) !important;
    color: var(--archi-alert) !important;
    border: 1px solid var(--color-danger-border) !important;
    box-shadow: none !important;
}

/* Modal de Variantes POS */
.pos-variant-row {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
}

.pos-variant-row:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--archi-analog) !important;
}

.pos-variant-badge,
.pos-variant-add-icon {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.pos-variant-name,
.pos-variant-price,
.pos-variant-stock-num {
    color: var(--text-primary) !important;
}

.pos-variant-meta {
    color: var(--text-secondary) !important;
}

.btn-pos-modal-cancel,
.btn-pos-modal-close {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-subtle) !important;
}

.btn-pos-modal-cancel:hover,
.btn-pos-modal-close:hover {
    background: var(--bg-card-hover) !important;
    color: var(--text-primary) !important;
}

.chip-period-btn,
.cal-quick-chips-wrapper button,
.btn-nav-solid {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
}

.chip-period-btn:hover,
.cal-quick-chips-wrapper button:hover,
.btn-nav-solid:hover {
    background: var(--archi-analog-soft) !important;
    border-color: var(--archi-analog) !important;
    color: var(--text-primary) !important;
}

/* Scrollbar adaptativo en Modo Claro */
:root[data-theme="light"] * {
    scrollbar-color: rgba(22, 32, 50, 0.22) transparent;
}

:root[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(22, 32, 50, 0.22);
}

/* ==========================================================================
   POS TÁCTIL — DIRECCIÓN A (BARRA UNIFICADA + HOJA DE COBRO)
   Usa exclusivamente tokens semánticos (Oscuro + Claro)
   ========================================================================== */
body.pos-kiosk-mode,
body.pos-kiosk-mode #app-shell,
#view-pos {
    background: var(--bg-main) !important;
    color: var(--text-primary);
}

#view-pos .pos-topbar,
body.pos-kiosk-mode #view-pos .pos-topbar {
    height: 44px !important;
    min-height: 44px !important;
    margin-bottom: 8px !important;
    padding: 0 2px;
    border-bottom: 1px solid var(--border-subtle);
}

#view-pos .pos-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

#view-pos .pos-exit-btn {
    height: 30px;
    padding: 0 11px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
}

#view-pos .pos-exit-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    color: var(--text-primary);
}

#view-pos .pos-screen-title {
    margin: 0;
    font-size: 0.96rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    letter-spacing: 0.02em;
}

#view-pos .pos-context-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-active);
    box-sizing: border-box;
}

#view-pos .pos-context-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--archi-analog);
    flex-shrink: 0;
}

#view-pos .pos-context-sep {
    color: var(--text-muted);
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

#view-pos select.pos-branch-select,
#view-pos select.pos-terminal-select {
    min-height: 26px !important;
    height: 26px !important;
    padding: 0 18px 0 4px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 4px !important;
    background-color: transparent !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%236c88b5' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 2px center !important;
}

#view-pos select.pos-terminal-select {
    color: var(--archi-analog) !important;
}

#view-pos select.pos-branch-select option {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
}

#view-pos .pos-branch-locked-badge {
    background: transparent !important;
    border: none !important;
    padding: 0 4px !important;
    font-size: 0.78rem !important;
    color: var(--text-primary) !important;
}

#view-pos .pos-branch-locked-badge span {
    color: var(--text-primary) !important;
}

#view-pos .pos-fullscreen-btn {
    height: 30px !important;
    padding: 0 11px !important;
    border-radius: 8px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
    font-size: 0.76rem !important;
}

#view-pos .pos-fullscreen-btn:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--archi-analog) !important;
    color: var(--text-primary) !important;
}

/* Buscador Unificado, Escaneo y Categorías */
#view-pos .pos-catalog-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#view-pos .pos-unified-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#view-pos .pos-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

#view-pos .pos-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--archi-analog) !important;
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

#view-pos #pos-catalog-search.pos-catalog-search-input {
    width: 100%;
    height: 38px !important;
    min-height: 38px !important;
    padding-left: 40px !important;
    padding-right: 32px !important;
    background: var(--bg-input) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    font-size: 0.85rem !important;
}

#view-pos #pos-catalog-search.pos-catalog-search-input:focus {
    border-color: var(--archi-analog) !important;
    box-shadow: none !important;
    outline: none !important;
}

#view-pos #pos-clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: none;
    font-size: 16px;
    padding: 4px;
    z-index: 2;
}

#view-pos #btn-pos-camera-scan.pos-camera-scan-btn {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    border-radius: 8px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-active) !important;
    color: var(--archi-analog) !important;
    font-size: 0.80rem !important;
    font-weight: 700 !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

#view-pos #btn-pos-camera-scan.pos-camera-scan-btn:hover,
#view-pos #btn-pos-camera-scan.pos-camera-scan-btn.active {
    background: var(--archi-analog-soft) !important;
    border-color: var(--archi-analog) !important;
    color: var(--text-primary) !important;
}

#view-pos .pos-category-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0;
    flex-shrink: 0;
}

#view-pos .pos-cat-pill {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

#view-pos .pos-cat-pill:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--border-active) !important;
    color: var(--text-primary) !important;
}

#view-pos .pos-cat-pill.active {
    background: var(--archi-analog-soft) !important;
    border-color: var(--archi-analog-border) !important;
    color: var(--archi-analog) !important;
    font-weight: 700 !important;
}

/* Grilla y Tarjetas de Productos */
#view-pos .pos-products-grid::-webkit-scrollbar-thumb {
    background: var(--archi-analog-border) !important;
}

#view-pos .pos-products-grid::-webkit-scrollbar-thumb:hover {
    background: var(--archi-analog) !important;
}

#view-pos .pos-product-card,
body.pos-kiosk-mode #view-pos .pos-product-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 10px !important;
    min-height: 186px !important;
    box-shadow: none !important;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease !important;
}

#view-pos .pos-product-card:hover,
body.pos-kiosk-mode #view-pos .pos-product-card:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--border-active) !important;
    box-shadow: none !important;
    transform: none !important;
}

#view-pos .pos-product-card.in-cart,
body.pos-kiosk-mode #view-pos .pos-product-card.in-cart {
    border-color: var(--archi-analog) !important;
}

#view-pos .pos-product-card:active,
body.pos-kiosk-mode #view-pos .pos-product-card:active {
    transform: scale(0.985) !important;
    border-color: var(--archi-analog) !important;
}

#view-pos .pos-prod-img-wrap,
body.pos-kiosk-mode #view-pos .pos-prod-img-wrap {
    background: var(--bg-card-dark) !important;
    border-bottom: 1px solid var(--border-subtle);
}

#view-pos .pos-prod-info,
body.pos-kiosk-mode #view-pos .pos-prod-info {
    background: var(--bg-card) !important;
    padding: 8px 10px !important;
}

#view-pos .pos-prod-name,
body.pos-kiosk-mode #view-pos .pos-prod-name {
    color: var(--text-primary) !important;
}

#view-pos .pos-prod-sku,
body.pos-kiosk-mode #view-pos .pos-prod-sku {
    color: var(--text-secondary) !important;
}

#view-pos .pos-prod-footer,
body.pos-kiosk-mode #view-pos .pos-prod-footer {
    border-top: 1px solid var(--border-subtle) !important;
    padding-top: 5px !important;
    margin-top: auto !important;
}

#view-pos .pos-prod-price,
body.pos-kiosk-mode #view-pos .pos-prod-price {
    color: var(--text-primary) !important;
    font-size: 0.98rem !important;
    font-weight: 800 !important;
}

#view-pos .pos-in-cart-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--archi-analog);
    color: var(--archi-analog-badge-text);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

#view-pos .pos-variant-inline-tag {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--archi-analog-soft);
    color: var(--archi-analog);
}

#view-pos .pos-stock-badge.in-stock {
    background: var(--bg-surface) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-subtle) !important;
}

#view-pos .pos-stock-badge.low-stock {
    background: var(--color-warning-bg) !important;
    color: var(--archi-comp) !important;
}

#view-pos .pos-stock-badge.out-stock {
    background: var(--color-danger-bg) !important;
    color: var(--archi-alert) !important;
}

/* Asegurar que en tablet/celular vista de ordenador el layout POS use flex real y nunca corte botones de cobro */
body.pos-kiosk-mode #view-pos .pos-layout-container {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: 100% !important;
}

#view-pos .pos-cart-column {
    position: relative;
    min-height: 0 !important;
    height: 100% !important;
}

#view-pos .pos-cart-card,
body.pos-kiosk-mode #view-pos .pos-cart-card {
    position: relative !important;
    top: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

#view-pos #pos-payment-drawer .pos-action-buttons,
body.pos-kiosk-mode #view-pos #pos-payment-drawer .pos-action-buttons {
    position: sticky !important;
    bottom: 0 !important;
    background: var(--bg-surface) !important;
    padding-top: 8px !important;
    padding-bottom: max(4px, env(safe-area-inset-bottom)) !important;
    z-index: 4 !important;
}

@media (hover: none) and (pointer: coarse) and (max-height: 760px) {
    body.pos-kiosk-mode,
    body.pos-kiosk-mode #app-shell,
    body.pos-kiosk-mode .main-wrapper,
    body.pos-kiosk-mode .content-area,
    body.pos-kiosk-mode #view-pos {
        height: 100dvh !important;
        max-height: 100dvh !important;
    }
}

#view-pos .pos-cart-header,
body.pos-kiosk-mode #view-pos .pos-cart-header {
    background: var(--bg-surface) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 10px 14px !important;
    height: auto !important;
    min-height: 44px !important;
}

#view-pos .pos-cart-header-icon {
    color: var(--archi-analog);
}

#view-pos .pos-cart-title {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text-primary);
}

#view-pos .pos-cart-count-pill {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--archi-analog-soft);
    padding: 2px 8px;
    border-radius: 999px;
}

#view-pos .pos-btn-clear {
    color: var(--text-secondary) !important;
}

#view-pos .pos-btn-clear:hover {
    color: var(--archi-alert) !important;
    background: var(--color-danger-bg) !important;
}

#view-pos .pos-cart-empty-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px dashed var(--border-active);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--archi-analog);
}

#view-pos .pos-cart-empty-title {
    font-weight: 700;
    font-size: 0.94rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

#view-pos .pos-cart-empty-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    max-width: 240px;
    margin: 0 auto;
    line-height: 1.45;
}

#view-pos .pos-cart-items-scroll,
body.pos-kiosk-mode #view-pos .pos-cart-items-scroll {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 10px 12px !important;
    gap: 8px !important;
    overflow-y: auto !important;
}

#view-pos .pos-cart-item-row,
body.pos-kiosk-mode #view-pos .pos-cart-item-row {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 10px !important;
    padding: 8px 10px !important;
    gap: 10px !important;
}

#view-pos .pos-cart-item-row:hover {
    background: var(--bg-card-hover) !important;
}

#view-pos .pos-cart-item-title,
body.pos-kiosk-mode #view-pos .pos-cart-item-title {
    color: var(--text-primary) !important;
}

#view-pos .pos-cart-item-info:hover .pos-cart-item-title span {
    color: var(--archi-analog) !important;
}

#view-pos .pos-cart-variant-tag {
    color: var(--archi-analog) !important;
    background: var(--archi-analog-soft) !important;
}

#view-pos .pos-step-btn,
body.pos-kiosk-mode #view-pos .pos-step-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    background: var(--bg-card-hover) !important;
    border: 1px solid var(--border-active) !important;
    color: var(--text-primary) !important;
    border-radius: 7px !important;
}

#view-pos .pos-step-btn:active,
body.pos-kiosk-mode #view-pos .pos-step-btn:active {
    background: var(--archi-analog) !important;
    border-color: var(--archi-analog) !important;
    color: var(--archi-analog-badge-text) !important;
}

#view-pos .pos-step-input,
body.pos-kiosk-mode #view-pos .pos-step-input {
    width: 34px !important;
    height: 36px !important;
    background: var(--bg-input) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
    border-radius: 6px !important;
}

#view-pos .pos-cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 4px;
}

#view-pos .pos-cart-item-subtotal,
body.pos-kiosk-mode #view-pos .pos-cart-item-subtotal {
    font-size: 0.90rem !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    min-width: 0 !important;
}

#view-pos .pos-cart-item-del,
body.pos-kiosk-mode #view-pos .pos-cart-item-del {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 2px 8px !important;
    border-radius: 5px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    background: var(--color-danger-bg) !important;
    border: 1px solid var(--color-danger-border) !important;
    color: var(--archi-alert) !important;
}

#view-pos .pos-checkout-section,
body.pos-kiosk-mode #view-pos .pos-checkout-section {
    flex-shrink: 0 !important;
    max-height: 65% !important;
    overflow-y: auto !important;
    background: var(--bg-card-dark) !important;
    border-top: 1px solid var(--border-subtle) !important;
    padding: 10px 14px max(12px, env(safe-area-inset-bottom)) !important;
}

#view-pos .pos-totals-box,
body.pos-kiosk-mode #view-pos .pos-totals-box {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    margin-bottom: 8px !important;
}

#view-pos .pos-num-mono {
    color: var(--text-primary);
}

#view-pos .pos-total-lbl,
#view-pos .pos-total-val,
#view-pos #pos-grand-total,
body.pos-kiosk-mode #view-pos #pos-grand-total {
    color: var(--text-primary) !important;
}

/* Complementario Ámbar (10%): Reservado para el CTA Principal Cobrar */
#view-pos #btn-pos-open-payment.pos-btn-cobrar-lg,
body.pos-kiosk-mode #view-pos #btn-pos-open-payment.pos-btn-cobrar-lg {
    height: 46px !important;
    background: var(--archi-comp) !important;
    color: var(--archi-comp-text) !important;
    border: none !important;
    border-radius: 9px !important;
    box-shadow: none !important;
}

#view-pos #btn-pos-open-payment.pos-btn-cobrar-lg .pos-num-mono {
    color: var(--archi-comp-text) !important;
}

#view-pos #btn-pos-open-payment.pos-btn-cobrar-lg:hover,
body.pos-kiosk-mode #view-pos #btn-pos-open-payment.pos-btn-cobrar-lg:hover {
    background: var(--archi-comp-hover) !important;
    box-shadow: none !important;
    transform: translateY(-1px) !important;
}

/* Hoja Superpuesta de Cobro */
#view-pos #pos-payment-drawer.pos-payment-drawer,
body.pos-kiosk-mode #view-pos #pos-payment-drawer.pos-payment-drawer {
    position: absolute !important;
    inset: 0 !important;
    z-index: 25 !important;
    background: var(--bg-surface) !important;
    padding: 14px !important;
    display: flex;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 10px !important;
    overflow-y: auto !important;
}

#view-pos .pos-drawer-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#view-pos .pos-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-subtle);
}

#view-pos .pos-btn-back-cart,
body.pos-kiosk-mode #view-pos .pos-btn-back-cart {
    height: 34px !important;
    padding: 0 12px !important;
    border-radius: 7px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-active) !important;
    color: var(--text-primary) !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
}

#view-pos .pos-drawer-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

#view-pos .pos-payment-tag {
    font-size: 0.72rem !important;
    color: var(--archi-analog) !important;
    background: var(--archi-analog-soft);
    border: 1px solid var(--archi-analog-border);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
}

#view-pos .pos-drawer-total-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

#view-pos .pos-meta-collapsible {
    display: flex;
    flex-direction: column;
}

#view-pos .pos-meta-toggle-pill {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

#view-pos .pos-meta-toggle-pill:hover {
    border-color: var(--archi-analog);
    color: var(--text-primary);
}

#view-pos .pos-meta-grid {
    margin-top: 8px;
    margin-bottom: 0;
}

#view-pos .pos-lbl-sm {
    color: var(--text-secondary) !important;
    margin-bottom: 4px;
}

#view-pos .pos-pay-btn,
body.pos-kiosk-mode #view-pos .pos-pay-btn {
    height: 46px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
    border-radius: 8px !important;
}

#view-pos .pos-pay-btn:hover,
body.pos-kiosk-mode #view-pos .pos-pay-btn:hover {
    background: var(--bg-card-hover) !important;
    color: var(--text-primary) !important;
}

#view-pos .pos-pay-btn.active,
body.pos-kiosk-mode #view-pos .pos-pay-btn.active {
    background: var(--archi-analog-soft) !important;
    border-color: var(--archi-analog) !important;
    color: var(--archi-analog) !important;
    font-weight: 700 !important;
}

#view-pos .pos-cash-panel,
body.pos-kiosk-mode #view-pos .pos-cash-panel {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 8px !important;
    padding: 10px !important;
    margin-bottom: 0 !important;
}

#view-pos .pos-quick-bill-btn,
body.pos-kiosk-mode #view-pos .pos-quick-bill-btn {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

#view-pos .pos-quick-bill-btn:hover,
body.pos-kiosk-mode #view-pos .pos-quick-bill-btn:hover {
    background: var(--archi-analog-soft) !important;
    border-color: var(--archi-analog) !important;
    color: var(--text-primary) !important;
}

#view-pos .pos-cash-input-box,
body.pos-kiosk-mode #view-pos .pos-cash-input-box {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-subtle) !important;
}

#view-pos .pos-cash-input-box:focus-within {
    border-color: var(--archi-analog) !important;
}

#view-pos .pos-cash-prefix {
    color: var(--archi-analog) !important;
}

#view-pos .pos-cash-field {
    color: var(--text-primary) !important;
}

#view-pos .pos-change-box,
body.pos-kiosk-mode #view-pos .pos-change-box {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-active) !important;
}

#view-pos .pos-change-box.has-debt {
    border-color: var(--color-danger-border) !important;
    background: var(--color-danger-bg) !important;
}

#view-pos .pos-change-val,
body.pos-kiosk-mode #view-pos #pos-cash-change {
    color: var(--archi-positive) !important;
}

#view-pos .pos-card-info-box {
    background: var(--archi-analog-soft) !important;
    border: 1px solid var(--archi-analog-border) !important;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 0;
}

#view-pos .pos-card-info-badge {
    color: var(--text-primary) !important;
}

#view-pos .pos-card-info-icon,
#view-pos .pos-card-info-amount {
    color: var(--text-primary) !important;
}

#view-pos #btn-pos-checkout-print.pos-btn-checkout-primary,
body.pos-kiosk-mode #view-pos #btn-pos-checkout-print.pos-btn-checkout-primary {
    height: 46px !important;
    background: var(--archi-comp) !important;
    color: var(--archi-comp-text) !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

#view-pos #btn-pos-checkout-print.pos-btn-checkout-primary:hover:not(:disabled),
body.pos-kiosk-mode #view-pos #btn-pos-checkout-print.pos-btn-checkout-primary:hover:not(:disabled) {
    background: var(--archi-comp-hover) !important;
    box-shadow: none !important;
}

#view-pos #btn-pos-checkout-only.pos-btn-checkout-secondary,
body.pos-kiosk-mode #view-pos #btn-pos-checkout-only.pos-btn-checkout-secondary {
    height: 46px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-active) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
}

#view-pos #btn-pos-checkout-only.pos-btn-checkout-secondary:hover:not(:disabled),
body.pos-kiosk-mode #view-pos #btn-pos-checkout-only.pos-btn-checkout-secondary:hover:not(:disabled) {
    background: var(--bg-card-hover) !important;
    border-color: var(--archi-analog) !important;
}

/* ==========================================================================
   TAB ONBOARDING HISTÓRICO SII & MERCADO PAGO (Layout Alineado y Ordenado)
   ========================================================================== */
.ob-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.ob-kpi-card {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 112px;
}

.ob-section-card {
    padding: 22px 24px;
    margin-bottom: 20px;
}

.ob-section-header {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.ob-section-header h2 {
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.ob-section-header p {
    font-size: 0.80rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.ob-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 16px;
    margin-bottom: 16px;
    align-items: end;
}

.ob-form-grid .form-group,
.ob-branch-grid .form-group,
.ob-mp-card .form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ob-form-grid .form-group label,
.ob-branch-grid .form-group label,
.ob-mp-card .form-group label,
.ob-import-card .form-group label {
    font-size: 0.72rem;
    line-height: 1.25;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    min-height: 18px;
}

.ob-form-grid .form-control,
.ob-branch-grid .form-control,
.ob-import-card .form-control,
.ob-mp-card .form-control {
    height: 42px;
    min-height: 42px;
    font-size: 0.86rem;
}

.ob-branch-panel {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
}

.ob-branch-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 16px;
    align-items: end;
}

.ob-import-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.ob-import-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-inline-size: 0;
}

.ob-import-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ob-import-card h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.ob-import-card-desc {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

.ob-import-card-footer {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ob-automation-wide-card {
    margin-top: 16px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.ob-automation-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-inline-size: 0;
}

.ob-automation-col--divider {
    border-left: 1px dashed var(--border-color);
    padding-left: 20px;
}

/* Panel Revisión Carpeta Tributaria SII & Cuadratura */
.ob-review-panel {
    display: none;
    margin-top: 18px;
    padding: 18px;
    border-radius: 12px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-color);
    gap: 14px;
}

.ob-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.ob-review-title {
    margin: 0 0 4px 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ob-review-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.ob-review-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.ob-review-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 10px;
    margin: 14px 0 12px 0;
}

.ob-review-kpi-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-inline-size: 0;
}

.ob-review-kpi-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.ob-review-kpi-val {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ob-review-kpi-sub {
    font-size: 0.71rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.ob-review-alerts {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--archi-positive);
    margin-bottom: 14px;
    font-size: 0.77rem;
}

.ob-review-alerts--warn {
    border-left-color: var(--archi-gold);
}

.ob-review-alerts--danger {
    border-left-color: var(--tesla-red);
}

.ob-review-config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.ob-review-fieldset {
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.015);
    margin: 0;
    min-inline-size: 0;
}

.ob-review-fieldset legend {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0 6px;
    letter-spacing: 0.02em;
}

.ob-choice-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.78rem;
}

.ob-choice-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ob-choice-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ob-choice-row:has(> input:checked) {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-active);
}

.ob-review-table-wrap {
    max-block-size: 310px;
    overflow: auto;
    scrollbar-gutter: stable;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
}

.ob-f22-strip {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 0.76rem;
    color: var(--text-secondary);
}

.ob-file-input {
    width: 100%;
    height: auto !important;
    min-height: 42px !important;
    padding: 6px 8px !important;
    font-size: 0.78rem !important;
    color: var(--text-secondary) !important;
    background: var(--bg-input) !important;
    border: 1px dashed var(--border-active) !important;
    border-radius: 8px !important;
    cursor: pointer;
}

.ob-file-input::file-selector-button {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-active);
    border-radius: 6px;
    padding: 5px 10px;
    margin-right: 10px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.ob-file-input::file-selector-button:hover {
    border-color: var(--archi-gold);
    color: var(--archi-gold);
}

.ob-mp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.ob-mp-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.ob-tg-report-panel {
    margin-top: 16px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-active);
    border-radius: 10px;
    padding: 16px;
    display: none;
    flex-direction: column;
    gap: 12px;
}

.ob-tg-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ob-tg-kpi-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ob-tg-kpi-label {
    font-size: 0.70rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.ob-tg-kpi-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}

.ob-tg-kpi-sub {
    font-size: 0.73rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.ob-tg-report-preview {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.80rem;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 1180px) {
    .ob-kpi-grid,
    .ob-form-grid,
    .ob-branch-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ob-import-grid,
    .ob-automation-wide-card,
    .ob-review-config-grid,
    .ob-mp-grid,
    .ob-tg-kpi-grid {
        grid-template-columns: 1fr;
    }
    .ob-automation-col--divider {
        border-left: none;
        border-top: 1px dashed var(--border-color);
        padding-left: 0;
        padding-top: 16px;
    }
}

@media (max-width: 640px) {
    .ob-kpi-grid,
    .ob-form-grid,
    .ob-branch-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   INVENTARIO: FILTROS, CARGA RÁPIDA Y VENCIMIENTO DE ALIMENTOS
   ========================================================================== */
.inv-toolbar-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.inv-toolbar-row .ds-filter-control {
    height: 38px;
    min-height: 38px;
    font-size: 0.82rem;
}

.inv-margin-quickbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
}

.inv-margin-quick-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.inv-margin-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.inv-margin-chip {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-active);
    background: var(--bg-card);
    color: var(--archi-gold);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.inv-margin-chip:hover,
.inv-margin-chip.active {
    border-color: var(--archi-gold);
    background: var(--color-warning-bg);
}

.inv-margin-custom {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.inv-margin-custom .form-control {
    width: 64px;
    min-height: 28px;
    height: 28px;
    padding: 2px 6px;
    font-size: 0.76rem;
    text-align: center;
}

.inv-food-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.inv-food-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.inv-food-title {
    font-weight: 600;
    font-size: 0.90rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inv-food-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.inv-food-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    align-items: end;
}

.inv-food-grid .form-group {
    margin-bottom: 0;
}

.inv-food-grid .form-control {
    height: 42px;
    min-height: 42px;
}

.badge-food {
    background: rgba(48, 209, 88, 0.14);
    color: #30d158;
    border: 1px solid rgba(48, 209, 88, 0.35);
}

.badge-expiring {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.40);
}

.badge-expired {
    background: rgba(244, 63, 94, 0.16);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.45);
}

@media (max-width: 640px) {
    .inv-food-grid {
        grid-template-columns: 1fr;
    }
}

.pos-terminal-blocked-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 12px 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(244, 63, 94, 0.14);
    border: 1px solid rgba(244, 63, 94, 0.45);
    color: var(--text-primary);
}

.pos-terminal-blocked-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pos-terminal-blocked-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(244, 63, 94, 0.22);
    color: #fb7185;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.pos-terminal-blocked-title {
    display: block;
    font-size: 0.84rem;
    color: #fda4af;
}

.pos-terminal-blocked-text {
    font-size: 0.78rem;
    color: var(--text-primary);
}

.pos-terminal-blocked-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.archi-offline-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    white-space: nowrap;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.archi-offline-pill:hover {
    opacity: 0.92;
}

.archi-offline-pill.state-offline {
    border-color: rgba(244, 63, 94, 0.45);
    background: rgba(244, 63, 94, 0.14);
    color: #fda4af;
}

.archi-offline-pill.state-syncing {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc;
}

.archi-offline-pill.state-pending {
    border-color: rgba(48, 209, 88, 0.45);
    background: rgba(48, 209, 88, 0.14);
    color: #6ee7b7;
}

.archi-offline-pill.state-warning {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.20);
    color: #fcd34d;
}

/* Panel Configuración: Plan Comercial, Sucursales y Cajas POS */
.cfg-plan-selector-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(260px, 1.4fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 14px;
    padding: 16px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
}

.cfg-plan-quota-box {
    min-height: 40px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.80rem;
    color: var(--text-secondary);
}

.cfg-quota-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.cfg-quota-pill strong {
    color: var(--archi-analog);
    font-family: monospace;
    font-weight: 700;
}

.cfg-license-box {
    margin-bottom: 18px;
    padding: 14px 16px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
}

.cfg-license-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cfg-topology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.cfg-topology-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cfg-topology-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cfg-topology-form-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cfg-topology-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.cfg-topology-item,
.cfg-terminal-card {
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
}

.cfg-topology-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.cfg-terminal-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cfg-terminal-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cfg-topology-item-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.cfg-topology-item-actions,
.cfg-terminal-badges,
.cfg-terminal-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.cfg-terminal-actions {
    justify-content: flex-end;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.cfg-branch-chip {
    font-size: 0.71rem;
    font-weight: 600;
    color: var(--archi-analog);
    background: var(--archi-analog-soft);
    padding: 1px 7px;
    border-radius: 999px;
}

.cfg-topology-code {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: monospace;
}

.cfg-row-btn {
    padding: 3px 9px !important;
    font-size: 0.72rem !important;
    line-height: 1.2 !important;
}

.cfg-row-btn-info {
    color: #38bdf8 !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
}

.cfg-row-btn-warn {
    color: var(--archi-gold) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
}

.cfg-row-btn-danger {
    color: var(--tesla-red) !important;
    border-color: rgba(244, 63, 94, 0.35) !important;
}

@media (max-width: 900px) {
    .cfg-plan-selector-row {
        grid-template-columns: 1fr;
    }
    .cfg-license-input-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Accesibilidad Switch, Focus Visible y Acordeón Manual Mercado Pago */
input[type="checkbox"][switch] {
    accent-color: var(--archi-gold, #e5a93c);
    margin: 0;
    cursor: pointer;
}

input[type="checkbox"][switch]:focus-visible {
    outline: 3px solid var(--archi-gold, #e5a93c);
    outline-offset: 3px;
}

.mp-docs-accordion details {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}

.mp-docs-accordion details > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.mp-docs-accordion details > summary::before {
    content: "▸";
    display: inline-block;
    transition: transform 0.2s ease;
    color: var(--archi-gold);
}

.mp-docs-accordion details[open] > summary::before {
    transform: rotate(90deg);
}

.mp-docs-accordion .mp-manual-body {
    padding: 0 14px 12px 14px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    border-top: 1px dashed var(--border-subtle);
}

.badge-danger {
    background: rgba(244, 63, 94, 0.16);
    color: #fda4af;
    border: 1px solid rgba(244, 63, 94, 0.35);
}
