/* ==========================================================================
   1. ESTILOS BASE Y GENERALES
   ========================================================================== */
@import url('app.css');
html, body {
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f1f5f9;
}

.fw-bold {
    font-weight: 800 !important;
}

.text-primary {
    color: #1A73E8 !important;
}

.bg-light {
    background-color: #f1f5f9 !important;
}

/* ==========================================================================
   2. NAVEGACIÓN (MAIN LAYOUT)
   ========================================================================== */
.sidebar-negra {
    background-color: #000000 !important;
    border-right: 1px solid #333;
}

.custom-nav-menu .mud-nav-link {
    text-decoration: none !important;
    color: rgba(255,255,255,0.85) !important;
}

    .custom-nav-menu .mud-nav-link:hover {
        background-color: rgba(255,255,255,0.1) !important;
    }

.custom-nav-menu .mud-nav-group,
.custom-nav-menu .mud-expand-icon,
.text-white {
    color: #ffffff !important;
}

/* ==========================================================================
   3. MENÚS: TARJETAS RECTANGULARES (título + descripción, color del módulo)
   ========================================================================== */
.tarjeta-menu {
    --color-tarjeta: #1b5e20;
    width: 100%;
    min-height: 96px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: none;
    border-radius: 12px;
    background-color: var(--color-tarjeta);
    color: #ffffff;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

    .tarjeta-menu:hover {
        transform: translateY(-3px);
        filter: brightness(1.08);
        box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
    }

    .tarjeta-menu:focus-visible {
        outline: 3px solid #1e293b;
        outline-offset: 2px;
    }

.tarjeta-menu-icono {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .tarjeta-menu-icono .mud-icon-root {
        font-size: 2rem;
        color: #ffffff;
    }

.tarjeta-menu-texto {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tarjeta-menu-titulo {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.tarjeta-menu-descripcion {
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.3;
    opacity: 0.92;
}

.tarjeta-menu-grande {
    min-height: 132px;
    padding: 20px 22px;
}

    .tarjeta-menu-grande .tarjeta-menu-icono {
        width: 68px;
        height: 68px;
    }

        .tarjeta-menu-grande .tarjeta-menu-icono .mud-icon-root {
            font-size: 2.6rem;
        }

    .tarjeta-menu-grande .tarjeta-menu-titulo {
        font-size: 1.3rem;
    }

    .tarjeta-menu-grande .tarjeta-menu-descripcion {
        font-size: 0.88rem;
    }

/* Rejilla de tarjetas: se acomoda sola según el ancho de la pantalla */
.seccion-menu {
    margin-bottom: 28px;
}

.seccion-menu-titulo {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding-bottom: 6px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.seccion-menu-rejilla, .panel-menu-rejilla {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.panel-menu-rejilla {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.menu-modulo-barra {
    width: 8px;
    height: 44px;
    border-radius: 4px;
}

/* ==========================================================================
   4. COMPONENTES MUDBLAZOR (TABS, SELECTS, TABLES)
   ========================================================================== */
.custom-tabs-white .mud-tab {
    color: #ffffff !important;
    font-weight: 500;
    opacity: 0.8;
}

.custom-tabs-white .mud-tab-active {
    color: #ffffff !important;
    font-weight: 800;
    opacity: 1;
}

.custom-tabs-white .mud-tab-icon {
    color: #ffffff !important;
}

.custom-tabs-white .mud-tabs-slider {
    background-color: #ffffff !important;
    height: 4px;
}

.compact-select.mud-input-control {
    margin-bottom: 0px !important;
}

.compact-select .mud-input-control-helper-container {
    display: none !important;
    height: 0px !important;
}

/* ==========================================================================
   5. PÁGINAS ESPECÍFICAS (LOGIN Y TICKETS)
   ========================================================================== */
/* Login */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #F8F9FA;
    background-image: radial-gradient(circle at 2px 2px, #e2e8f0 1px, transparent 0);
    background-size: 40px 40px;
}

.login-card {
    transition: all 0.3s ease;
    border: 1px solid #E0E0E0;
}

.logo-box {
    background: #F1F3F4;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 28%;
    margin: 0 auto;
}

/* Ticket View/Print */
.preview-container {
    background-color: #525659;
    min-height: 100vh;
    padding: 40px 0;
}

.paper-ticket {
    width: 350px;
    background: white;
    padding: 25px;
    margin: 40px auto;
    font-family: 'Courier New', monospace;
    color: black;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.ticket-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.grand-total {
    font-weight: bold;
    font-size: 18px;
    margin-top: 15px;
    border-top: 1px solid black;
    padding-top: 10px;
}

/* Contenedor principal del POS para forzar simetría vertical */
.pos-grid-container {
    height: calc(100vh - 180px); /* Ajusta según el alto de tu topbar */
}

/* La tabla debe ocupar todo el espacio del MudPaper que la contiene */
.flex-grow-1 .mud-table-container {
    height: 100% !important;
}

/* Botones del sub-diálogo táctil */
.rounded-lg {
    border-radius: 12px !important;
}

@media print {
    .no-print {
        display: none !important;
    }

    .preview-container {
        background: white;
        padding: 0;
    }

    .paper-ticket {
        box-shadow: none;
        margin: 0;
        width: 100%;
    }
}
