/* ==========================================
   MUCCA SAAS - ESTILOS PRINCIPALES
   ========================================== */

/* Variables del Sistema de Diseño */
:root {
    /* Colores */
    --bg-main: #0a0c10;
    --bg-card: #121620;
    --bg-input: #191f2d;
    --border-color: #242d3f;
    
    --primary: hsl(355, 82%, 50%); /* Carmesí Premium */
    --primary-hover: hsl(355, 90%, 58%);
    --primary-glow: rgba(214, 40, 40, 0.25);
    
    --success: hsl(142, 70%, 42%); /* Verde Ganancia */
    --success-hover: hsl(142, 78%, 50%);
    
    --warning: hsl(38, 92%, 50%); /* Naranja Alerta */
    --info: hsl(200, 80%, 55%); /* Azul Info */
    --gold: #dfb233; /* Oro Fidelización / Premium */
    
    --text-main: #f8fafc;
    --text-muted: #8e9db2;
    --text-dark: #0f172a;
    
    /* Tipografías */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Bordes y Sombras */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-main: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 15px var(--primary-glow);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reseteo General */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    height: 100vh;
}

/* Contenedor Principal (Layout de Rejilla con Sidebar) */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
    width: 100vw;
}

/* ==========================================
   SIDEBAR (Navegación Izquierda)
   ========================================== */
.sidebar {
    background-color: #080a0e;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    font-size: 2.2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.brand-text h1 span {
    color: var(--primary);
}

.brand-text small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.sidebar-nav {
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    position: relative;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
    color: var(--text-main);
    background-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.pro-tag {
    position: absolute;
    right: 12px;
    background-color: var(--gold);
    color: var(--bg-main);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.nav-item.active .pro-tag {
    background-color: var(--text-main);
    color: var(--primary);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.25);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}

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

.user-info strong {
    font-size: 0.85rem;
}

.user-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================
   ÁREA DE CONTENIDO PRINCIPAL Y HEADER SAAS
   ========================================== */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.main-header {
    background-color: rgba(18, 22, 32, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    gap: 16px;
}

.header-title h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* SaaS Selectors */
.saas-selectors-wrapper {
    display: flex;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.selector-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.selector-box label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
}

.selector-box select {
    padding: 6px 10px;
    font-size: 0.8rem;
    background-color: var(--bg-main);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: auto;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-indicator {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    display: inline-block;
}

.dot.pulse {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.6s infinite;
}

.date-badge {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Animación de Pulso */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Cuerpo de Contenido */
.content-body {
    flex-grow: 1;
    padding: 24px;
    overflow-y: auto;
    background-color: var(--bg-main);
    position: relative;
}

/* Pestañas (Tab Panels) */
.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
    position: relative;
    min-height: 100%;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   ESTILOS DE COMPONENTES REUTILIZABLES
   ========================================== */

/* Tarjetas (Panels) */
.panel-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-main);
}

.panel-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.panel-header-action h3 {
    margin-bottom: 0;
}

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

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
}

.input-icon-wrapper input {
    padding-left: 40px;
    font-size: 1.1rem;
}

.radio-group {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.radio-group label {
    font-size: 0.85rem;
    text-transform: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-group label {
    font-size: 0.85rem;
    text-transform: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-primary {
    background-color: var(--primary);
    color: var(--text-main);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-glow);
}

.btn-success {
    background-color: var(--success);
    color: var(--text-main);
}

.btn-success:hover {
    background-color: var(--success-hover);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

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

.btn-outline-danger:hover {
    background-color: var(--primary);
    color: var(--text-main);
}

.btn-outline-info {
    background-color: transparent;
    border: 1px solid var(--info);
    color: var(--info);
}

.btn-outline-info:hover {
    background-color: var(--info);
    color: var(--text-main);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center; }
.text-gold { color: var(--gold) !important; }
.py-4 { padding-top: 24px; padding-bottom: 24px; }
.mb-4 { margin-bottom: 24px; }

/* Tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

td {
    font-size: 0.85rem;
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================
   ESTILOS DE BLOQUEO SAAS (LOCKED CAPABILITIES)
   ========================================== */
.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(8px);
    z-index: 50;
    display: none; /* Controlado por JS */
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.lock-overlay.active {
    display: flex;
}

.lock-card {
    background-color: var(--bg-card);
    border: 1px solid var(--gold);
    box-shadow: 0 15px 35px rgba(223, 178, 51, 0.15);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    width: 480px;
    max-width: 90%;
}

.lock-icon {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 8px rgba(223, 178, 51, 0.3));
}

.lock-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.lock-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================
   DISEÑO DEL MÓDULO 1: DASHBOARD
   ========================================== */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-main);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-icon.sales { background-color: rgba(16, 185, 129, 0.12); color: var(--success); }
.stat-icon.margin { background-color: rgba(59, 130, 246, 0.12); color: var(--info); }
.stat-icon.inventory { background-color: rgba(214, 40, 40, 0.12); color: var(--primary); }
.stat-icon.crm { background-color: rgba(223, 178, 51, 0.12); color: var(--gold); }

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-data span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 500;
}

.stat-data h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 4px 0;
}

