/**
 * Botalón Grill POS - Elegant Custom Style System (Dark / Western Theme)
 * Colors: Black environment, Yellow-Orange accents (#e2b148, #fdba23, #e7aa3f), Coffee fills (#211b1b, #834f31, #9e5020)
 */

/* ========================================== */
/* 1. FUENTES PERSONALIZADAS & DECLARACIONES   */
/* ========================================== */
@font-face {
    font-family: 'Country Western';
    src: url('../fonts/Country Western Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roper';
    src: url('../fonts/Roper.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Variables Globales de Diseño */
:root {
    --bg-main: #060505;
    --bg-darker: #000000;
    --fill-card: #1f1818;
    --fill-card-hover: #2a2020;
    --fill-input: #120e0e;
    
    --border-coffee: #6b4732; /* Café un poco más claro para bordes */
    --border-coffee-light: #a36541;
    --border-coffee-glowing: #d18557;
    
    --accent-gold: #fdc23a; /* Oro con más brillo y saturación */
    --accent-yellow: #ffcf56; /* Amarillo más brillante y visible en fondo negro */
    --accent-orange: #f2ae38; /* Naranja más brillante */
    --accent-danger: #ff5252; /* Rojo más encendido */
    --accent-success: #4caf50; /* Verde más brillante */
    
    --text-color: #ffffff;
    --text-dim: #f7eded; /* Mucho más claro y visible que el anterior grisáceo */
    --text-muted: #d0c2ba; /* Mucho más visible en contraste con fondo oscuro */
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-western: 'Roper', var(--font-sans);
    
    --header-height: 58px; /* Reducido de 70px para optimizar espacio vertical */
    --bottom-nav-height: 55px; /* Reducido de 65px para optimizar espacio vertical */
    --sidebar-width: 240px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reseteo y Configuraciones de Caja */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-color);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Scrollbar Personalizado */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
    background: var(--border-coffee);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* Clases de Fuentes */
.font-western {
    font-family: var(--font-western);
    letter-spacing: 1px;
}

/* Contenedor Principal de la App */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: radial-gradient(circle at 50% 20%, #2e1d15 0%, var(--bg-main) 70%);
}

/* ========================================== */
/* 2. DISEÑO Y COMPONENTES GLOBALES          */
/* ========================================== */

/* Cabecera Principal */
.app-header {
    height: var(--header-height);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(131, 79, 49, 0.3);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

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

.mini-logo {
    height: 42px;
    width: 42px;
    object-fit: contain;
    border-radius: 50%;
    border: 1px solid var(--accent-gold);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-western);
    font-size: 16px;
    color: var(--accent-gold);
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 2px;
}

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

.user-badge {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    background: rgba(131, 79, 49, 0.2);
    border: 1px solid rgba(131, 79, 49, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-logout {
    height: 36px;
    width: 36px;
    border-radius: 50%;
    background: rgba(234, 67, 53, 0.1);
    border: 1px solid rgba(234, 67, 53, 0.2);
    color: var(--accent-danger);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-logout:hover {
    background: var(--accent-danger);
    color: #fff;
    transform: scale(1.05);
}

/* Área de Contenido Principal (Compactado para Móvil) */
.app-content {
    flex: 1;
    padding: 10px 8px; /* Reducido de 20px para aprovechar al máximo las pantallas móviles */
    width: 100%;
}

.app-content.with-header {
    margin-top: calc(var(--header-height) + 4px);
    margin-bottom: calc(var(--bottom-nav-height) + 4px);
}

/* Sidebar en Escritorio */
.app-sidebar {
    display: none; /* Oculto por defecto en móvil */
}

/* Tarjeta Premium de Cristal */
.glass-card {
    background: rgba(31, 24, 24, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(131, 79, 49, 0.25);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(162, 80, 32, 0.4);
}

/* ========================================== */
/* 3. PANTALLA DE INICIAR SESIÓN (INDEX)     */
/* ========================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-image: radial-gradient(circle at center, #352118 0%, var(--bg-main) 80%);
}

.pwa-install-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(135deg, #1f1818 0%, #2b1f1f 100%);
    border: 1px solid var(--border-coffee-light);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    animation: slide-down 0.4s ease-out;
}

.pwa-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
}

.pwa-info strong {
    font-size: 13px;
    color: var(--accent-gold);
}

.pwa-info p {
    font-size: 10px;
    color: var(--text-muted);
}

.pwa-icon {
    font-size: 24px;
    color: var(--accent-yellow);
}

.btn-pwa-action {
    background-color: var(--accent-gold);
    color: #000;
    border: none;
    font-size: 11px;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-pwa-action:hover {
    background-color: var(--accent-yellow);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(31, 24, 24, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(131, 79, 49, 0.4);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    text-align: center;
}

.login-logo-area {
    margin-bottom: 25px;
}

.login-logo {
    height: 95px;
    width: 95px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.logo-title {
    color: var(--accent-gold);
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 4px;
}

.logo-subtitle {
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: 600;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 12px; /* Reducido de 20px para optimizar espacio vertical en móviles */
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700; /* Más negrita para alta visibilidad */
    color: #ffffff; /* Blanco puro para contraste perfecto sobre fondo negro */
    margin-bottom: 5px; /* Reducido de 8px */
}

.form-group label i {
    color: var(--accent-gold);
    margin-right: 6px;
}

.input-premium {
    width: 100%;
    background-color: var(--fill-input);
    border: 1px solid var(--border-coffee);
    color: var(--text-color);
    padding: 10px 12px; /* Reducido de 12px 14px */
    border-radius: 8px; /* Reducido de 10px */
    font-size: 15px; /* Aumentado de 14px para facilitar lectura táctil */
    font-family: var(--font-sans);
    transition: var(--transition-fast);
}

.input-premium:focus {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 10px rgba(253, 186, 35, 0.15);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    background-color: var(--fill-input);
    border: 1px solid var(--border-coffee);
    color: var(--text-color);
    padding: 12px 14px;
    padding-right: 45px;
    border-radius: 10px;
    font-size: 14px;
    transition: var(--transition-fast);
}

.password-wrapper input:focus {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 10px rgba(253, 186, 35, 0.15);
}

.btn-toggle-pwd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    width: 30px;
}

.btn-toggle-pwd:hover {
    color: var(--accent-gold);
}

.btn-login-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
    border: none;
    color: #000000;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(226, 177, 72, 0.3);
    letter-spacing: 0.5px;
}

.btn-login-submit:hover {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-gold) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(226, 177, 72, 0.4);
}

.btn-login-submit:active {
    transform: translateY(1px);
}

.login-footer {
    margin-top: 25px;
    border-top: 1px solid rgba(131, 79, 49, 0.2);
    padding-top: 15px;
    font-size: 11px;
    color: var(--text-muted);
}

.dev-by {
    margin-top: 4px;
    color: var(--accent-gold);
}

/* Alertas */
.alert {
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.alert-error {
    background: rgba(234, 67, 53, 0.15);
    border: 1px solid var(--accent-danger);
    color: #ff9d9d;
}

.alert-success {
    background: rgba(52, 168, 83, 0.15);
    border: 1px solid var(--accent-success);
    color: #b3ffc7;
}

/* ========================================== */
/* 4. PANEL DE CONTROL (DASHBOARD)            */
/* ========================================== */
.welcome-banner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(135deg, #2b1d16 0%, #17110f 100%);
    border: 1px solid var(--border-coffee);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
}

.welcome-text h2 {
    color: var(--accent-gold);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 26px; /* Aumentado de 22px */
}

.welcome-text p {
    color: #ffffff; /* Blanco puro para máxima visibilidad */
    font-size: 15px; /* Aumentado de 13px */
    margin-top: 4px;
}

.welcome-date {
    align-self: flex-start;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px; /* Aumentado de 12px */
    color: var(--accent-yellow);
    border: 1px solid rgba(131, 79, 49, 0.3);
    font-weight: 700; /* Más negrita */
}

/* Grid de Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--fill-card);
    border: 1px solid rgba(131, 79, 49, 0.2);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    height: 48px;
    width: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-details h3 {
    font-size: 26px; /* Aumentado de 22px */
    font-weight: 800; /* Extra bold */
    line-height: 1.1;
    color: #ffffff;
}

.stat-details p {
    font-size: 13px; /* Aumentado de 11px */
    color: var(--text-muted);
    font-weight: 600;
}

/* Sucursales */
.branches-section {
    margin-bottom: 30px;
}

.section-title {
    color: var(--accent-gold);
    font-size: 16px;
    margin-bottom: 15px;
    border-left: 3px solid var(--accent-yellow);
    padding-left: 10px;
}

.branches-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.branch-card {
    background: var(--fill-card);
    border: 1px solid var(--border-coffee);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.branch-card-header h4 {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 19px; /* Aumentado de 16px */
    color: var(--accent-gold); /* Color oro brillante */
}

.badge-active {
    background: rgba(52, 168, 83, 0.15);
    border: 1px solid var(--accent-success);
    color: var(--accent-success);
    font-size: 9px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.branch-address {
    font-size: 14px; /* Aumentado de 12px */
    color: #ffffff; /* Blanco puro para alta visibilidad */
}

.branch-address i {
    color: var(--accent-yellow);
    margin-right: 4px;
}

.btn-branch-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px; /* Aumentado de 12px */
    font-weight: 800; /* Ultra negrita */
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-branch-action.primary {
    background: var(--accent-gold);
    color: #000;
    border: none;
}

.btn-branch-action.primary:hover {
    background: var(--accent-yellow);
    transform: translateY(-1px);
}

/* Grilla dividida del Dashboard */
.dashboard-split-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.split-card {
    background: rgba(31, 24, 24, 0.4);
    border: 1px solid rgba(131, 79, 49, 0.2);
    border-radius: 16px;
    padding: 18px;
}

.card-title {
    font-size: 17px; /* Aumentado de 14px */
    color: var(--accent-gold);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(131, 79, 49, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.recent-info strong {
    font-size: 15px; /* Aumentado de 13px */
    color: #ffffff;
}

.recent-meta {
    font-size: 12px; /* Aumentado de 10px */
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-view-audit {
    background: rgba(226, 177, 72, 0.15);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 13px; /* Aumentado de 11px */
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.empty-state {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

.empty-state i {
    font-size: 24px;
    margin-bottom: 8px;
    color: rgba(131, 79, 49, 0.4);
}

/* Menú Rápido */
.quick-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-menu-item {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(131, 79, 49, 0.1);
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    position: relative;
}

.quick-menu-item:hover:not(.disabled) {
    border-color: var(--accent-gold);
    background: rgba(131, 79, 49, 0.15);
    transform: translateY(-2px);
}

.quick-menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.q-icon {
    font-size: 24px;
}

.quick-menu-item span {
    font-size: 14px; /* Aumentado de 11px */
    font-weight: 700; /* Aumentado a Bold */
}

.badge-mini {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--border-coffee);
    color: var(--text-dim);
    font-size: 8px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 3px;
}

/* ========================================== */
/* 5. NAVEGACIONES (MENÚ LATERAL E INFERIOR)  */
/* ========================================== */

/* Bottom Nav (Móviles) */
.bottom-nav {
    height: var(--bottom-nav-height);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(131, 79, 49, 0.3);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px; /* Aumentado de 10px para gran legibilidad */
    font-weight: 700; /* Extra bold */
    transition: var(--transition-fast);
    flex: 1;
    padding: 4px;
}

.bottom-nav-item i {
    font-size: 21px; /* Aumentado de 18px */
}
}

.bottom-nav-item.active {
    color: var(--accent-gold);
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(226, 177, 72, 0.3);
}

.bottom-nav-item.disabled {
    opacity: 0.4;
}

/* ========================================== */
/* 6. LINE CHECK / INTERFAZ DE AUDITORÍA    */
/* ========================================== */

/* Panel de Filtros */
.filter-panel {
    background: rgba(31, 24, 24, 0.7);
    border: 1px solid rgba(131, 79, 49, 0.3);
}

.filter-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.filter-group label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-gold);
    font-weight: 600;
}

.select-premium {
    width: 100%;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-coffee);
    color: var(--text-color);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 15px; /* Aumentado de 13px para máxima legibilidad táctil */
    outline: none;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: var(--transition-fast);
}

.select-premium:focus {
    border-color: var(--accent-yellow);
}

.input-premium {
    width: 100%;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-coffee);
    color: var(--text-color);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 15px; /* Aumentado de 13px para máxima legibilidad táctil */
    outline: none;
    font-family: var(--font-sans);
    transition: var(--transition-fast);
}

.input-premium:focus {
    border-color: var(--accent-yellow);
}

.audit-status-bar {
    margin-top: 15px;
    border-top: 1px solid rgba(131, 79, 49, 0.15);
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.badge-status-neutral {
    background: rgba(226, 177, 72, 0.1);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.badge-status-saved {
    background: rgba(52, 168, 83, 0.15);
    border: 1px solid var(--accent-success);
    color: var(--accent-success);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Buscador */
.search-bar-container {
    position: relative;
    margin-bottom: 15px;
}

.search-bar-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-premium {
    width: 100%;
    background: rgba(18, 14, 14, 0.9);
    border: 1px solid var(--border-coffee);
    border-radius: 10px;
    color: var(--text-color);
    padding: 12px 14px;
    padding-left: 40px;
    font-size: 13px;
    outline: none;
    font-family: var(--font-sans);
    transition: var(--transition-fast);
}

.search-input-premium:focus {
    border-color: var(--accent-yellow);
}

/* Pestañas de Categorías horizontales */
.category-tabs-container {
    margin-bottom: 20px;
    overflow-x: auto;
    width: 100%;
    margin-left: -20px;
    margin-right: -20px;
    padding: 0 20px;
    /* ocultar scrollbars */
    scrollbar-width: none; /* Firefox */
}

.category-tabs-container::-webkit-scrollbar {
    display: none; /* Safari / Chrome */
}

.category-tabs {
    display: flex;
    gap: 8px;
    white-space: nowrap;
    padding-bottom: 4px;
}

.tab-btn {
    background: rgba(31, 24, 24, 0.6);
    border: 1px solid var(--border-coffee);
    color: var(--text-dim);
    padding: 6px 14px; /* Más compacto verticalmente */
    border-radius: 20px;
    font-size: 14px; /* Aumentado de 12px para visibilidad */
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    border-color: var(--accent-gold);
}

.tab-btn.active {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
}

/* Contenedor de Inventario */
.inventory-wrapper {
    padding-bottom: 110px; /* Espacio para que la barra flotante no tape los últimos elementos en PC */
}

@media (max-width: 991px) {
    .inventory-wrapper {
        padding-bottom: 160px; /* Espacio para móvil (barra flotante + bottom nav) */
    }
}

/* Listado de Productos de Auditoría */
.audit-products-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px; /* Reducido ya que usamos padding-bottom en el wrapper */
}

.audit-row-item {
    background: var(--fill-card);
    border: 1px solid rgba(163, 101, 65, 0.35); /* Bordes más visibles */
    border-radius: 12px;
    padding: 8px 12px; /* Más compacto para ahorrar espacio vertical en móviles */
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-fast);
}

.audit-row-item:hover {
    border-color: rgba(162, 80, 32, 0.4);
}

.audit-prod-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-right: 15px;
}

.audit-prod-name {
    font-size: 16px; /* Aumentado de 14px para gran visibilidad */
    font-weight: 700;
    color: var(--text-color);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.audit-prod-meta {
    font-size: 12px; /* Aumentado de 11px */
    color: var(--text-muted);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audit-prod-meta .cat-badge {
    background: rgba(163, 101, 65, 0.2);
    border: 1px solid var(--border-coffee);
    color: #ffffff; /* Texto blanco para máxima legibilidad */
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 10px; /* Aumentado de 9px */
    font-weight: 600;
}

.audit-prod-meta .cost-badge {
    color: var(--accent-orange);
}

.audit-conteo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.conteo-par-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 12px; /* Aumentado de 11px */
    color: var(--text-muted);
    font-weight: 500;
}

.conteo-par-info strong {
    font-size: 16px; /* Aumentado de 14px */
    color: var(--accent-gold);
    text-shadow: 0 0 5px rgba(253, 194, 58, 0.2);
}

/* Caja de entrada interactiva */
.conteo-input-wrapper {
    position: relative;
    width: 90px;
}

.input-conteo {
    width: 100%;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-coffee-light);
    color: var(--accent-yellow); /* Color amarillo brillante para el conteo tipeado */
    text-align: center;
    padding: 6px 4px; /* Más compacto verticalmente */
    border-radius: 8px;
    font-size: 18px; /* Aumentado de 16px para mejor lectura */
    font-weight: 800;
    outline: none;
    font-family: var(--font-sans);
    transition: var(--transition-fast);
}

/* Indicador dinámico de estado en los renglones */
.audit-row-item.counted {
    border-left: 4px solid var(--accent-success);
}

.audit-row-item.counted-insufficient {
    border-left: 4px solid var(--accent-danger);
    background: rgba(234, 67, 53, 0.03);
}

/* Badge de Orden de Compra */
.order-qty-indicator {
    background: rgba(234, 67, 53, 0.15);
    border: 1px solid var(--accent-danger);
    color: #ff9d9d;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
    display: inline-block;
}

.order-qty-indicator.ok {
    background: rgba(52, 168, 83, 0.15);
    border: 1px solid var(--accent-success);
    color: #b3ffc7;
}

/* Barra inferior de guardar */
.inventory-save-bar {
    position: fixed;
    bottom: var(--bottom-nav-height);
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-coffee);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 90;
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.5);
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.save-bar-info {
    display: flex;
    flex-direction: column;
}

.save-bar-total {
    font-size: 13px;
    font-weight: 500;
}

.save-bar-total strong {
    color: var(--accent-gold);
}

.save-bar-alert {
    font-size: 10px;
    color: var(--text-muted);
}

.save-bar-alert strong {
    color: var(--accent-danger);
}

.btn-save-premium {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
    color: #000;
    border: none;
    font-weight: bold;
    font-size: 13px;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(226, 177, 72, 0.3);
    transition: var(--transition-fast);
}

.btn-save-premium:hover {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-gold) 100%);
    transform: scale(1.02);
}

.btn-clear-premium {
    background: rgba(255, 82, 82, 0.15);
    border: 1px solid var(--accent-danger);
    color: #ff9999;
    font-weight: bold;
    font-size: 13px;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.15);
    transition: var(--transition-fast);
}

