/* ==========================================================================
   LUCCIA POS 1.0 - Enterprise Administrative Suite (Visual.NET & Sky Blue Silver)
   Sistema Dual de Temas: Tema Oscuro & Tema Claro con Botones Azul Cielo Plata
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   VARIABLES Y TOKENS - TEMA OSCURO (Por Defecto)
   ========================================================================== */
:root,
[data-theme="dark"],
body.theme-dark {
    /* Paleta de Superficies Oscuras (Deep Slate) */
    --bg-color: #080d1a;
    --bg-secondary: #0d1527;
    --card-bg: rgba(15, 23, 42, 0.9);
    --card-header-bg: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --surface-color: #0f172a;
    --surface-hover: rgba(56, 189, 248, 0.08);
    --surface-active: rgba(14, 165, 233, 0.16);

    /* Bordes Metálicos & Titanio */
    --border-color: rgba(148, 163, 184, 0.2);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-silver: rgba(203, 213, 225, 0.32);
    --border-sky: rgba(56, 189, 248, 0.45);
    --border-emerald: rgba(52, 211, 153, 0.4);

    /* Tipografía y Contrastes de Alta Legibilidad */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    --text-heading: #f1f5f9;

    /* Entradas & Tablas */
    --input-bg: #090e1a;
    --input-border: var(--border-silver);
    --input-text: #ffffff;
    --table-header-bg: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --table-header-text: #f1f5f9;
    --table-even-bg: rgba(255, 255, 255, 0.015);
    --table-hover-bg: rgba(14, 165, 233, 0.1);
    --modal-card-bg: #0f172a;

    /* Acentos Principales: Azul Cielo Plata */
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-200: #bae6fd;
    --sky-300: #7dd3fc;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    
    --accent-blue: #0ea5e9;
    --accent-blue-rgb: 14, 165, 233;
    --accent-green: #10b981;
    --accent-green-rgb: 16, 185, 129;
    --accent-orange: #f59e0b;
    --accent-orange-rgb: 245, 158, 11;
    --accent-red: #ef4444;
    --accent-red-rgb: 239, 68, 68;
    --accent-purple: #8b5cf6;
    --accent-purple-rgb: 139, 92, 246;

    /* Gradientes Satinados Ejecutivos */
    --grad-primary: linear-gradient(135deg, #0284c7 0%, #0ea5e9 45%, #38bdf8 100%);
    --grad-primary-hover: linear-gradient(135deg, #0369a1 0%, #0284c7 40%, #0ea5e9 100%);
    --grad-success: linear-gradient(135deg, #047857 0%, #059669 45%, #10b981 100%);
    --grad-success-hover: linear-gradient(135deg, #065f46 0%, #047857 45%, #059669 100%);
    --grad-danger: linear-gradient(135deg, #be123c 0%, #e11d48 50%, #f43f5e 100%);
    --grad-danger-hover: linear-gradient(135deg, #9f1239 0%, #be123c 50%, #e11d48 100%);
    --grad-warning: linear-gradient(135deg, #b45309 0%, #d97706 50%, #f59e0b 100%);
    --grad-purple: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 50%, #a78bfa 100%);
    --grad-silver-chrome: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    --grad-header: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);

    /* Familias Tipográficas */
    --font-heading: 'Plus Jakarta Sans', 'Segoe UI', 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', 'Cascadia Code', monospace;

    /* Sombras & Elevaciones */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow-sky: 0 0 20px rgba(14, 165, 233, 0.28);
    --shadow-glow-emerald: 0 0 20px rgba(16, 185, 129, 0.25);
    --shadow-silver: 0 0 15px rgba(224, 242, 254, 0.2);
}

/* ==========================================================================
   VARIABLES Y TOKENS - TEMA CLARO (Visual.NET Enterprise Light)
   ========================================================================== */
[data-theme="light"],
body.theme-light {
    /* Paleta de Superficies Claras (Platinum & Crisp White) */
    --bg-color: #f1f5f9;
    --bg-secondary: #e2e8f0;
    --card-bg: #ffffff;
    --card-header-bg: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
    --surface-color: #ffffff;
    --surface-hover: rgba(14, 165, 233, 0.08);
    --surface-active: rgba(14, 165, 233, 0.15);

    /* Bordes Metálicos & Titanio Claro */
    --border-color: rgba(100, 116, 139, 0.22);
    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-silver: #cbd5e1;
    --border-sky: rgba(2, 132, 199, 0.45);
    --border-emerald: rgba(5, 150, 105, 0.45);

    /* Tipografía de Máximo Contraste (Deep Slate Black) */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-white: #ffffff;
    --text-heading: #020617;

    /* Entradas & Tablas Claras */
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --input-text: #0f172a;
    --table-header-bg: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    --table-header-text: #0f172a;
    --table-even-bg: #f8fafc;
    --table-hover-bg: rgba(14, 165, 233, 0.09);
    --modal-card-bg: #ffffff;

    /* Gradientes en Modo Claro */
    --grad-primary: linear-gradient(135deg, #0284c7 0%, #0ea5e9 45%, #38bdf8 100%);
    --grad-primary-hover: linear-gradient(135deg, #0369a1 0%, #0284c7 40%, #0ea5e9 100%);
    --grad-success: linear-gradient(135deg, #047857 0%, #059669 45%, #10b981 100%);
    --grad-danger: linear-gradient(135deg, #be123c 0%, #e11d48 50%, #f43f5e 100%);
    --grad-header: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

    /* Sombras Suaves */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.12);
    --shadow-glow-sky: 0 0 16px rgba(14, 165, 233, 0.22);
    --shadow-glow-emerald: 0 0 16px rgba(16, 185, 129, 0.2);
}

/* Reset Global & Estructura Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Fondo Tecnológico Administrativo */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 15% 15%, rgba(14, 165, 233, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.05) 0%, transparent 45%),
        linear-gradient(180deg, rgba(8, 13, 26, 0.98) 0%, rgba(13, 21, 39, 1) 100%);
    z-index: -1;
    pointer-events: none;
    transition: background 0.3s ease;
}

[data-theme="light"] .glass-bg,
body.theme-light .glass-bg {
    background: 
        radial-gradient(circle at 15% 15%, rgba(14, 165, 233, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.04) 0%, transparent 45%),
        linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
}

/* Contenedor Principal */
.app-container {
    width: 100%;
    max-width: 98%;
    margin: 0 auto;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ==========================================================================
   Cabecera Principal (Visual.NET Ribbon Header)
   ========================================================================== */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.6rem;
    background: var(--grad-header);
    border: 1px solid var(--border-silver);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    z-index: 100;
    transition: all 0.25s ease;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--grad-primary);
    border: 1px solid rgba(224, 242, 254, 0.6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-heading);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.15;
    color: var(--text-heading);
}

.logo-text h1 span {
    color: #38bdf8;
    background: linear-gradient(120deg, #0284c7, #38bdf8, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.logo-text p {
    font-size: 0.76rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .status-indicator,
body.theme-light .status-indicator {
    color: #047857;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 1.8s infinite;
}

.sync-time {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Widget Tasa BCV */
.bcv-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.6rem 0.35rem 0.85rem;
    border-radius: 20px;
    background: var(--surface-color);
    border: 1px solid rgba(52, 211, 153, 0.4);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    user-select: none;
    position: relative;
}

.bcv-widget:hover {
    border-color: #10b981;
    box-shadow: var(--shadow-glow-emerald);
    transform: translateY(-1px);
}

.bcv-label {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #059669;
}

[data-theme="dark"] .bcv-label {
    color: #6ee7b7;
}

.bcv-value {
    font-size: 0.92rem;
    font-weight: 800;
    color: #10b981;
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

[data-theme="light"] .bcv-value,
body.theme-light .bcv-value {
    color: #047857;
}

.bcv-timestamp {
    font-size: 0.62rem;
    color: var(--text-muted);
    line-height: 1;
}

.bcv-refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.15);
    color: #10b981;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.bcv-refresh-btn:hover {
    background: rgba(52, 211, 153, 0.3);
    color: #ffffff;
    transform: rotate(45deg);
}

/* Widget Caja Header */
.caja-turn-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--surface-color);
    border: 1px solid var(--border-silver);
    padding: 0.3rem 0.75rem;
    border-radius: 10px;
}

/* Botón Selector de Tema */
.btn-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700 !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-theme-toggle i {
    font-size: 0.9rem;
    transition: transform 0.25s ease;
}

.btn-theme-toggle:hover i {
    transform: rotate(25deg) scale(1.15);
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-left: auto;
    padding-left: 1.2rem;
    border-left: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.7rem;
    color: #0284c7;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
}

[data-theme="dark"] .user-role {
    color: #38bdf8;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--grad-danger);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* ==========================================================================
   SISTEMA INTEGRAL DE BOTONES (Azul Cielo Plata Satinado & Variantes)
   ========================================================================== */
.btn {
    border: 1px solid var(--border-color);
    outline: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.62rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    letter-spacing: 0.25px;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

/* Botón Primario: Azul Cielo Plata */
.btn-primary, 
.btn-login,
#btn-open-quick-product-modal,
.btn-save-primary,
.btn-submit-action {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 45%, #38bdf8 100%) !important;
    border: 1px solid rgba(224, 242, 254, 0.5) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(2, 38, 70, 0.85) !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

.btn-primary:hover,
.btn-login:hover,
#btn-open-quick-product-modal:hover,
.btn-save-primary:hover,
.btn-submit-action:hover {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 40%, #0ea5e9 100%) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-1.5px);
    color: #ffffff !important;
}

.btn-primary:active,
.btn-login:active,
#btn-open-quick-product-modal:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4), inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* Botón de Éxito / Cobro: Esmeralda Plata */
.btn-success,
.btn-checkout,
.btn-checkout-account,
#btn-confirm-checkout-fiscal {
    background: linear-gradient(135deg, #047857 0%, #059669 45%, #10b981 100%) !important;
    border: 1px solid rgba(167, 243, 208, 0.5) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(2, 44, 34, 0.85) !important;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

.btn-success:hover,
.btn-checkout:hover,
.btn-checkout-account:hover,
#btn-confirm-checkout-fiscal:hover {
    background: linear-gradient(135deg, #065f46 0%, #047857 45%, #059669 100%) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-1.5px);
    color: #ffffff !important;
}

/* Botón de Peligro / Eliminar / Cerrar: Carmesí Coral Plata */
.btn-danger,
.btn-delete,
.btn-cancel-action {
    background: linear-gradient(135deg, #be123c 0%, #e11d48 50%, #f43f5e 100%) !important;
    border: 1px solid rgba(254, 205, 211, 0.45) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(76, 5, 25, 0.85) !important;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.btn-danger:hover,
.btn-delete:hover {
    background: linear-gradient(135deg, #9f1239 0%, #be123c 50%, #e11d48 100%) !important;
    border-color: rgba(255, 255, 255, 0.75) !important;
    box-shadow: 0 6px 18px rgba(244, 63, 94, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
    transform: translateY(-1.5px);
    color: #ffffff !important;
}

/* Botón Secundario / Copiar / Refrescar: Titanio Plata & Sky Hover */
.btn-copy,
.btn-secondary,
.btn-table-action,
#btn-refresh-manual {
    background: var(--surface-color) !important;
    border: 1px solid var(--border-silver) !important;
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow-sm) !important;
}

.btn-copy:hover,
.btn-secondary:hover,
.btn-table-action:hover,
#btn-refresh-manual:hover {
    background: rgba(14, 165, 233, 0.12) !important;
    border-color: #38bdf8 !important;
    color: #0284c7 !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25) !important;
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-copy:hover,
[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-table-action:hover,
[data-theme="dark"] #btn-refresh-manual:hover {
    color: #ffffff !important;
}

.btn-sm {
    padding: 0.38rem 0.8rem !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
}

.btn-large {
    padding: 0.85rem 1.4rem !important;
    font-size: 0.95rem !important;
    border-radius: 10px !important;
}

.btn:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ==========================================================================
   Layout Principal (Sidebar Navigation & Content)
   ========================================================================== */
.dashboard-main {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.sidebar-nav {
    width: 255px;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* Pestañas de Navegación Lateral (Visual.NET Ribbon Tabs) */
.dashboard-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: var(--surface-color);
    border: 1px solid var(--border-silver);
    border-radius: 12px;
    padding: 0.75rem 0.6rem;
    box-shadow: var(--shadow-md);
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    outline: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.85rem 1rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    text-align: left;
    user-select: none;
}

.tab-btn i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    color: #0284c7;
    transition: transform 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] .tab-btn i {
    color: #7dd3fc;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
    border-color: var(--border-subtle);
}

.tab-btn:hover i {
    transform: scale(1.15);
    color: #0ea5e9;
}

.tab-btn.active {
    color: #0284c7 !important;
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.15) 0%, rgba(56, 189, 248, 0.08) 100%) !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    box-shadow: var(--shadow-sm) !important;
    font-weight: 800 !important;
}

[data-theme="dark"] .tab-btn.active {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.25) 0%, rgba(56, 189, 248, 0.12) 100%) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
}

.tab-btn.active::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: -3px;
    width: 5px;
    background: #0ea5e9;
    border-radius: 4px;
    box-shadow: 0 0 10px #38bdf8;
}

.tab-btn.active i {
    color: #0284c7;
}

[data-theme="dark"] .tab-btn.active i {
    color: #38bdf8;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.tab-btn .badge {
    background: var(--grad-danger);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.15rem 0.55rem;
    border-radius: 12px;
    margin-left: auto;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* Grupos Desplegables de Navegación */
.nav-dropdown-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.nav-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-dropdown-trigger:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.nav-dropdown-trigger.open {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    color: #0284c7;
}

[data-theme="dark"] .nav-dropdown-trigger.open {
    color: #38bdf8;
}

.dropdown-chevron {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
    color: var(--text-muted);
}

.nav-dropdown-trigger.open .dropdown-chevron {
    transform: rotate(180deg);
    color: #0ea5e9;
}

.nav-dropdown-content {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.3rem 0 0.3rem 0.8rem;
    margin-left: 0.5rem;
    border-left: 2px solid rgba(56, 189, 248, 0.35);
}

.nav-dropdown-content.open {
    display: flex;
}

.tab-sub-btn {
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tab-sub-btn:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
}

.tab-sub-btn.active {
    color: #0284c7 !important;
    background: rgba(14, 165, 233, 0.15) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
    font-weight: 700 !important;
}

[data-theme="dark"] .tab-sub-btn.active {
    color: #38bdf8 !important;
}

/* ==========================================================================
   Contenido de Pestañas & Paneles
   ========================================================================== */
.tab-contents {
    background: var(--card-bg);
    border: 1px solid var(--border-silver);
    border-radius: 12px;
    min-height: 520px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.tab-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.tab-pane.active {
    display: block;
    opacity: 1;
}

/* ==========================================================================
   Tarjetas Métricas Ejecutivas (.metric-card)
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.1rem;
}

.metric-card {
    background: var(--surface-color);
    border: 1px solid var(--border-silver);
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad-primary);
    opacity: 0.6;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: #38bdf8;
    box-shadow: var(--shadow-md);
}

.metric-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-icon.blue {
    background: rgba(14, 165, 233, 0.18);
    color: #0284c7;
    border-color: rgba(56, 189, 248, 0.35);
}

[data-theme="dark"] .metric-icon.blue {
    color: #38bdf8;
}

.metric-icon.orange {
    background: rgba(245, 158, 11, 0.18);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .metric-icon.orange {
    color: #fbbf24;
}

.metric-icon.red {
    background: rgba(239, 68, 68, 0.18);
    color: #e11d48;
    border-color: rgba(239, 68, 68, 0.35);
}

[data-theme="dark"] .metric-icon.red {
    color: #f87171;
}

.metric-icon.green {
    background: rgba(16, 185, 129, 0.18);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .metric-icon.green {
    color: #34d399;
}

.metric-data h3 {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.metric-data p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 0.15rem;
}

/* ==========================================================================
   Barras de Herramientas, Entradas y Filtros
   ========================================================================== */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    background: var(--surface-color);
    border: 1px solid var(--border-silver);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #0284c7;
    font-size: 0.92rem;
    pointer-events: none;
}

[data-theme="dark"] .search-box i {
    color: #7dd3fc;
}

.search-box input,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--input-text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.65rem 1rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-box input {
    width: 100%;
    padding-left: 2.7rem;
}

.search-box input:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: #0284c7 !important;
    background: var(--surface-color) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22) !important;
    color: var(--text-primary) !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.filter-group {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group select {
    cursor: pointer;
    padding-right: 2rem;
}

.filter-group select option {
    background: var(--surface-color);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* ==========================================================================
   Tablas de Datos (DataGrid Administrativo Moderno)
   ========================================================================== */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-silver);
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.data-table thead th {
    background: var(--table-header-bg);
    color: var(--table-header-text);
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 0.85rem 1.1rem;
    border-bottom: 2px solid #0284c7;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:nth-child(even) {
    background: var(--table-even-bg);
}

.data-table tbody tr:hover {
    background: var(--table-hover-bg) !important;
}

.data-table td {
    padding: 0.75rem 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
    vertical-align: middle;
}

.num-col {
    text-align: right;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.92rem;
    color: #0284c7;
}

[data-theme="dark"] .num-col {
    color: #38bdf8;
}

.loading-state, .empty-state {
    text-align: center;
    padding: 3rem 1.5rem !important;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
}

.loading-state i {
    margin-right: 0.6rem;
    color: #0ea5e9;
}

/* Miniaturas de Fotos de Productos en Tablas de Inventario */
.thumb-wrapper {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
    max-height: 44px;
    border-radius: 8px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
    vertical-align: middle;
}

.thumb-wrapper:hover {
    transform: scale(1.1);
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.table-thumb-img {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 7px;
    display: block;
}

.table-thumb-placeholder {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 7px;
    transition: color 0.15s ease, background 0.15s ease;
}

.thumb-wrapper:hover .table-thumb-placeholder {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
}

/* Modal de Vista Previa / Edición de Foto de Producto */
#product-image-preview-box {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
}

#product-image-preview-img {
    width: 140px;
    height: 140px;
    min-width: 140px;
    min-height: 140px;
    max-width: 140px;
    max-height: 140px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    border: 2px solid rgba(56, 189, 248, 0.45);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

#quick-prod-image-preview {
    width: 68px !important;
    height: 68px !important;
    min-width: 68px !important;
    min-height: 68px !important;
    max-width: 68px !important;
    max-height: 68px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 8px !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
}

/* Badges de Estado */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.badge-status.instock {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .badge-status.instock {
    color: #34d399;
}

.badge-status.lowstock {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .badge-status.lowstock {
    color: #fbbf24;
}

.badge-status.outstock {
    background: rgba(239, 68, 68, 0.15);
    color: #e11d48;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .badge-status.outstock {
    color: #f87171;
}

.badge-status.pending {
    background: rgba(14, 165, 233, 0.15);
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.4);
}

[data-theme="dark"] .badge-status.pending {
    color: #38bdf8;
}

/* ==========================================================================
   Desplegables de Sugerencias y Autocompletado
   ========================================================================== */
.client-suggestions {
    background: var(--surface-color);
    border: 1px solid var(--border-silver);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    z-index: 1500;
}

.purchase-suggestion-item {
    padding: 0.65rem 0.9rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s ease, transform 0.1s ease;
}

.purchase-suggestion-item:last-child {
    border-bottom: none;
}

.purchase-suggestion-item:hover {
    background: rgba(14, 165, 233, 0.12);
}

[data-theme="light"] .purchase-suggestion-item:hover {
    background: #e0f2fe;
}

.purchase-suggestion-item .item-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.purchase-suggestion-item .item-code {
    font-size: 0.75rem;
    color: #0284c7;
    font-family: var(--font-mono);
    font-weight: 700;
}

.purchase-suggestion-item .item-cost {
    font-size: 0.82rem;
    font-weight: 800;
    color: #059669;
}

[data-theme="dark"] .purchase-suggestion-item .item-cost {
    color: #34d399;
}

/* ==========================================================================
   Módulo de Cuentas Pendientes (Mesas M1, M2... M60+ / POS Táctil)
   ========================================================================== */
.cuentas-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

.accounts-grid-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-silver);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-md);
}

.header-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-title-row h2 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-heading);
}

/* Selector de Modo de Vista (Plano / Cuadrícula) */
.view-mode-toggle {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border-silver);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.btn-toggle-view {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.btn-toggle-view:hover {
    color: var(--text-heading);
    background: rgba(255, 255, 255, 0.06);
}

.btn-toggle-view.active {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

/* Vista Plano Interactivo del Restaurante */
.restaurant-map-view-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.restaurant-map-container {
    position: relative;
    width: 100%;
    aspect-ratio: 757 / 377;
    border-radius: 12px;
    overflow: hidden;
    background: #181c24;
    border: 1px solid var(--border-silver);
    box-shadow: var(--shadow-md);
    user-select: none;
    -webkit-user-select: none;
}

.restaurant-map-img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    pointer-events: none;
}

.restaurant-map-overlay {
    position: absolute;
    inset: 0;
    pointer-events: auto;
}

/* Botones / Mesas Interactivas sobre el Plano */
.map-table-btn {
    position: absolute;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(30, 41, 59, 0.88);
    backdrop-filter: blur(4px);
    border: 1.5px solid rgba(148, 163, 184, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    z-index: 5;
    padding: 2px 4px;
    text-align: center;
    touch-action: manipulation;
}

.map-table-btn:hover {
    transform: translate(-50%, -50%) scale(1.08);
    border-color: #38bdf8;
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.45);
    z-index: 10;
}

.map-table-btn .map-table-label {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(0.72rem, 1.4vw, 0.92rem);
    color: #f8fafc;
    line-height: 1.1;
    letter-spacing: -0.3px;
}

.map-table-btn .map-table-status {
    font-size: clamp(0.55rem, 0.95vw, 0.68rem);
    font-weight: 600;
    color: #94a3b8;
    margin-top: 1px;
    white-space: nowrap;
    line-height: 1;
}

.map-table-btn .map-table-client-tag {
    font-size: clamp(0.5rem, 0.85vw, 0.62rem);
    color: #38bdf8;
    font-weight: 700;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    margin-top: 1px;
}

/* Mesa Ocupada (Con ítems en el plano) */
.map-table-btn.has-items {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.94) 0%, rgba(16, 185, 129, 0.9) 100%);
    border: 1.5px solid #34d399;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.5);
}

.map-table-btn.has-items .map-table-label {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.map-table-btn.has-items .map-table-status {
    color: #d1fae5;
    font-weight: 700;
}

/* Mesa Seleccionada Activa en el Plano */
.map-table-btn.selected {
    border: 2px solid #38bdf8 !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.8) !important;
    transform: translate(-50%, -50%) scale(1.12);
    z-index: 12;
}

.map-table-btn.selected .map-table-label {
    color: #ffffff;
}

.map-table-btn.selected .map-table-status {
    color: #e0f2fe;
}

/* Mesa Grande VIP (M10 en el lateral izquierdo) */
.map-table-btn.table-large {
    border: 2px solid rgba(234, 179, 8, 0.7);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.97) 100%);
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.25);
}