.stat-data small {
    font-size: 0.75rem;
}

.grid-dashboard-panels {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.chart-panel {
    display: flex;
    flex-direction: column;
    min-height: 350px;
}

.bar-chart-container {
    flex-grow: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding-top: 24px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    min-height: 250px;
}

.chart-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    height: 100%;
    justify-content: flex-end;
    gap: 8px;
}

.chart-bar-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

.chart-bar {
    width: 100%;
    background: linear-gradient(to top, var(--primary), var(--primary-hover));
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    min-height: 10px;
    transition: height 0.8s ease-out;
    box-shadow: 0 0 10px rgba(214, 40, 40, 0.2);
}

.chart-bar-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 80px;
}

.notification-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-list li {
    padding: 12px;
    background-color: var(--bg-input);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-list li i {
    font-size: 1rem;
}

/* ==========================================
   DISEÑO DEL MÓDULO 2: PUNTO DE VENTA (POS)
   ========================================== */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    height: calc(100vh - 120px);
}

.pos-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    overflow: hidden;
}

.pos-scanner-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pos-quick-add {
    display: grid;
    grid-template-columns: 1fr 120px 120px;
    gap: 12px;
}

.pos-cart-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    flex-grow: 1;
    overflow-y: auto;
}

.pos-table th {
    position: sticky;
    top: 0;
    background-color: var(--bg-card);
    z-index: 1;
    border-bottom: 2px solid var(--border-color);
}

.pos-checkout-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    overflow-y: auto;
}