.btn-clear-premium:hover {
    background: rgba(255, 82, 82, 0.3);
    transform: scale(1.02);
}


/* Spinner */
.loading-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.spinner-accent {
    color: var(--accent-gold);
    margin-bottom: 12px;
}

/* ========================================== */
/* 7. TECLADO NUMÉRICO MODAL (MÓVIL)         */
/* ========================================== */
.modal-numpad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: flex-end; /* sale de abajo en móviles */
    justify-content: center;
}

.modal-numpad-card {
    background: #1c1414;
    border-top: 1px solid var(--border-coffee);
    width: 100%;
    max-width: 460px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    animation: slide-up-modal 0.25s ease-out;
}

.numpad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#numpad-prod-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-gold);
}

.btn-close-numpad {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.numpad-display-row {
    background: var(--bg-darker);
    border: 1px solid rgba(131, 79, 49, 0.4);
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.numpad-meta-info {
    display: flex;
    flex-direction: column;
    font-size: 11px;
    color: var(--text-muted);
    gap: 4px;
}

.numpad-meta-info strong {
    color: var(--text-color);
}

.numpad-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-yellow);
    text-shadow: 0 0 10px rgba(253, 186, 35, 0.15);
}

.numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.numpad-key {
    background: #2a2020;
    border: 1px solid rgba(131, 79, 49, 0.2);
    color: var(--text-color);
    font-size: 22px;
    font-weight: 700;
    padding: 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.numpad-key:active {
    background: var(--accent-gold);
    color: #000;
    transform: scale(0.95);
}

.key-clear {
    background: rgba(234, 67, 53, 0.15);
    color: var(--accent-danger);
    border-color: rgba(234, 67, 53, 0.2);
}

.key-clear:active {
    background: var(--accent-danger);
    color: #fff;
}

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

.btn-numpad-action {
    flex: 1;
    padding: 14px;
    font-weight: bold;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
}

.btn-numpad-action.secondary {
    background: rgba(255,255,255,0.05);
    color: var(--text-dim);
}

.btn-numpad-action.primary {
    background: var(--accent-gold);
    color: #000;
}

.btn-numpad-action.primary:active {
    background: var(--accent-yellow);
}

/* ========================================== */
/* 8. GESTIÓN DE PRODUCTOS (CATÁLOGO)       */
/* ========================================== */
.products-header-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.panel-info h2 {
    color: var(--accent-gold);
    font-size: 22px;
}

.panel-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.btn-add-premium {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
    color: #000;
    border: none;
    font-weight: bold;
    font-size: 13px;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(226, 177, 72, 0.3);
    align-self: flex-start;
    transition: var(--transition-fast);
}

.btn-add-premium:hover {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-gold) 100%);
    transform: translateY(-1px);
}

