/* SISACT - Sistema de control de activos QR
   Estilos Principales - UI Moderna y Responsiva
*/
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.75);
    --bg-card-hover: rgba(51, 65, 85, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #38bdf8;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-blue: #0284c7;
    --accent-blue-hover: #0369a1;
    --accent-indigo: #6366f1;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;
    --accent-cyan: #06b6d4;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

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

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-indigo) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: white;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active a {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    font-weight: 600;
}

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

/* User Profile Badge at Sidebar Bottom */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: auto;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
}

.user-info .name { font-size: 0.88rem; font-weight: 600; color: white; }
.user-info .role { font-size: 0.75rem; color: var(--text-secondary); }

/* Main Content Wrapper */
.main-wrapper {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Navigation Bar */
.topbar {
    height: 70px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i { color: var(--accent-cyan); }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.content-body {
    padding: 32px;
    flex: 1;
}

/* Cards & Grid Systems */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-bottom: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 24px; margin-bottom: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; margin-bottom: 30px; }

/* Grid ESPECÍFICO para páginas de ESCANEO (columna izquierda GRANDE + lista vertical angosta) */
.scanner-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    align-items: start;
    width: 100%;
}
@media (max-width: 1100px) {
    .scanner-layout-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.3);
}

.kpi-info h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin-bottom: 8px; }
.kpi-info .val { font-size: 1.8rem; font-weight: 700; color: white; }
.kpi-icon { width: 52px; height: 52px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }

.kpi-blue { background: rgba(2, 132, 199, 0.15); color: #38bdf8; }
.kpi-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.kpi-rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.kpi-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

/* Main Card Panels */
.card-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 { font-size: 1.15rem; font-weight: 600; color: white; display: flex; align-items: center; gap: 10px; }
.panel-header h2 i { color: var(--accent-cyan); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary { background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-indigo) 100%); color: white; box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(2, 132, 199, 0.5); }

.btn-emerald { background: linear-gradient(135deg, #059669 0%, #10b981 100%); color: white; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3); }
.btn-emerald:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5); }

.btn-rose { background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%); color: white; box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3); }
.btn-rose:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(244, 63, 94, 0.5); }

.btn-secondary { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.14); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 16px 32px; font-size: 1.2rem; border-radius: var(--radius-lg); }

/* Form Controls */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.form-control, .form-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.form-select option { background: var(--bg-secondary); color: white; }

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-emerald);
    cursor: pointer;
}

/* Tables */
.table-responsive { width: 100%; overflow-x: auto; }
.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}
.custom-table th {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-secondary);
    padding: 14px 16px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}
.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}
.custom-table tbody tr { transition: background 0.15s ease; }
.custom-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-blue { background: rgba(2, 132, 199, 0.15); color: #38bdf8; border: 1px solid rgba(2, 132, 199, 0.3); }

/* SCANNER & VERIFICATION STYLES */
.scanner-viewport {
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    border: 2px dashed rgba(56, 189, 248, 0.4);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#reader { width: 100%; height: 100%; border: none !important; }
#reader video { width: 100% !important; height: 100% !important; object-fit: cover; }

/* Dynamic Scan Result Alerts */
.scan-alert-box {
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 20px;
    animation: fadeInAlert 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInAlert {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* RED ALERT: NOT AUTHORIZED OR WRONG USER */
.alert-unauthorized {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.25) 0%, rgba(159, 18, 57, 0.4) 100%);
    border: 2px solid #f43f5e;
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.4);
    text-align: center;
    color: white;
}

.alert-unauthorized .alert-header-icon {
    font-size: 3.5rem;
    color: #f43f5e;
    margin-bottom: 12px;
    animation: pulseWarning 1.2s infinite alternate;
}

@keyframes pulseWarning {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.12); opacity: 1; text-shadow: 0 0 20px rgba(244, 63, 94, 0.8); }
}

.alert-unauthorized h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fca5a5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.alert-unauthorized p {
    font-size: 1.05rem;
    color: #fecdd3;
    font-weight: 500;
    margin-bottom: 16px;
}