.checkout-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.checkout-client-selection {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.client-points-preview {
    margin-top: 8px;
    padding: 6px 12px;
    background-color: rgba(223, 178, 51, 0.12);
    color: var(--gold);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    border: 1px solid rgba(223, 178, 51, 0.2);
}

.checkout-totals {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.total-row.grand-total {
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
    margin-top: 4px;
    font-size: 1.6rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-main);
}

.payment-methods h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.payment-btn {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    padding: 10px 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.payment-btn i {
    font-size: 1.1rem;
}

.payment-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
}

.payment-btn.active {
    background-color: rgba(214, 40, 40, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.barcode-helper h4 {
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.sim-barcode-list {
    list-style: none;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-sim-code {
    width: 100%;
    text-align: left;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 8px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: monospace;
    transition: var(--transition);
}

.btn-sim-code:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ==========================================
   DISEÑO DEL MÓDULO 3: DESPOSTE
   ========================================== */
.desposte-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

.cost-summary-box {
    margin-top: 16px;
    padding: 16px;
    background-color: rgba(214, 40, 40, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cost-summary-box span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cost-summary-box strong {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary);
}

.yield-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
}

.yield-metric {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
}

.yield-metric span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.yield-metric strong {
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.desposte-cuts-input {
    width: 80px;
    padding: 6px 8px;
    text-align: right;
}

/* ==========================================
   DISEÑO DEL MÓDULO 4: BALANZAS KRETZ WIFI
   ========================================== */
.balanzas-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}

.console-panel {
    background-color: #040609 !important;
}

.console-output {
    background-color: #020305;
    border: 1px solid #141923;
    border-radius: var(--radius-sm);
    height: 200px;
    padding: 12px;
    font-family: monospace;
    font-size: 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.console-line {
    color: #10b981;
}

.console-line.error { color: #ef4444; }
.console-line.info { color: #3b82f6; }
.console-line.warn { color: #f59e0b; }

/* ==========================================
   DISEÑO DEL MÓDULO 5: CRM & FIDELIZACIÓN
   ========================================== */
.crm-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

.campaign-preview-box {
    margin-top: 12px;
    border: 1px solid #075e54;
    background-color: #05070a;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.campaign-preview-header {
    background-color: #075e54;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.campaign-preview-body {
    padding: 14px;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #e2e8f0;
    white-space: pre-wrap;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 400px;
    max-width: 90%;
    box-shadow: var(--shadow-main);
    overflow: hidden;
    animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.close-modal {
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 20px;
}

/* ==========================================
   DISEÑO DEL MÓDULO 6: CONTABILIDAD
   ========================================== */
.accounting-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.acc-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.acc-card span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 500;
}

.acc-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 4px;
}

.acc-card.balance {
    background-color: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.acc-card.balance h3 {
    color: var(--success);
}

.accounting-tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.table-scroll {
    overflow-x: auto;
    max-height: 350px;
}

/* ==========================================
   DISEÑO DEL MÓDULO 7: SAAS BILLING
   ========================================== */
.billing-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.plan-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-main);
    transition: var(--transition);
}

.plan-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-glow);
}

.plan-card.active {
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(223, 178, 51, 0.12);
}

.plan-tag {
    position: absolute;
    top: 16px;
    right: 20px;
    background-color: var(--gold);
    color: var(--bg-main);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.plan-header h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.plan-price {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin: 16px 0;
    color: var(--text-main);
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    flex-grow: 1;
}

.plan-features li {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================
   TOAST (Notificaciones rápidas)
   ========================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--bg-card);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    padding: 12px 24px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-main);
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 999;
}

.toast i {
    color: var(--success);
    font-size: 1.1rem;
}

.toast.active {
    transform: translateY(0);
}

/* ==========================================
   DISEÑO MULTI-SUCURSAL Y GESTIÓN DE EQUIPO
   ========================================== */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.branch-card {
    background: rgba(30, 20, 20, 0.45);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.branch-card:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    box-shadow: 0 10px 25px rgba(223, 178, 51, 0.12);
}

.branch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.branch-card-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.status-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.status-active {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-gold {
    background: rgba(223, 178, 51, 0.15);
    color: var(--gold);
    border: 1px solid rgba(223, 178, 51, 0.3);
}

.badge-info {
    background: rgba(52, 152, 219, 0.15);
    color: var(--info);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-primary {
    background: rgba(46, 204, 113, 0.15);
    color: var(--success);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.badge-warning {
    background: rgba(230, 126, 34, 0.15);
    color: #e67e22;
    border: 1px solid rgba(230, 126, 34, 0.3);
}


.team-table th, .team-table td {
    vertical-align: middle;
}

.btn-gold {
    background: var(--gold);
    color: var(--bg-main);
    font-weight: 600;
    border: 1px solid var(--gold);
    transition: var(--transition);
}

.btn-gold:hover {
    background: transparent;
    color: var(--gold);
    box-shadow: 0 0 15px rgba(223, 178, 51, 0.3);
}

.lock-card p {
    color: var(--text-muted);
    margin-top: 10px;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================================
   MÓDULO ADICIONAL: CAJA DIARIA Y CUENTA CORRIENTE (PREMIUM)
   ========================================================== */

/* Modificaciones de Rejilla de Pago para 4 Columnas */
.payment-grid {
    grid-template-columns: repeat(4, 1fr) !important;
}

.payment-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    background-color: rgba(0, 0, 0, 0.2) !important;
}

.payment-btn:disabled:hover {
    color: var(--text-muted) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow: none !important;
}

/* Caja Control Bar & Indicators */
.pos-caja-control-bar {
    animation: fadeInDown 0.3s ease;
}

.status-indicator.status-open {
    color: var(--success) !important;
}
.status-indicator.status-open i {
    animation: pulse-green 2s infinite;
}

.status-indicator.status-closed {
    color: var(--gold) !important;
}
.status-indicator.status-closed i {
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-green {
    0% { opacity: 0.4; }
    50% { opacity: 1; text-shadow: 0 0 8px rgba(16, 185, 129, 0.8); }
    100% { opacity: 0.4; }
}

@keyframes pulse-gold {
    0% { opacity: 0.4; }
    50% { opacity: 1; text-shadow: 0 0 8px rgba(223, 178, 51, 0.8); }
    100% { opacity: 0.4; }
}

/* Gold Outline Button */
.btn-outline-gold {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    transition: var(--transition);
}
.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--bg-main);
    box-shadow: 0 0 12px rgba(223, 178, 51, 0.3);
}

/* CRM and Ledger styles */
.client-balance-due {
    color: var(--primary) !important;
    font-weight: 700;
}
.client-balance-ok {
    color: var(--success) !important;
    font-weight: 700;
}

/* Modales y inputs de arqueo */
.discrepancy-sobrante {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid var(--success) !important;
    color: var(--success) !important;
}

.discrepancy-faltante {
    background-color: rgba(214, 40, 40, 0.15) !important;
    border: 1px solid var(--primary) !important;
    color: var(--primary) !important;
}

.discrepancy-ok {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-main) !important;
}

.btn-xs {
    padding: 3px 6px;
    font-size: 0.7rem;
    border-radius: 3px;
}

/* Sub-tabs styles for Accounting */
.sub-tab-btn {
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}
.sub-tab-btn.active {
    background-color: var(--gold) !important;
    color: var(--bg-main) !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 10px rgba(223, 178, 51, 0.4);
}

/* AFIP Ticket Simulator Styles */
.afip-ticket-container {
    background-color: #fff !important;
    color: #000 !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    padding: 15px !important;
    border: 1px dashed #000 !important;
    border-radius: 4px;
}
.afip-header-title {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
    border-bottom: 2px dashed #000;
    padding-bottom: 10px;
    color: #000 !important;
}
.afip-logo-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #005c8a !important;
    color: #005c8a !important;
    padding: 5px 10px;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-radius: 4px;
    background: #fff;
}
.afip-ticket-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.8rem;
}
.afip-ticket-table th {
    border-bottom: 1px dashed #000 !important;
    text-align: left;
    padding: 5px 0;
    color: #000 !important;
    font-weight: bold;
}
.afip-ticket-table td {
    padding: 5px 0;
    color: #000 !important;
    border: none !important;
}
.afip-totals-box {
    border-top: 1px dashed #000;
    padding-top: 10px;
    margin-top: 10px;
}
.afip-total-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #000 !important;
}
.afip-total-line.grand-total {
    font-weight: bold;
    font-size: 1.1rem;
    border-top: 2px dashed #000;
    padding-top: 5px;
    margin-top: 5px;
}
.afip-cae-box {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 2px dashed #000;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #000 !important;
}
.afip-cae-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}
.afip-qr-code-img {
    width: 90px;
    height: 90px;
    border: 1px solid #ccc;
    background-color: #fff;
}

/* CRM Client Re-engagement Alerts */
.crm-alert-card {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}
.crm-alert-card:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}
.crm-alert-card.warning-alert {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.crm-alert-card.warning-alert:hover {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
}
.crm-alert-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.crm-alert-name {
    font-weight: 600;
    color: var(--text-main);
}
.crm-alert-days {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================
   PANTALLA DE LOGIN PREMIUM DE MUCCA (GLASSMORPHIC)
   ========================================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(30, 20, 20, 0.96) 0%, rgba(10, 11, 14, 0.99) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.login-overlay.login-overlay-active {
    display: flex;
}

.login-card {
    background: rgba(30, 32, 38, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(214, 40, 40, 0.08);
    width: 440px;
    max-width: 90%;
    padding: 40px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo i {
    font-size: 3.5rem;
    color: var(--primary);
    filter: drop-shadow(0 0 15px rgba(214, 40, 40, 0.4));
    margin-bottom: 12px;
}

.login-logo h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    background: linear-gradient(to right, #ffffff, #dfb233);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.login-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.login-tab-btn:hover {
    color: var(--text-main);
}

.login-tab-btn.active {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(214, 40, 40, 0.3);
}

.login-error-msg {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-error-msg.hidden {
    display: none;
}

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

/* ==========================================
   ESTILOS DE INICIO & NOVEDADES
   ========================================== */
.inicio-novedad-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: var(--transition);
    cursor: pointer;
}

.inicio-novedad-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--gold);
    box-shadow: 0 5px 15px rgba(223, 178, 51, 0.05);
}

.inicio-novedad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.inicio-novedad-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.inicio-novedad-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.inicio-novedad-summary {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.inicio-recent-clockin-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.inicio-recent-clockin-item .time-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
}

.inicio-recent-clockin-item.out .time-badge {
    background: rgba(214, 40, 40, 0.15);
    color: var(--primary);
}

/* Modales glassmorphism overlay */
#modal-inicio-novedad {
    background-color: rgba(10, 12, 16, 0.8);
    backdrop-filter: blur(8px);
}

/* Cuenta Corriente Tabs */
.modal-tab-btn {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.modal-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-main) !important;
}