.products-filter-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
}

.filter-search-wrapper {
    position: relative;
    width: 100%;
}

.filter-search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-search-prod {
    width: 100%;
    background-color: var(--fill-input);
    border: 1px solid var(--border-coffee);
    color: #fff;
    padding: 10px 14px;
    padding-left: 36px;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    font-family: var(--font-sans);
    transition: var(--transition-fast);
}

.input-search-prod:focus {
    border-color: var(--accent-yellow);
}

.filter-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.select-premium-inline {
    width: 100%;
    background-color: var(--fill-input);
    border: 1px solid var(--border-coffee);
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.products-list-card {
    padding: 0;
    overflow: hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.products-table th {
    background: rgba(0, 0, 0, 0.4);
    color: var(--accent-gold);
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-coffee);
}

.products-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(131, 79, 49, 0.15);
    color: var(--text-dim);
}

.products-table tbody tr:hover {
    background: rgba(131, 79, 49, 0.05);
}

.actions-header {
    text-align: right;
}

.actions-cell {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-action-premium {
    height: 32px;
    width: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
}

.btn-action-premium.edit {
    background: rgba(226, 177, 72, 0.15);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
}

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

.btn-action-premium.delete {
    background: rgba(234, 67, 53, 0.15);
    color: var(--accent-danger);
    border: 1px solid var(--accent-danger);
}

.btn-action-premium.delete:hover {
    background: var(--accent-danger);
    color: #fff;
}

/* Modales */
/* Modales (Sistema Flexbox Premium Móvil con Cabecera/Pie Fijos y Scroll Interno) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px; /* Espaciado externo pequeño para aprovechar la pantalla */
}