.map-table-btn.table-large:hover {
    border-color: #facc15;
    box-shadow: 0 0 22px rgba(234, 179, 8, 0.5);
    transform: translate(-50%, -50%) scale(1.06);
}

.map-table-btn.table-large .map-table-label {
    font-size: clamp(0.9rem, 1.6vw, 1.15rem);
    font-weight: 900;
}

.map-table-vip-tag {
    font-size: clamp(0.52rem, 0.8vw, 0.65rem);
    font-weight: 800;
    color: #facc15;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Sección Inferior de Mesas Adicionales ("Mesas demás") */
.extra-accounts-section {
    background: var(--surface-color);
    border: 1px solid var(--border-silver);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-shadow: var(--shadow-sm);
}

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

.extra-accounts-header h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.extra-accounts-header h4 i {
    color: #38bdf8;
}

.badge-extra-count {
    font-size: 0.72rem;
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
}

.extra-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.65rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.extra-accounts-grid .account-card {
    min-height: 80px;
    padding: 0.65rem 0.5rem;
}

.extra-accounts-grid .account-card .card-id {
    font-size: 1.1rem;
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 0.75rem;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 0.3rem;
}

.account-card {
    background: var(--surface-color);
    border: 1px solid var(--border-silver);
    border-radius: 10px;
    padding: 0.85rem 0.65rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    box-shadow: var(--shadow-sm);
}

.account-card:hover {
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.account-card.selected {
    border: 2px solid #0284c7 !important;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.18) 0%, rgba(56, 189, 248, 0.08) 100%) !important;
    box-shadow: 0 0 16px rgba(14, 165, 233, 0.35) !important;
}

.account-card.has-items {
    border-color: rgba(16, 185, 129, 0.5);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, var(--surface-color) 100%);
}

.account-card.has-items:hover {
    border-color: #10b981;
}

.account-card.has-items.selected {
    border: 2px solid #0284c7 !important;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4) !important;
}

.account-card .card-id,
.account-card .card-account-id {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.5px;
}

.account-card .card-status {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.2rem;
    text-align: center;
}

.account-card.has-items .card-status {
    color: #047857;
    background: rgba(16, 185, 129, 0.15);
    padding: 0.15rem 0.55rem;
    border-radius: 12px;
    font-weight: 700;
}

[data-theme="dark"] .account-card.has-items .card-status {
    color: #34d399;
}

.account-card .card-client-name {
    font-size: 0.7rem;
    font-weight: 700;
    color: #0284c7;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 0.15rem 0.55rem;
    border-radius: 12px;
    margin-top: 0.35rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-theme="dark"] .account-card .card-client-name {
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.25);
}