/* Impresión de ticket térmico */
#modal-receipt-print {
    background-color: rgba(10, 12, 16, 0.8);
    backdrop-filter: blur(8px);
}

@media print {
    /* Ocultar toda la app */
    body * {
        visibility: hidden !important;
    }
    /* Mostrar solo el modal de ticket y sus hijos */
    #modal-receipt-print,
    #modal-receipt-print * {
        visibility: visible !important;
    }
    #modal-receipt-print {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        background: #fff !important;
        color: #000 !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    #modal-receipt-print .modal-content {
        border: none !important;
        box-shadow: none !important;
        background: #fff !important;
        color: #000 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .no-print {
        display: none !important;
    }
}

/* ==========================================================
   MÓDULO DE MOVIMIENTOS DIARIOS Y ANALÍTICAS SVG
   ========================================================== */
.stats-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.stats-chart-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stats-chart-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.svg-pie-chart {
    transform: rotate(-90deg);
    border-radius: 50%;
}

.svg-pie-segment {
    fill: none;
    stroke-width: 32;
    transition: stroke-dashoffset 0.4s ease-in-out;
}

.chart-legend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    transition: background 0.15s ease;
}

.chart-legend-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.chart-legend-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.movimientos-main-grid {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.acc-table tr.active-row {
    background: rgba(212, 175, 55, 0.08) !important;
    border-left: 2px solid var(--gold);
}

/* Estilo para los botones de acción del listado de ventas */
.btn-action-view {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 3px 6px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 0.75rem;
    margin-right: 4px;
    transition: all 0.15s ease;
}

.btn-action-view:hover {
    background: var(--gold);
    color: #000;
}

.btn-action-void {
    color: #ff4b4b;
    background: rgba(255, 75, 75, 0.1);
    border: 1px solid rgba(255, 75, 75, 0.2);
    padding: 3px 6px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.btn-action-void:hover {
    background: #ff4b4b;
    color: var(--text-main);
}

/* ==========================================
   ESTILOS DE CONFIGURACIÓN GENERAL
   ========================================== */
.configuracion-container {
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
}

.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Simulation Drawer and Header Status Badges */
#simulation-dropdown {
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-main), 0 0 25px rgba(223, 178, 51, 0.15) !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   ESTILOS DE GESTIÓN MULTIBANCO
   ========================================== */
.bank-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.bank-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.bank-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--border-color);
    transition: background-color 0.2s;
}