.modal-card {
    background: #1f1818;
    border: 1px solid var(--border-coffee-light);
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 20px); /* Ocupa el 100% de la altura disponible menos 20px */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Corta el desbordamiento de las esquinas redondeadas */
    animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal-card.mini {
    max-width: 380px;
}

.modal-header {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 16px; /* Más compacto */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(163, 101, 65, 0.3);
    flex-shrink: 0; /* Bloqueado arriba, nunca se reduce ni desaparece */
}

.modal-header h3 {
    color: var(--accent-gold);
    font-size: 15px; /* Compacto */
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.btn-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    transition: var(--transition-fast);
}

.btn-modal-close:hover {
    color: var(--accent-gold);
}

.modal-form {
    padding: 12px 16px; /* Ajustado */
    overflow-y: auto; /* ACTIVA EL SCROLL INTERNO SI EL FORMULARIO ES MÁS GRANDE QUE LA PANTALLA */
    flex: 1; /* Ocupa dinámicamente el espacio restante */
    -webkit-overflow-scrolling: touch; /* Desplazamiento ultra fluido en iOS */
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Gaps pequeños y amigables para optimizar espacio */
}

.span-2 {
    width: 100%;
}

.input-append-btn {
    display: flex;
    gap: 8px;
    width: 100%;
}