/* Detalle de Cuenta Seleccionada */
.account-detail-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-silver);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 520px;
    box-shadow: var(--shadow-md);
}

.account-items-list {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.2rem;
}

.account-item-row {
    background: var(--surface-color);
    border: 1px solid var(--border-silver);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: background 0.15s ease;
}

.account-item-row:hover {
    background: var(--surface-hover);
}

.account-item-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: var(--surface-color);
    border: 1px solid var(--border-silver);
    border-radius: 20px;
    padding: 2px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.quantity-btn:hover {
    background: rgba(14, 165, 233, 0.2);
    color: #0284c7;
}

.quantity-val {
    font-size: 0.9rem;
    font-weight: 700;
    width: 28px;
    text-align: center;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.account-item-price {
    font-size: 0.92rem;
    font-weight: 800;
    color: #059669;
    font-family: var(--font-mono);
    min-width: 60px;
    text-align: right;
}

[data-theme="dark"] .account-item-price {
    color: #34d399;
}

.btn-delete-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-delete-item:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #e11d48;
}

.total-row .total-amount {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 800;
    color: #059669;
}

[data-theme="dark"] .total-row .total-amount {
    color: #34d399;
    text-shadow: 0 0 12px rgba(52, 211, 153, 0.3);
}

/* Selector Táctil de Productos */
.product-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 0.55rem;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.product-selector-card {
    background: var(--surface-color);
    border: 1px solid var(--border-silver);
    border-radius: 8px;
    padding: 0.65rem 0.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.35rem;
    transition: all 0.15s ease;
    user-select: none;
    box-shadow: var(--shadow-sm);
}