.bank-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.bank-card.active {
    background: rgba(212, 175, 55, 0.06);
    border-color: var(--gold);
    box-shadow: 0 4px 15px rgba(223, 178, 51, 0.1);
}

.bank-card.active::before {
    background: var(--gold);
}

.bank-card.active h4 {
    color: var(--gold);
}

.bank-card h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.bank-card .bank-alias {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    display: block;
    margin-bottom: 8px;
}

.bank-card .bank-balance {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-main);
}

.bank-card-add {
    border: 1px dashed rgba(255, 255, 255, 0.15);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: var(--text-muted);
}

.bank-card-add:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 175, 55, 0.02);
}

.reconciled-badge {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: var(--success) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.pending-badge {
    background-color: rgba(230, 126, 34, 0.15) !important;
    color: #e67e22 !important;
    border: 1px solid rgba(230, 126, 34, 0.3) !important;
}

/* ==========================================================
   CALENDARIO DE VENCIMIENTOS
   ========================================================== */
.calendar-grid-container {
    margin-top: 15px;
    width: 100%;
}

.calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    width: 100%;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    color: var(--gold);
    padding: 8px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.calendar-day-cell {
    min-height: 110px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.calendar-day-cell:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--gold);
}

.calendar-day-cell.empty {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.calendar-day-cell.today {
    background: rgba(212, 175, 55, 0.08);
    border: 2px solid var(--gold);
}

.day-number {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-main);
    align-self: flex-start;
}

.day-events-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
    overflow-y: auto;
    max-height: 75px;
}

.calendar-event-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 3px;
}

.calendar-event-badge:hover {
    filter: brightness(1.2);
}

/* Week View */
.calendar-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-week-cell {
    min-height: 280px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.calendar-week-cell:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--gold);
}

.calendar-week-cell.today {
    background: rgba(212, 175, 55, 0.08);
    border: 2px solid var(--gold);
}