.input-append-btn select {
    flex: 1;
}

.btn-append-add {
    background: rgba(163, 101, 65, 0.2);
    border: 1px solid var(--border-coffee);
    color: var(--accent-gold);
    width: 44px;
    height: 40px; /* Alineado con la altura del input */
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition-fast);
}

.btn-append-add:hover {
    background: var(--accent-gold);
    color: #000;
}

.form-section {
    border-top: 1px solid rgba(163, 101, 65, 0.2);
    padding-top: 10px;
    margin-top: 5px;
}

.form-section h4 {
    color: var(--accent-gold);
    font-size: 13px;
    margin-bottom: 2px;
}

.section-desc {
    font-size: 9px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

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

.modal-actions {
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid rgba(163, 101, 65, 0.25);
    padding: 10px 16px; /* Compactado */
    flex-shrink: 0; /* Bloqueado abajo, siempre visible */
}

.btn-modal-action {
    padding: 10px 18px;
    font-weight: 700;
    font-size: 12px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
    text-transform: uppercase;
}

.btn-modal-action.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-modal-action.primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
    color: #000;
    box-shadow: 0 2px 8px rgba(253, 194, 58, 0.2);
}

.btn-modal-action.primary:hover {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-gold) 100%);
}

.text-center { text-align: center; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); }