.product-selector-card:hover {
    border-color: #0284c7;
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.product-selector-card .prod-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.5em;
}

.product-selector-card .prod-price {
    font-size: 0.85rem;
    font-weight: 800;
    color: #059669;
    font-family: var(--font-mono);
}

[data-theme="dark"] .product-selector-card .prod-price {
    color: #34d399;
}

/* ==========================================================================
   Modales Ejecutivos (Visual.NET Window Frame)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 13, 25, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    padding: 1rem;
    overflow-y: auto;
    animation: modalFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.hidden {
    display: none !important;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-card {
    background: var(--modal-card-bg);
    border: 1px solid var(--border-silver);
    border-top: 3px solid #0284c7;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 520px;
    width: 100%;
    animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.4rem;
    background: var(--card-header-bg);
    border-bottom: 1px solid var(--border-silver);
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.2px;
}

.btn-close-modal {
    background: var(--surface-hover);
    border: 1px solid var(--border-silver);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #e11d48;
    border-color: #ef4444;
}

.modal-body {
    padding: 1.4rem;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.9rem 1.4rem;
    border-top: 1px solid var(--border-silver);
    background: var(--card-header-bg);
}

/* ==========================================================================
   CATÁLOGO TÁCTIL & MENÚ COMPLETO (Responsive Tablet & Mobile Optimized)
   ========================================================================== */