.week-day-title {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 6px;
}

.week-events-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
}

.calendar-week-event-card {
    padding: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-week-event-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}

/* Border left utilities for Day view list */
.border-left-primary {
    border-left: 4px solid var(--primary) !important;
}
.border-left-danger {
    border-left: 4px solid #ff4b4b !important;
}
.border-left-success {
    border-left: 4px solid #2ecc71 !important;
}
.border-left-warning {
    border-left: 4px solid #f39c12 !important;
}
.border-left-info {
    border-left: 4px solid #3498db !important;
}

/* ==========================================================
   TEMA CLARO (LIGHT THEME)
   ========================================================== */
:root.light-theme {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;
    --border-color: #cbd5e1;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --shadow-main: 0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
}

/* Ajustes específicos para Tema Claro */
:root.light-theme .sidebar {
    background-color: #080a0e; /* Mantenemos la barra lateral oscura para mayor elegancia y contraste tipo Shopify */
}

:root.light-theme .main-header {
    background-color: rgba(248, 250, 252, 0.9);
    border-bottom: 1px solid #cbd5e1;
}

:root.light-theme .header-title h2 {
    color: #0f172a;
}

:root.light-theme .header-title p {
    color: #64748b;
}

:root.light-theme .content-body {
    background-color: #f8fafc;
}