/* ========================================== */
/* 9. MEDIA QUERIES (ADAPTACIÓN A ESCRITORIO)*/
/* ========================================== */

@media (min-width: 768px) {
    /* Layout */
    .app-container {
        flex-direction: row;
    }
    
    .app-header {
        left: var(--sidebar-width);
    }
    
    .app-content {
        margin-left: var(--sidebar-width);
        padding: 30px;
    }
    
    .app-content.with-header {
        margin-bottom: 0; /* no nav inferior en PC */
    }
    
    /* Ocultar bottom nav y mostrar Sidebar */
    .bottom-nav {
        display: none;
    }
    
    .app-sidebar {
        display: block;
        width: var(--sidebar-width);
        background: #000000;
        border-right: 1px solid rgba(131, 79, 49, 0.3);
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 110;
        padding: 20px 0;
        background-image: linear-gradient(to bottom, #100b0b 0%, #000000 100%);
    }
    
    .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 20px 12px;
    }
    
    .nav-item {
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--text-dim);
        text-decoration: none;
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        transition: var(--transition-fast);
    }
    
    .nav-item i {
        font-size: 16px;
        width: 20px;
        text-align: center;
    }
    
    .nav-item:hover:not(.disabled) {
        background: rgba(131, 79, 49, 0.15);
        color: var(--accent-gold);
    }
    
    .nav-item.active {
        background: var(--accent-gold);
        color: #000000;
        font-weight: bold;
    }
    
    .nav-item.disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }
    
    .badge-soon {
        background-color: var(--border-coffee);
        color: #fff;
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 4px;
        margin-left: auto;
    }
    
    /* Filtros Line Check */
    .filter-row {
        flex-direction: row;
    }
    
    .filter-group {
        width: auto;
    }
    
    /* Grid de Estadísticas */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Sucursales */
    .branches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Dashboard Split */
    .dashboard-split-grid {
        grid-template-columns: 2fr 1.2fr;
    }
    
    .quick-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Formulario Producto Modal */
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .span-2 {
        grid-column: span 2;
    }
    
    /* Productos Filtros */
    .products-filter-row {
        flex-direction: row;
    }
    
    .filter-search-wrapper {
        flex: 2;
    }
    
    .filter-select-wrapper {
        flex: 1;
    }
    
    /* Botón Guardar Flotante */
    .inventory-save-bar {
        left: var(--sidebar-width);
        bottom: 0;
        padding-bottom: 12px;
    }
    
    /* Listado de Productos de Auditoría */
    .audit-products-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* ========================================== */