.catalog-modal-card {
    max-width: 1200px;
    width: 96%;
    max-height: 94vh;
    height: 92vh;
    display: flex;
    flex-direction: column;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 4px solid #0284c7;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border-radius: 16px;
    overflow: hidden;
}

.catalog-modal-header {
    padding: 0.9rem 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.95);
}

.catalog-modal-title-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.catalog-modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(2, 132, 199, 0.2);
    border: 1px solid rgba(2, 132, 199, 0.4);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.catalog-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
}

.catalog-modal-subtitle {
    margin: 0.15rem 0 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.catalog-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.catalog-live-summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
}

.catalog-live-summary .live-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
}

.catalog-live-summary .live-total {
    font-size: 1.05rem;
    font-weight: 900;
    color: #34d399;
    font-family: var(--font-mono, monospace);
}

/* Barra de Herramientas: Buscador y Pastillas de Categoría */
.catalog-modal-toolbar {
    padding: 0.75rem 1.25rem;
    background: rgba(15, 23, 42, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.catalog-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0 0.85rem;
    transition: all 0.2s ease;
}

.catalog-search-box:focus-within {
    border-color: #38bdf8;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.catalog-search-box i {
    color: #64748b;
    font-size: 0.95rem;
}

.catalog-search-box input {
    width: 100%;
    padding: 0.7rem 0.6rem;
    background: transparent;
    border: none;
    color: #f8fafc;
    font-size: 0.92rem;
    outline: none;
}

.catalog-search-box input::placeholder {
    color: #64748b;
}

/* Pastillas de Categorías */
.catalog-category-pills {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    padding: 0.2rem 0.1rem 0.4rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    align-items: center;
}

.catalog-category-pills::-webkit-scrollbar {
    display: none;
}

.catalog-category-pills .pill-btn {
    white-space: nowrap;
    padding: 0.55rem 1.15rem;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    min-height: 38px;
    user-select: none;
}

.catalog-category-pills .pill-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    transform: translateY(-1px);
}