/* GREEN ALERT: AUTHORIZED EXIT */
.alert-authorized {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.25) 0%, rgba(6, 78, 59, 0.4) 100%);
    border: 2px solid #10b981;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
    color: white;
}

.alert-authorized .alert-header-icon {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 10px;
}

.alert-authorized h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6ee7b7;
}

/* Alert: DOBLE MARCA / WARNING (amarilla) */
.scan-alert-box.alert-doublemark {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(146, 64, 14, 0.35) 100%);
    border: 2px solid #f59e0b;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
    color: #1c1917;
}
.alert-doublemark .alert-header-icon {
    font-size: 3rem;
    color: #f59e0b;
    margin-bottom: 10px;
}
.alert-doublemark h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #92400e;
}
.alert-doublemark .spec-item .label {
    color: #78350f;
}
.alert-doublemark .spec-item .val {
    color: #1c1917;
    font-weight: 700;
}

/* Detail Spec Card inside Scan Result */
.asset-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    background: rgba(15, 23, 42, 0.6);
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 16px 0;
    text-align: left;
}

.spec-item .label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; }
.spec-item .val { font-size: 0.95rem; font-weight: 600; color: white; margin-top: 2px; }

/* ==========================================================================
   FULLSCREEN STANDALONE SCANNER FOR PHYSICAL HARDWARE SCANNER (KIOSK MODE)
   ========================================================================== */

.fullscreen-scanner-wrapper {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #090d16;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fullscreen-scanner-header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fullscreen-scanner-body {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: stretch;
    padding: 20px;
    position: relative;
    gap: 20px;
    min-height: 0;
}

/* Huge Fullscreen Ready State */
.hw-ready-box {
    text-align: center;
    max-width: 900px;
    width: 100%;
    padding: 32px 28px;
    background: rgba(30, 41, 59, 0.7);
    border: 2px dashed rgba(56, 189, 248, 0.5);
    border-radius: 30px;
    box-shadow: 0 0 50px rgba(2, 132, 199, 0.2);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.hw-ready-box .hw-icon {
    font-size: 5rem;
    color: #38bdf8;
    margin-bottom: 24px;
    animation: hwPulse 1.8s infinite ease-in-out;
}

@keyframes hwPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 15px #38bdf8); }
    100% { transform: scale(1); opacity: 0.8; }
}