/* 10. ANIMACIONES KEYFRAMES                 */
/* ========================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.animate-slide-up {
    animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

@keyframes slide-up-modal {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.animate-bounce {
    animation: bounce 2s infinite ease-in-out;
}

/* ========================================== */
/* 11. TICKET DE TICKET, QUICK ACTIONS & SHEET */
/* ========================================== */

/* Sección de Acciones Rápidas (Dashboard) */
.quick-actions-section {
    margin-bottom: 25px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en móvil */
    gap: 12px;
}

.quick-action-card {
    background: var(--fill-card);
    border: 1px solid rgba(163, 101, 65, 0.25);
    border-radius: 14px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.quick-action-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(253, 186, 35, 0.15);
    background: var(--fill-card-hover);
}

.quick-action-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quick-action-card.disabled:hover {
    border-color: rgba(163, 101, 65, 0.25);
    transform: none;
    box-shadow: none;
    background: var(--fill-card);
}

.q-card-icon {
    font-size: 32px; /* Íconos bien grandes */
    margin-bottom: 10px;
    transition: var(--transition-fast);
}

.quick-action-card:hover .q-card-icon {
    transform: scale(1.1);
}

.q-card-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.q-card-desc {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.2;
}

/* Sección de Auditorías Recientes (Dashboard) */
.recent-audits-section {
    margin-bottom: 25px;
}