.catalog-category-pills .pill-btn.active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
    transform: scale(1.02);
}

/* Cuerpo y Cuadrícula de Productos */
.catalog-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.1rem;
    background: rgba(10, 15, 29, 0.6);
}

.catalog-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.1rem;
}

/* Tarjeta de Producto en el Catálogo */
.catalog-item-card {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    min-height: 270px;
}

.catalog-item-card:hover,
.catalog-item-card:focus {
    transform: translateY(-4px);
    border-color: #38bdf8;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.35);
    background: rgba(30, 41, 59, 0.85);
}

.catalog-item-card:active,
.catalog-item-card.tap-flash {
    transform: scale(0.96);
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
}

/* Contenedor de Imagen de la Tarjeta */
.catalog-card-image-wrap {
    width: 100%;
    height: 155px;
    min-height: 155px;
    max-height: 155px;
    position: relative;
    overflow: hidden;
    background: #0b132b;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.catalog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.catalog-item-card:hover .catalog-card-img {
    transform: scale(1.06);
}

.catalog-card-fallback-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    color: #38bdf8;
    background: rgba(255, 255, 255, 0.02);
}

/* Badges en la Imagen */
.catalog-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.catalog-card-badge.stock {
    background: rgba(16, 185, 129, 0.92);
    color: #ffffff;
}

.catalog-card-badge.low-stock {
    background: rgba(245, 158, 11, 0.92);
    color: #ffffff;
}

.catalog-card-badge.out-stock {
    background: rgba(239, 68, 68, 0.92);
    color: #ffffff;
}

.catalog-card-badge.combo {
    background: rgba(168, 85, 247, 0.92);
    color: #ffffff;
}

.btn-card-edit-photo {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 3;
    transition: all 0.2s ease;
}

.btn-card-edit-photo:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
    transform: scale(1.08);
}

.menu-item-tag-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    background: rgba(251, 191, 36, 0.92);
    color: #0f172a;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Cuerpo de la Tarjeta */
.catalog-card-body {
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    gap: 0.35rem;
    background: rgba(15, 23, 42, 0.65);
}

.catalog-card-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.3em;
}

.catalog-card-prices {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: auto;
    padding-top: 0.4rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.catalog-card-price-usd {
    font-size: 1.15rem;
    font-weight: 900;
    color: #34d399;
    font-family: var(--font-mono, monospace);
}

.catalog-card-price-bs {
    font-size: 0.76rem;
    font-weight: 700;
    color: #60a5fa;
    font-family: var(--font-mono, monospace);
}

/* Pie del Modal */
.catalog-modal-footer {
    padding: 0.9rem 1.4rem;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.catalog-footer-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==========================================================================
   ADAPTACIONES RESPONSIVAS PARA TABLETS (768px - 1024px) Y MÓVILES
   ========================================================================== */
@media (max-width: 1024px) {
    .catalog-modal-card {
        width: 98vw;
        height: 96vh;
        max-height: 96vh;
        border-radius: 12px;
    }

    .catalog-modal-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 0.9rem;
    }

    .catalog-card-image-wrap {
        height: 140px;
        min-height: 140px;
        max-height: 140px;
    }
}

@media (max-width: 768px) {
    .catalog-modal-card {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .catalog-modal-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .catalog-card-image-wrap {
        height: 130px;
        min-height: 130px;
        max-height: 130px;
    }

    .catalog-category-pills .pill-btn {
        padding: 0.5rem 0.95rem;
        font-size: 0.82rem;
        min-height: 36px;
    }
}

@media (max-width: 480px) {
    .catalog-modal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        padding: 0.5rem;
    }

    .catalog-card-image-wrap {
        height: 115px;
        min-height: 115px;
        max-height: 115px;
    }

    .catalog-card-name {
        font-size: 0.85rem;
    }

    .catalog-card-price-usd {
        font-size: 1rem;
    }
}

/* ==========================================================================
   Login y Autenticación
   ========================================================================== */
.login-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(7, 13, 25, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1rem;
}

[data-theme="light"] .login-overlay,
body.theme-light .login-overlay {
    background: rgba(241, 245, 249, 0.92);
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--border-silver);
    border-top: 4px solid #0284c7;
    border-radius: 14px;
    padding: 2.2rem 2rem;
    width: 100%;
    max-width: 410px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.login-header {
    text-align: center;
}

.login-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-heading);
}

.login-header h2 span {
    color: #0284c7;
}

.login-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
}

.login-body form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    box-sizing: border-box;
}

.form-checkbox {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
}

.form-checkbox input {
    accent-color: #0284c7;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.form-checkbox label {
    margin-bottom: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.login-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #e11d48;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    text-align: center;
    font-weight: 600;
}

[data-theme="dark"] .login-error {
    color: #fca5a5;
}

.login-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    border-top: 1px solid var(--border-silver);
    padding-top: 1rem;
}

/* ==========================================================================
   OPTIMIZACIÓN RESPONSIVE TOTAL (Móviles, Tablets & Pantallas Grandes)
   ========================================================================== */