:root.light-theme .card {
    background-color: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

:root.light-theme .panel-card {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

:root.light-theme .pos-caja-control-bar {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

:root.light-theme .pos-caja-control-bar span {
    color: #0f172a !important;
}

:root.light-theme .acc-table th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

:root.light-theme .acc-table td {
    color: #334155 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

:root.light-theme .acc-table tr:hover {
    background-color: #f8fafc !important;
}

:root.light-theme .crm-table th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

:root.light-theme .crm-table td {
    color: #334155 !important;
}

:root.light-theme .pos-cart-container {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
}

:root.light-theme .checkout-panel {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
}

:root.light-theme .checkout-panel strong,
:root.light-theme .checkout-panel span {
    color: #0f172a !important;
}

:root.light-theme .modal-content {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

:root.light-theme .modal-content h3 {
    color: #0f172a !important;
}

:root.light-theme .modal-content label {
    color: #64748b !important;
}

:root.light-theme .modal-content input,
:root.light-theme .modal-content select {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

:root.light-theme #mucca-ai-panel {
    background: rgba(255, 255, 255, 0.98) !important;
    border-left: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

:root.light-theme #mucca-ai-panel h3 {
    color: var(--primary) !important;
}

:root.light-theme #ai-chat-log div {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

:root.light-theme #ai-chat-log strong {
    color: #0f172a !important;
}

:root.light-theme #ai-command-input {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

/* ==========================================================
   MOBILE RESPONSIVENESS (PANTALLAS CHICAS)
   ========================================================== */
@media (max-width: 768px) {
    .app-container {
        display: flex;
        flex-direction: column-reverse;
        height: 100vh;
        width: 100vw;
        overflow: hidden;
    }
    
    .sidebar {
        width: 100%;
        height: 65px;
        flex-direction: row;
        border-right: none;
        border-top: 1px solid var(--border-color);
        background-color: #080a0e;
        padding: 0;
        flex-shrink: 0;
        z-index: 1000;
    }
    
    .sidebar-brand,
    .sidebar-footer {
        display: none !important;
    }
    
    .sidebar-nav {
        flex-direction: row !important;
        padding: 4px 6px !important;
        gap: 4px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        width: 100% !important;
        justify-content: flex-start !important;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Hide scrollbar for sidebar nav in mobile */
    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }
    .sidebar-nav {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .nav-item {
        flex-direction: column !important;
        gap: 2px !important;
        padding: 6px 10px !important;
        font-size: 0.65rem !important;
        text-align: center;
        justify-content: center;
        min-width: 75px !important;
        flex-shrink: 0 !important;
        border-radius: var(--radius-sm) !important;
    }
    
    .nav-item i {
        font-size: 1.2rem !important;
        margin: 0 !important;
        width: auto !important;
    }
    
    .pro-tag {
        display: none !important;
    }
    
    .main-content {
        flex: 1;
        height: calc(100vh - 65px);
        overflow: hidden;
        width: 100vw;
    }
    
    .main-header {
        padding: 10px 15px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    
    .header-title {
        text-align: center;
    }
    
    .header-title h2 {
        font-size: 1.25rem !important;
    }
    
    .header-title p {
        font-size: 0.75rem !important;
        display: none;
    }
    
    .content-body {
        padding: 12px !important;
    }
    
    /* POS Mobile Adjustments */
    .pos-layout {
        grid-template-columns: 1fr !important;
        height: auto !important;
        gap: 16px !important;
        overflow-y: auto;
    }
    
    .pos-main {
        height: auto !important;
        overflow: visible !important;
    }
    
    .pos-quick-add {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    
    .pos-quick-add button {
        width: 100% !important;
    }
    
    .pos-checkout-sidebar {
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Config Mobile */
    .config-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Movimientos Mobile */
    .movimientos-filters {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    
    .movimientos-main-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Desposte Mobile */
    .desposte-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================
   LANDING PAGE PARA SISTEMAMUCCA.COM
   ========================================== */
#landing-page {
    background: radial-gradient(circle at center, #1a0f0f 0%, #07080a 100%);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    display: block;
}

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(7, 8, 10, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-logo i {
    font-size: 2.2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(214, 40, 40, 0.4));
}

.landing-logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
    letter-spacing: 0.5px;
}

.landing-logo h1 span {
    color: var(--gold);
}

.landing-nav-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.landing-nav-btn:hover {
    background: var(--gold);
    color: var(--bg-main);
    box-shadow: 0 0 15px rgba(223, 178, 51, 0.3);
}

.landing-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 8% 80px 8%;
    position: relative;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(circle, rgba(214, 40, 40, 0.08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.landing-hero h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    max-width: 900px;
    margin: 0 0 20px 0;
    line-height: 1.15;
    background: linear-gradient(135deg, #ffffff 30%, #dfb233 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 1;
}

.landing-hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 0 35px 0;
    line-height: 1.6;
    z-index: 1;
}

.landing-hero-btn {
    background: var(--gold);
    color: var(--bg-main);
    border: 1px solid var(--gold);
    padding: 14px 35px;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(223, 178, 51, 0.15);
}

.landing-hero-btn:hover {
    background: transparent;
    color: var(--gold);
    box-shadow: 0 8px 30px rgba(223, 178, 51, 0.3);
    transform: translateY(-2px);
}

.landing-features-section {
    padding: 60px 8%;
    background: rgba(255, 255, 255, 0.01);
}

.landing-features-title {
    text-align: center;
    margin-bottom: 50px;
}

.landing-features-title h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #fff;
}

.landing-features-title p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.landing-feature-card {
    background: rgba(30, 32, 38, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 30px;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.landing-feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(223, 178, 51, 0.08);
}

.landing-feature-icon {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 20px;
    background: rgba(223, 178, 51, 0.08);
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(223, 178, 51, 0.2);
}

.landing-feature-card h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #fff;
}

.landing-feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.landing-footer {
    text-align: center;
    padding: 40px 8%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Landing Page Scroll Fix & Mobile Responsiveness */
body.landing-active {
    overflow: auto !important;
    height: auto !important;
}

@media (max-width: 768px) {
    .landing-hero h2 {
        font-size: 2rem !important;
    }
    .landing-hero p {
        font-size: 1rem !important;
    }
    .landing-hero {
        padding: 60px 6% 40px 6% !important;
    }
    .landing-features-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .landing-header {
        padding: 15px 5% !important;
    }
    .landing-logo h1 {
        font-size: 1.3rem !important;
    }
    
    /* Avoid iOS auto-zoom on form elements */
    .modal-content input, 
    .modal-content select, 
    #login-username, 
    #login-password, 
    #login-branch, 
    .pos-caja-control-bar input,
    .pos-caja-control-bar select,
    .pos-main input,
    .pos-main select {
        font-size: 16px !important;
    }
    
    /* Table responsiveness */
    .crm-table-container, 
    .accounting-table-container, 
    .table-responsive,
    .table-scroll {
        width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* Branch selector button styles */
.branch-selector-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.branch-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 6px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.branch-btn i {
    font-size: 1.15rem;
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.branch-btn span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.branch-btn:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.branch-btn:hover i {
    color: var(--primary);
}

.branch-btn.active {
    color: #dfb233;
    border-color: #dfb233;
    background: rgba(223, 178, 51, 0.12);
    box-shadow: 0 0 15px rgba(223, 178, 51, 0.25);
    font-weight: 600;
}

.branch-btn.active i {
    color: #dfb233;
}