.recent-audits-list-card {
    padding: 15px;
}

/* Bottom Sheet (Navegación Móvil "Otros") */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bottom-sheet-card {
    background: #120e0e;
    border-top: 2px solid var(--border-coffee);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom)) 20px;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.8);
}

.bottom-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(131,79,49,0.2);
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.bottom-sheet-header span {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-gold);
    letter-spacing: 1px;
}

.btn-close-sheet {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.bottom-sheet-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sheet-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.sheet-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.1);
}

.sheet-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sheet-item.disabled:hover {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.05);
}

.sheet-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sheet-divider {
    height: 1px;
    background: rgba(131,79,49,0.2);
    margin: 8px 0;
}

.sheet-item.logout {
    background: rgba(255, 82, 82, 0.05);
    border-color: rgba(255, 82, 82, 0.15);
}

.sheet-item.logout:hover {
    background: rgba(255, 82, 82, 0.1);
}

/* Media Queries para Escritorio / Tablets */
@media (min-width: 576px) {
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .quick-actions-grid {
        grid-template-columns: repeat(6, 1fr); /* 6 columnas en pantalla completa de PC */
        gap: 15px;
    }
    
    .quick-action-card {
        padding: 22px 15px;
    }
    
    .q-card-icon {
        font-size: 38px; /* Aún más grandes en PC */
    }
    
    .q-card-title {
        font-size: 14px;
    }
    
    .q-card-desc {
        font-size: 11px;
    }
    
    .bottom-sheet-overlay {
        display: none !important; /* Nunca mostrar bottom sheet en PC */
    }
}

/* Barra de Estado Discreta del Dashboard */
.dashboard-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 15px;
    margin-bottom: 20px;
    background: rgba(31, 24, 24, 0.4);
    border: 1px solid rgba(131, 79, 49, 0.2);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.status-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-bar-item i {
    font-size: 16px;
}

.status-bar-item strong {
    font-size: 15px;
    color: #fff;
    font-weight: 700;
}

.status-bar-divider {
    width: 1px;
    height: 15px;
    background: rgba(131, 79, 49, 0.3);
}

.text-gold {
    color: var(--accent-gold);
}
.text-orange {
    color: var(--accent-orange);
}
.text-yellow {
    color: var(--accent-yellow);
}