/* ── Tablets & Laptops Medianas (≤ 1024px) ── */
@media (max-width: 1024px) {
    .app-container {
        max-width: 100%;
        padding: 0.75rem 0.5rem;
    }
    
    .cuentas-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Smartphones y Tablets Pequeñas (≤ 768px) ── */
@media (max-width: 768px) {
    .btn-mobile-nav-toggle {
        display: flex !important;
    }
    
    .hide-on-mobile {
        display: none !important;
    }

    .main-header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .status-panel {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }

    /* Drawer de Navegación Lateral */
    .sidebar-nav {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 285px;
        max-width: 85vw;
        background: var(--surface-color);
        border-right: 1px solid var(--border-silver);
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.4);
        z-index: 2050;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
        padding: 1rem 1rem 2.5rem;
    }

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

    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 2040;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-backdrop.active {
        display: block;
        opacity: 1;
    }

    .btn {
        min-height: 44px;
        padding: 0.65rem 1rem;
        font-size: 0.86rem;
    }

    .tab-contents {
        padding: 1rem 0.75rem;
        min-height: auto;
    }

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

    .filter-group {
        flex-direction: column;
        width: 100%;
    }

    .filter-group select,
    .filter-group button {
        width: 100%;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }

    /* Bottom Sheet Drawer para Cuentas */
    .account-detail-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 92dvh;
        z-index: 1800;
        background: var(--card-bg);
        border-top: 2px solid #0284c7;
        border-radius: 18px 18px 0 0;
        transform: translateY(100%);
        transition: transform 0.32s cubic-bezier(0.32, 0.94, 0.6, 1);
        padding: 0 0 env(safe-area-inset-bottom, 0.5rem) 0;
        display: flex;
        flex-direction: column;
        box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.5);
        overflow: hidden;
    }

    .account-detail-panel.open {
        transform: translateY(0);
    }

    .account-detail-panel::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: rgba(148, 163, 184, 0.4);
        border-radius: 2px;
        margin: 0.6rem auto 0;
        flex-shrink: 0;
    }

    .accounts-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 0.5rem;
        max-height: 45vh;
    }

    .product-selector-grid {
        grid-template-columns: repeat(3, 1fr);
        max-height: 28vh;
        gap: 0.4rem;
    }

    .modal-card {
        width: 100%;
        max-width: 100%;
        border-radius: 14px 14px 0 0;
        margin-top: auto;
    }
}

/* ── Smartphones Muy Pequeños (≤ 430px) ── */
@media (max-width: 430px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

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

    .accounts-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    }
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   VISTA DE CUENTA AL CLIENTE (Recibo / Pre-cuenta Full-Screen Modal)
   ========================================================================== */
.btn-show-bill {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
}

.btn-show-bill:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(2, 132, 199, 0.35);
}

.bill-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 29, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1.25rem;
    overflow-y: auto;
    animation: billFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes billFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.bill-wrapper {
    background: #0f172a;
    color: #ffffff;
    max-width: 460px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 30px rgba(56, 189, 248, 0.1);
    padding: 2rem 1.8rem;
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-height: 92vh;
    overflow-y: auto;
}

[data-theme="dark"] .bill-wrapper {
    background: #0b1120;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.bill-close-btn {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.bill-close-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #f87171;
    transform: rotate(90deg);
}

.bill-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.bill-logo {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    font-weight: 900;
    margin: 0 auto 0.65rem;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.bill-brand {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.02em;
}

.bill-brand-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0.2rem 0 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.bill-divider {
    border-bottom: 2px dashed rgba(255, 255, 255, 0.15);
    margin: 1rem 0;
}

.bill-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem 0.9rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bill-meta-item {
    display: flex;
    flex-direction: column;
}

.bill-meta-label {
    font-size: 0.68rem;
    color: #38bdf8;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

.bill-meta-value {
    font-size: 0.88rem;
    color: #ffffff;
    font-weight: 800;
}

.bill-items-container {
    margin: 1.1rem 0;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.bill-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.bill-items-table thead th {
    padding: 0.55rem 0.4rem;
    color: #38bdf8;
    font-weight: 800;
    font-size: 0.74rem;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    text-align: left;
    letter-spacing: 0.03em;
}

.bill-items-table tbody td {
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    vertical-align: middle;
    color: #ffffff;
}

.bill-col-cant {
    text-align: center !important;
    width: 38px;
    font-weight: 800;
    color: #38bdf8 !important;
    font-size: 0.92rem;
}

.bill-col-desc {
    font-weight: 700;
    color: #ffffff !important;
}

.bill-col-price {
    text-align: right !important;
    width: 70px;
    color: #cbd5e1 !important;
    font-family: var(--font-mono, monospace);
    font-size: 0.85rem;
    font-weight: 700;
}

.bill-col-total {
    text-align: right !important;
    width: 80px;
    font-weight: 800;
    color: #34d399 !important;
    font-family: var(--font-mono, monospace);
    font-size: 0.92rem;
}

.bill-combo-tag {
    display: inline-block;
    font-size: 0.65rem;
    background: rgba(167, 139, 250, 0.2);
    color: #c084fc;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 0.35rem;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.bill-totals {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 0.8rem;
}

.bill-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bill-total-row.subtotal {
    font-size: 0.92rem;
    color: #cbd5e1;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.bill-total-row.subtotal span:last-child {
    color: #ffffff;
    font-weight: 800;
    font-family: var(--font-mono, monospace);
}

.bill-total-row.grand-total {
    font-size: 1.3rem;
    font-weight: 900;
    color: #34d399;
    padding-top: 0.6rem;
    border-top: 2px dashed rgba(255, 255, 255, 0.2);
}

.bill-footer {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 0.9rem;
    border-top: 1.5px dashed rgba(255, 255, 255, 0.12);
}

.bill-thank-you {
    font-size: 0.9rem;
    font-weight: 800;
    color: #f43f5e;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.bill-footer-note {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0.35rem 0 0;
    font-style: italic;
}

#btn-bill-close-footer:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #f87171 !important;
}

/* ==========================================================================
   PANEL LATERAL DE DETALLES DE PRODUCTO (Side Panel Overlay)
   ========================================================================== */
.side-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 29, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1500;
    display: flex;
    justify-content: flex-end;
    opacity: 1;
    transition: opacity 0.25s ease-in-out;
}

.side-panel-overlay.hidden {
    display: none !important;
}

.side-panel {
    width: 560px;
    max-width: 96vw;
    height: 100vh;
    background: #0f172a;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: -12px 0 35px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

.product-detail-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #38bdf8;
    font-weight: 700;
    display: block;
    margin-bottom: 0.2rem;
}

.product-detail-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.25;
}

.btn-close-side-panel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-side-panel:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #f87171;
    transform: scale(1.05);
}