.hw-ready-box h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.hw-ready-box p {
    font-size: 1.2rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* Fullscreen Red Alert Banner */
.fullscreen-alert-red {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 520px;
    background: radial-gradient(circle at center, #991b1b 0%, #450a0a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 40px;
    text-align: center;
    z-index: 100;
    border-radius: 20px;
    overflow: auto;
    animation: fullRedBlink 0.6s ease-in-out infinite alternate;
}

@keyframes fullRedBlink {
    0% { background: radial-gradient(circle at center, #dc2626 0%, #450a0a 100%); }
    100% { background: radial-gradient(circle at center, #991b1b 0%, #290505 100%); }
}

.fullscreen-alert-red .alert-big-icon {
    font-size: 8rem;
    color: #fca5a5;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.fullscreen-alert-red h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    margin-bottom: 16px;
}

.fullscreen-alert-red .alert-reason {
    font-size: 1.8rem;
    background: rgba(0, 0, 0, 0.5);
    color: #fecdd3;
    padding: 16px 36px;
    border-radius: 16px;
    border: 2px solid #f43f5e;
    font-weight: 700;
    margin-bottom: 30px;
    max-width: 900px;
}

/* Fullscreen Green Alert Banner */
.fullscreen-alert-green {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 520px;
    background: radial-gradient(circle at center, #065f46 0%, #022c22 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 40px;
    text-align: center;
    z-index: 100;
    border-radius: 20px;
    overflow: auto;
    animation: fullGreenPulse 0.8s ease-in-out;
}

.fullscreen-alert-green .alert-big-icon {
    font-size: 7rem;
    color: #6ee7b7;
    margin-bottom: 20px;
}

.fullscreen-alert-green h1 {
    font-size: 3.2rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

/* Fullscreen Amber Alert Banner (Doble Marca) */
.fullscreen-alert-amber {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 520px;
    background: radial-gradient(circle at center, #92400e 0%, #451a03 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 40px;
    text-align: center;
    z-index: 100;
    border-radius: 20px;
    overflow: auto;
    animation: fullAmberPulse 0.6s ease-in-out;
}
@keyframes fullAmberPulse {
    0%   { transform: scale(0.97); opacity: 0.85; }
    50%  { transform: scale(1.01); }
    100% { transform: scale(1);    opacity: 1; }
}
.fullscreen-alert-amber .alert-big-icon {
    font-size: 7.5rem;
    color: #fde047;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 30px rgba(250, 204, 21, 0.5));
}
.fullscreen-alert-amber h1 {
    font-size: 3.1rem;
    font-weight: 900;
    color: #fffbeb;
    letter-spacing: 1.5px;
    margin-bottom: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

/* Physical Scanner Auto-focus Hidden Input Indicator */
.hw-input-indicator {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Modal Dialogs */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    padding: 28px;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.25s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-box { transform: translateY(0); }

/* QR Sticker Printable Card */
.qr-sticker-card {
    background: white;
    color: #0f172a;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    width: 260px;
    margin: 0 auto;
    border: 2px solid #cbd5e1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.qr-sticker-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; color: #0f172a; }
.qr-sticker-card p { font-size: 0.75rem; color: #475569; margin-bottom: 12px; }
.qr-sticker-card canvas, .qr-sticker-card img { margin: 0 auto 10px auto; display: block; }
.qr-sticker-card .code-tag { font-family: monospace; font-weight: 700; font-size: 0.9rem; background: #e2e8f0; padding: 4px 8px; border-radius: 4px; }

@media print {
    body * { visibility: hidden; }
    .printable-area, .printable-area * { visibility: visible; }
    .printable-area { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ==========================================================================
   SISACT — CAPA RESPONSIVE COMPLETA
   Tablet:  ≤900px
   Móvil:   ≤576px
   ========================================================================== */

/* =============== BOTÓN HAMBURGESA (solo visible en móvil) =============== */
.mobile-menu-toggle {
    display: none;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu-close {
    display: none;
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #fb7185;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    position: absolute;
    top: 16px;
    right: 16px;
    -webkit-tap-highlight-color: transparent;
    z-index: 10;
}
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 95;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.sidebar-backdrop.active { display: block; opacity: 1; }

/* =============== TABLET (≤900px) =============== */
@media (max-width: 900px) {
    /* Layout base */
    .sidebar {
        width: 280px;
        transform: translateX(-110%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
        padding-top: 60px;
    }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .mobile-menu-toggle { display: inline-flex; }
    .mobile-menu-close { display: inline-flex; }

    /* Topbar */
    .topbar {
        height: 62px;
        padding: 0 16px;
        gap: 10px;
    }
    .page-title { font-size: 1.05rem; gap: 8px; min-width: 0; }
    .page-title i { flex-shrink: 0; }
    .topbar-actions {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .topbar-actions .btn { font-size: 0.75rem; padding: 7px 10px; }
    .topbar-actions .btn span { display: none; }
    .topbar-actions .btn i { margin: 0; }

    /* Content padding */
    .content-body { padding: 16px; }

    /* Grids: reducir min-width para que encajen */
    .grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
    .grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 20px; }
    .grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }

    /* KPI cards */
    .kpi-card { padding: 16px; gap: 12px; }
    .kpi-info h3 { font-size: 0.72rem; }
    .kpi-info .val { font-size: 1.4rem; }
    .kpi-icon { width: 42px; height: 42px; font-size: 1.15rem; flex-shrink: 0; }

    /* Card panels */
    .card-panel { padding: 16px; margin-bottom: 20px; border-radius: 16px; }
    .panel-header {
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }
    .panel-header h2 { font-size: 1rem; }

    /* Botones: área táctil mínima 44px */
    .btn { min-height: 42px; padding: 10px 14px; font-size: 0.88rem; border-radius: 12px; }
    .btn-sm { min-height: 38px; padding: 7px 11px; font-size: 0.8rem; }
    .btn-lg { padding: 14px 20px; font-size: 1.05rem; }

    /* Formularios */
    .form-group { margin-bottom: 14px; }
    .form-control, .form-select {
        padding: 12px 14px;
        min-height: 46px;
        font-size: 1rem;
        border-radius: 12px;
    }
    .form-check input[type="checkbox"] {
        width: 24px; height: 24px;
    }

    /* Tablas: reducir padding y fuente */
    .table-responsive { -webkit-overflow-scrolling: touch; }
    .custom-table { font-size: 0.82rem; }
    .custom-table th, .custom-table td {
        padding: 10px 10px;
        white-space: nowrap;
    }
    .custom-table th { font-size: 0.68rem; padding: 10px; }

    /* Badges */
    .badge { font-size: 0.7rem; padding: 3px 8px; }

    /* Scanner layout: 2 cols -> 1 col */
    .scanner-layout-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    /* Scanner viewport */
    .scanner-viewport { min-height: 240px; border-radius: 16px; }

    /* Alertas del escáner */
    .scan-alert-box { padding: 18px; border-radius: 16px; }
    .scan-alert-box h2 { font-size: 1.15rem; }
    .alert-unauthorized .alert-header-icon { font-size: 2.5rem; }
    .alert-authorized .alert-header-icon { font-size: 2.2rem; }
    .alert-doublemark .alert-header-icon { font-size: 2.2rem; }
    .asset-spec-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; padding: 12px; }
    .spec-item .label { font-size: 0.68rem; }
    .spec-item .val { font-size: 0.85rem; }

    /* Lista vertical diaria: reducir altura fija para no ocupar todo en tablet */
    #vertical-daily-list { max-height: 520px; }
    .daily-item-card { padding: 7px 9px !important; }

    /* Garita fullscreen layout: 2 cols -> 1 col */
    .fullscreen-scanner-body {
        flex-direction: column;
        padding: 12px;
        gap: 12px;
    }
    .fullscreen-scanner-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }
    .fullscreen-scanner-header .brand-title { font-size: 1rem; }
    .fullscreen-scanner-header .brand-icon { width: 36px; height: 36px; font-size: 1.1rem; }
    .fullscreen-scanner-header h1 { font-size: 1.05rem; }
    .fullscreen-scanner-header h1 + div { font-size: 0.68rem; }
    .hw-input-indicator { padding: 6px 10px; font-size: 0.78rem; }

    .hw-ready-box {
        padding: 22px 16px;
        border-radius: 22px;
        max-width: 100%;
    }
    .hw-ready-box .hw-icon { font-size: 3.2rem; margin-bottom: 14px; }
    .hw-ready-box h1 { font-size: 1.4rem; }
    .hw-ready-box p { font-size: 0.95rem; }

    .fullscreen-alert-red, .fullscreen-alert-green, .fullscreen-alert-amber {
        min-height: 360px;
        padding: 22px 18px;
        border-radius: 18px;
    }
    .fullscreen-alert-red .alert-big-icon,
    .fullscreen-alert-green .alert-big-icon,
    .fullscreen-alert-amber .alert-big-icon { font-size: 4.5rem; }
    .fullscreen-alert-red h1,
    .fullscreen-alert-green h1,
    .fullscreen-alert-amber h1 { font-size: 1.8rem; letter-spacing: 1px; }
    .fullscreen-alert-red h2,
    .fullscreen-alert-green h2,
    .fullscreen-alert-amber h2 { font-size: 1.1rem; }
    .fullscreen-alert-red .alert-reason { font-size: 1.15rem; padding: 12px 20px; border-radius: 14px; }

    .asset-spec-grid { font-size: 0.95rem; padding: 14px; border-radius: 14px; }
    .asset-spec-grid .spec-item .label { font-size: 0.7rem; }
    .asset-spec-grid .spec-item .val { font-size: 0.92rem; }

    /* Modal */
    .modal-box { padding: 18px; width: 94%; border-radius: 16px; max-height: 92vh; }
}

/* =============== MÓVIL PEQUEÑO (≤576px) =============== */
@media (max-width: 576px) {
    /* Sidebar aún más compacto */
    .sidebar { width: 85vw; max-width: 320px; padding: 16px 12px; padding-top: 56px; }
    .brand { padding: 0 8px 16px 8px; margin-bottom: 16px; gap: 10px; }
    .brand-icon { width: 38px; height: 38px; font-size: 1.15rem; border-radius: 12px; }
    .brand-title { font-size: 1.05rem; }
    .brand-subtitle { font-size: 0.62rem; letter-spacing: 0.5px; }
    .nav-menu { gap: 4px; }
    .nav-item a { padding: 11px 12px; font-size: 0.88rem; gap: 12px; border-radius: 12px; }
    .nav-item i { font-size: 1rem; width: 20px; }

    /* Content padding */
    .content-body { padding: 12px; }

    /* Grids: 1 columna móvil */
    .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .grid-2 { grid-template-columns: 1fr; gap: 14px; }
    .grid-3 { grid-template-columns: 1fr; gap: 14px; }

    /* KPI cards ultra compactas */
    .kpi-card { padding: 12px; border-radius: 14px; gap: 10px; }
    .kpi-info h3 { font-size: 0.65rem; letter-spacing: 0.3px; margin-bottom: 6px; }
    .kpi-info .val { font-size: 1.2rem; line-height: 1.1; }
    .kpi-icon { width: 38px; height: 38px; font-size: 1rem; border-radius: 10px; }

    /* Card panels */
    .card-panel { padding: 14px; margin-bottom: 16px; border-radius: 14px; }
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    .panel-header h2 { font-size: 0.98rem; gap: 8px; }
    .panel-header h2 i { font-size: 1rem; }
    .panel-header > div:last-child {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .panel-header .btn-sm { flex: 1 1 auto; justify-content: center; }

    /* Botones: full-width en paneles de acción múltiple */
    .btn { min-height: 46px; padding: 11px 14px; font-size: 0.9rem; border-radius: 12px; gap: 7px; }
    .btn-sm { min-height: 40px; font-size: 0.82rem; }

    /* Formularios */
    .form-group { margin-bottom: 12px; }
    .form-label { font-size: 0.8rem; margin-bottom: 6px; }
    .form-control, .form-select {
        padding: 12px 14px;
        min-height: 48px;
        font-size: 1.02rem;
        border-radius: 12px;
    }

    /* Tablas: fuente más pequeña y scroll */
    .custom-table { font-size: 0.78rem; }
    .custom-table th, .custom-table td {
        padding: 8px 8px;
        white-space: nowrap;
    }
    .custom-table th { font-size: 0.62rem; padding: 8px; letter-spacing: 0.3px; }

    /* Badges aún más compactos */
    .badge { font-size: 0.65rem; padding: 3px 7px; gap: 4px; }

    /* Scanner viewport más pequeño para móvil */
    .scanner-viewport { min-height: 220px; border-radius: 14px; }
    #reader { min-height: 220px !important; }

    /* Alertas scanner */
    .scan-alert-box { padding: 16px; border-radius: 14px; }
    .scan-alert-box h2 { font-size: 1.05rem; line-height: 1.3; }
    .scan-alert-box p { font-size: 0.92rem; }
    .alert-unauthorized .alert-header-icon { font-size: 2.2rem; }
    .alert-authorized .alert-header-icon { font-size: 2rem; }
    .alert-doublemark .alert-header-icon { font-size: 2rem; }
    .asset-spec-grid { grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; border-radius: 12px; }
    .asset-spec-grid .spec-item[style*="grid-column: span 2"] { grid-column: span 1 !important; }
    .spec-item .label { font-size: 0.64rem; }
    .spec-item .val { font-size: 0.82rem; line-height: 1.3; word-break: break-word; white-space: normal; }

    /* Lista vertical diaria móvil: altura reducida y cards compactas */
    .daily-item-card { padding: 6px 8px !important; border-radius: 8px !important; }
    .daily-item-card strong { font-size: 0.78rem !important; }
    #vertical-daily-list {
        max-height: 420px;
        height: auto !important;
        gap: 6px !important;
    }
    .lista_vertical_container .panel-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .lista_vertical_container .panel-header h2 { font-size: 0.9rem; }
    #daily-count-badge { font-size: 0.7rem !important; padding: 4px 8px !important; }

    /* Garita fullscreen móvil */
    .fullscreen-scanner-wrapper { overflow-y: auto; }
    .fullscreen-scanner-header {
        padding: 10px 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .fullscreen-scanner-header > div:first-child {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .fullscreen-scanner-header > div:last-child {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-start;
    }
    .fullscreen-scanner-header .btn-sm { flex: 1; font-size: 0.78rem; }
    .fullscreen-scanner-header h1 { font-size: 1rem; line-height: 1.2; }
    .fullscreen-scanner-header h1 + div { font-size: 0.62rem; }

    .fullscreen-scanner-body {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
        overflow-y: visible;
        height: auto;
        min-height: 0;
    }
    .fullscreen-scanner-body > div {
        min-height: 0;
    }
    .scanner-layout-grid { margin-bottom: 14px; }

    .hw-ready-box {
        padding: 20px 14px;
        border-radius: 18px;
        gap: 8px;
    }
    .hw-ready-box .hw-icon { font-size: 2.8rem; margin-bottom: 12px; }
    .hw-ready-box h1 { font-size: 1.15rem; line-height: 1.25; margin-bottom: 8px; }
    .hw-ready-box p { font-size: 0.88rem; line-height: 1.4; margin-bottom: 14px; }
    .hw-ready-box input[type="text"] {
        font-size: 0.95rem;
        padding: 12px 14px;
        min-height: 48px;
    }
    .hw-ready-box > div:has(> .btn-sm) {
        flex-direction: column;
        gap: 8px;
    }
    .hw-ready-box .btn-sm {
        width: 100%;
        min-height: 44px;
        font-size: 0.88rem;
    }

    /* Fullscreen alertas móviles ultra compactas */
    .fullscreen-alert-red, .fullscreen-alert-green, .fullscreen-alert-amber {
        min-height: 0;
        height: 100%;
        padding: 18px 14px;
        border-radius: 16px;
    }
    .fullscreen-alert-red .alert-big-icon,
    .fullscreen-alert-green .alert-big-icon,
    .fullscreen-alert-amber .alert-big-icon {
        font-size: 4rem;
        margin-bottom: 12px;
    }
    .fullscreen-alert-red h1,
    .fullscreen-alert-green h1,
    .fullscreen-alert-amber h1 {
        font-size: 1.35rem;
        letter-spacing: 0.5px;
        line-height: 1.25;
        margin-bottom: 10px;
    }
    .fullscreen-alert-red h2,
    .fullscreen-alert-green h2,
    .fullscreen-alert-amber h2 {
        font-size: 0.95rem;
        line-height: 1.3;
        margin-top: 6px;
    }
    .fullscreen-alert-red .alert-reason {
        font-size: 0.98rem;
        padding: 10px 14px;
        border-radius: 12px;
        margin-bottom: 16px;
        line-height: 1.4;
    }
    .fullscreen-alert-red .asset-spec-grid,
    .fullscreen-alert-green .asset-spec-grid,
    .fullscreen-alert-amber .asset-spec-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 12px;
        border-radius: 14px;
        margin-top: 12px;
    }
    .fullscreen-alert-red .asset-spec-grid .spec-item[style*="grid-column: span 2"],
    .fullscreen-alert-green .asset-spec-grid .spec-item[style*="grid-column: span 2"],
    .fullscreen-alert-amber .asset-spec-grid .spec-item[style*="grid-column: span 2"] {
        grid-column: span 2 !important;
    }
    .fullscreen-alert-red .asset-spec-grid .spec-item .val,
    .fullscreen-alert-green .asset-spec-grid .spec-item .val,
    .fullscreen-alert-amber .asset-spec-grid .spec-item .val {
        font-size: 0.88rem;
        line-height: 1.3;
    }

    /* Modal móvil */
    .modal-box {
        padding: 16px 14px;
        width: 95%;
        max-height: 94vh;
        border-radius: 14px;
    }
    .modal-box h2, .modal-box h3 {
        font-size: 1.1rem;
    }

    /* SweetAlert2 más compacto en móvil */
    .swal2-popup {
        width: 92% !important;
        padding: 18px 16px !important;
        border-radius: 16px !important;
        font-size: 0.92rem;
    }
    .swal2-title {
        font-size: 1.15rem !important;
        line-height: 1.3;
    }
    .swal2-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    .swal2-actions button {
        width: 100% !important;
        min-height: 46px;
        margin: 0 !important;
    }

    /* Imágenes QR: reducir tamaño automáticamente */
    .qr-sticker-card {
        width: 200px;
        padding: 14px;
    }
    .qr-sticker-card h4 { font-size: 0.9rem; }
    .qr-sticker-card p { font-size: 0.7rem; }

    /* Evitar zoom accidental en inputs iOS: fijar 16px mínimo en focus */
    input[type="text"], input[type="number"], input[type="password"],
    input[type="email"], input[type="date"], input[type="search"],
    select, textarea {
        font-size: 16px;
    }
}

/* =============== AJUSTES ESPECIALES: PANTALLAS MUY ALTAS (≤400px) =============== */
@media (max-width: 400px) {
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .kpi-info .val { font-size: 1.1rem; }
    .page-title { font-size: 0.95rem; }
    .hw-ready-box h1 { font-size: 1.05rem; }
    .fullscreen-alert-red h1,
    .fullscreen-alert-green h1,
    .fullscreen-alert-amber h1 {
        font-size: 1.2rem;
    }
}

/* =============== CORRECCIONES DE LANDSCAPE EN MÓVIL =============== */
@media (max-width: 900px) and (orientation: landscape) {
    .hw-ready-box { padding: 16px; }
    .hw-ready-box h1 { font-size: 1.2rem; }
    .hw-ready-box p { font-size: 0.9rem; line-height: 1.4; }
    .fullscreen-alert-red .alert-big-icon,
    .fullscreen-alert-green .alert-big-icon,
    .fullscreen-alert-amber .alert-big-icon { font-size: 4rem; }
    .fullscreen-alert-red h1,
    .fullscreen-alert-green h1,
    .fullscreen-alert-amber h1 { font-size: 1.6rem; }
    .scanner-viewport { min-height: 200px; }
    #vertical-daily-list { max-height: 320px; }
}

/* =============== GARITA ESCANER: FORZAR VISIBILIDAD MÓVIL (FIX FINAL) =============== */
/* ----- Contenedores principales: NUNCA OCULTAR ----- */
.garita-header-actions,
.garita-actions-mobile,
.row-actions-force-visible {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    position: static !important;
    clip: auto !important;
    clip-path: none !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    padding-top: 12px !important;
}
/* ----- Botón VOLVER AL DASHBOARD: NUNCA OCULTAR ----- */
.btn-back-dashboard,
a.btn-back-dashboard,
button.btn-back-dashboard,
input[type=submit].btn-back-dashboard,
#btn-back-dashboard,
[class*="back-dashboard"] {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    position: static !important;
    clip: auto !important;
    clip-path: none !important;
    height: auto !important;
    min-height: 44px !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    padding: 0 16px !important;
    margin: 4px 0 !important;
    pointer-events: auto !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}
.btn-back-dashboard > i,
.btn-back-dashboard > span {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    clip: auto !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    font-size: inherit !important;
    padding: 0 !important;
    margin: 0 4px 0 0 !important;
}
/* ----- BOTONES SUBIR IMAGEN QR + CÁMARA WEB: NUNCA OCULTAR ----- */
.garita-actions-mobile > label.btn,
.garita-actions-mobile > button.btn,
.row-actions-force-visible > label.btn,
.row-actions-force-visible > button.btn,
.garita-actions-mobile .btn-sm,
.row-actions-force-visible .btn-sm,
.hw-ready-box .garita-actions-mobile label,
.hw-ready-box .garita-actions-mobile button {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    position: static !important;
    clip: auto !important;
    clip-path: none !important;
    min-height: 44px !important;
    height: auto !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    padding: 0 18px !important;
    margin: 4px !important;
    pointer-events: auto !important;
    white-space: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}
/* ----- Contenedor file input SUBIR IMAGEN: NUNCA OCULTAR (solo el input va oculto, el label visible) ----- */
.garita-actions-mobile input[type=file],
.row-actions-force-visible input[type=file] {
    display: none !important;
}
/* ----- @media MÓVIL (≤ 900px): Aumentar tamaño para garita ----- */
@media (max-width: 900px) {
    .garita-header-actions {
        width: 100% !important;
        justify-content: center !important;
        align-items: stretch !important;
    }
    .garita-header-actions > * {
        flex: 1 1 calc(50% - 10px) !important;
        justify-content: center !important;
        min-height: 44px !important;
    }
    .garita-actions-mobile,
    .row-actions-force-visible {
        flex-direction: row !important;
        justify-content: center !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .garita-actions-mobile > label.btn,
    .garita-actions-mobile > button.btn {
        flex: 1 1 calc(50% - 10px) !important;
        min-height: 48px !important;
        font-size: 0.96rem !important;
    }
}
/* ----- @media MÓVIL PEQUEÑO (≤ 576px): Apilar botones vertical ----- */
@media (max-width: 576px) {
    .garita-actions-mobile,
    .row-actions-force-visible {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .garita-actions-mobile > label.btn,
    .garita-actions-mobile > button.btn {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-height: 50px !important;
        font-size: 1rem !important;
    }
    .btn-back-dashboard {
        width: 100% !important;
        justify-content: center !important;
        min-height: 48px !important;
    }
}
/* ----- Eliminar posible display:none heredado de topbar-actions sobre spans ----- */
.topbar-actions .btn-back-dashboard span,
.topbar-actions .btn-back-dashboard i,
.panel-header .btn-back-dashboard span,
.panel-header .btn-back-dashboard i,
.garita-header-actions .btn-back-dashboard span,
.garita-header-actions .btn-back-dashboard i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* =============== GARITA. QUITAR HEADER EN MÓVIL (IMAGEN 1) =============== */
/*
   Ocultar:
   • Todo el bloque izquierdo brand (ícono azul + título grande + subtítulo verde)
   • Badge verde "LECTOR FÍSICO LISTO"
   • Botón "Pantalla Completa"
   PERO MANTENER visible el botón 🏠 VOLVER AL DASHBOARD (user no pidió quitarlo, al contrario antes agregarlo mobile)
*/
@media (max-width: 900px) {
    .garita-hide-on-mobile,
    .garita-hide-on-mobile-brand-icon,
    .garita-hide-on-mobile-title,
    .garita-hide-on-mobile-title-main,
    .garita-hide-on-mobile-title-sub,
    .garita-hide-on-mobile-status,
    .garita-hide-on-mobile-fullscreen,
    .garita-brand-wrap,
    #hw-status-badge {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        clip-path: inset(50%) !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -99999px !important;
        top: -99999px !important;
    }

    /* Alinear el Volver al Dashboard a la derecha y que ocupe todo el ancho en el header */
    header.fullscreen-scanner-header {
        justify-content: flex-end !important;
        padding: 8px 10px !important;
        min-height: 0 !important;
    }
    header.fullscreen-scanner-header .garita-header-actions {
        width: 100% !important;
        justify-content: center !important;
        padding-top: 0 !important;
        gap: 6px !important;
    }
    header.fullscreen-scanner-header .garita-header-actions .btn-back-dashboard {
        width: 100% !important;
        justify-content: center !important;
        min-height: 48px !important;
        font-size: 1rem !important;
    }

    /* Reducir margen superior de la caja de escaneo porque se quitó todo el header  */
    .hw-ready-box {
        margin-top: 6px !important;
        padding-top: 14px !important;
    }
}

/* Doble protección en pantallas más chicas (≤576px) */
@media (max-width: 576px) {
    .garita-hide-on-mobile,
    .garita-hide-on-mobile-brand-icon,
    .garita-hide-on-mobile-title,
    .garita-hide-on-mobile-title-main,
    .garita-hide-on-mobile-title-sub,
    .garita-hide-on-mobile-status,
    .garita-hide-on-mobile-fullscreen,
    .garita-brand-wrap,
    #hw-status-badge {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        clip-path: inset(50%) !important;
        position: absolute !important;
    }
}