.side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.detail-section {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #60a5fa;
    margin: 0 0 0.85rem 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem 1rem;
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-field.full-width {
    grid-column: span 2;
}

.detail-field label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-field span {
    font-size: 0.9rem;
    color: #f1f5f9;
    font-weight: 500;
    word-break: break-word;
}

.detail-field .highlight-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: #34d399;
}

/* Desglose Fiscal en Panel de Detalle */
.fiscal-invoice {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    margin-top: 0.6rem;
}

.fiscal-invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.fiscal-price-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #93c5fd;
}

.fiscal-aliquot-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    border: 1px solid transparent;
}

.fiscal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    padding: 0.2rem 0;
    color: #cbd5e1;
}

.fiscal-row span:first-child {
    color: #94a3b8;
}

.fiscal-row span:last-child {
    font-weight: 600;
    font-family: var(--font-mono, monospace);
}

.fiscal-row.fiscal-total {
    margin-top: 0.4rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    font-size: 0.95rem;
    font-weight: 800;
}

.fiscal-row.fiscal-total span:first-child {
    color: #38bdf8;
    font-weight: 700;
}

.fiscal-row.fiscal-total span:last-child {
    color: #34d399;
    font-size: 1.05rem;
    font-weight: 900;
}

/* Badges de Menú */
.menu-badge-active {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 6px;
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-badge-active:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: scale(1.02);
}

.menu-badge-hidden {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.35);
    border-radius: 6px;
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-badge-hidden:hover {
    background: rgba(100, 116, 139, 0.25);
    transform: scale(1.02);
}

/* ==========================================================================
   PANEL DE CUENTA ACTIVA: CABECERA Y GESTIÓN DE CLIENTES
   ========================================================================== */
.detail-header {
    padding: 0.9rem 1.1rem;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.detail-title-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.detail-title-info h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.detail-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-transfer-account {
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    color: #38bdf8 !important;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-transfer-account:hover {
    background: rgba(56, 189, 248, 0.25) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25);
    transform: translateY(-1px);
}

.btn-close-detail {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-close-detail:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
    transform: scale(1.05);
}

/* Fila de Selección y Gestión de Clientes */
.client-selection-row {
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

/* Chip del Cliente Seleccionado */
.client-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(5, 150, 105, 0.26) 100%);
    border: 1px solid rgba(16, 185, 129, 0.45);
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: fadeInSlide 0.2s ease;
}

.client-chip-info {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.client-chip-icon {
    color: #34d399;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.client-chip span {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-chip-clear {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.client-chip-clear:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    transform: scale(1.1);
}

/* Barra de Búsqueda y Botones de Clientes */
.client-search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.client-search-wrapper {
    flex: 1;
    min-width: 130px;
    position: relative;
    display: flex;
    align-items: center;
}

.client-search-icon {
    position: absolute;
    left: 10px;
    color: #64748b;
    font-size: 0.85rem;
    pointer-events: none;
}

.client-search-input {
    width: 100%;
    padding: 0.55rem 0.75rem 0.55rem 2rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: #f8fafc;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}

.client-search-input:focus {
    border-color: #38bdf8;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.client-search-input::placeholder {
    color: #64748b;
    font-size: 0.82rem;
}

/* Botones de Acción de Clientes */
.btn-client-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    border: 1px solid transparent;
}

/* Botón Lista */
.btn-client-list {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
    color: #a5b4fc !important;
}

.btn-client-list:hover {
    background: rgba(99, 102, 241, 0.3) !important;
    border-color: #818cf8 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

/* Botón + Nuevo Cliente */
.btn-client-new {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.22) 0%, rgba(2, 132, 199, 0.38) 100%) !important;
    border-color: rgba(56, 189, 248, 0.45) !important;
    color: #38bdf8 !important;
}

.btn-client-new:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
    transform: translateY(-1px);
}

/* Dropdown de Sugerencias */
.client-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    padding: 0.3rem 0;
}

.client-suggestion-item {
    padding: 0.6rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.client-suggestion-item:hover {
    background: rgba(56, 189, 248, 0.15);
}

.client-suggestion-item .sugg-name {
    font-weight: 700;
    color: #f8fafc;
    font-size: 0.85rem;
}

.client-suggestion-item .sugg-cedula {
    font-family: var(--font-mono, monospace);
    color: #38bdf8;
    font-size: 0.78rem;
    font-weight: 600;
}

.client-suggestion-empty {
    padding: 0.8rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
}

/* Botón Grande Abrir Menú y Combos */
.btn-open-menu-modal {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #4f46e5 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 0.85rem 1.1rem !important;
    font-size: 0.96rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35) !important;
    letter-spacing: 0.02em;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-open-menu-modal:hover {
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.5) !important;
    transform: translateY(-2px);
}

.btn-open-menu-modal:active {
    transform: scale(0.98);
}

/* ==========================================================================
   Estilos: Pastillas de Período y Dashboard de Reporte de Ventas
   ========================================================================== */
.sales-period-pills .pill-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 0.42rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.sales-period-pills .pill-btn:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.sales-period-pills .pill-btn.active {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

#sales-table tbody tr {
    transition: background 0.15s ease;
}

#sales-table tbody tr:hover {
    background: rgba(56, 189, 248, 0.06) !important;
}

/* ==========================================================================
   Menús Desplegables / Acordeones del Sidebar (Retenciones, Combos, Config)
   ========================================================================== */
.nav-dropdown-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0.25rem;
}

.nav-dropdown-trigger {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    cursor: pointer;
    user-select: none;
}

.nav-dropdown-trigger .trigger-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-dropdown-trigger .dropdown-chevron {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-dropdown-trigger.open .dropdown-chevron {
    transform: rotate(180deg);
    color: var(--accent-blue);
}

.nav-dropdown-content {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 0.9rem;
    margin-top: 0.25rem;
    border-left: 2px solid rgba(56, 189, 248, 0.25);
    margin-left: 0.75rem;
    animation: fadeIn 0.2s ease;
}

.nav-dropdown-content.open {
    display: flex !important;
}

.tab-btn.tab-sub-btn {
    font-size: 0.82rem;
    padding: 0.45rem 0.8rem;
    opacity: 0.92;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn.tab-sub-btn:hover {
    opacity: 1;
    background: rgba(56, 189, 248, 0.12);
    color: #ffffff;
}
