/* ============================================================
   panels.css — Panel negocio, login, token, admin, escaneo
   ============================================================ */

/* -- Layout sidebar (panel_negocio) -- */
.sidebar {
    background: var(--brand);
    min-height: 100vh;
    width: 240px;
    position: fixed;
    top: 0; left: 0;
    display: flex; flex-direction: column;
    z-index: 30;
    transition: transform 0.3s;
}
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
}
.main-content { margin-left: 240px; }

.nav-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.7rem 1.25rem; border-radius: 0.65rem;
    font-size: 0.875rem; font-weight: 500;
    color: rgba(255,255,255,0.65);
    transition: background 0.2s, color 0.2s;
    cursor: pointer; border: none; background: transparent;
    width: 100%; text-align: left;
}
.nav-link:hover  { background: rgba(255,255,255,0.08); color: var(--white); }
.nav-link.active { background: rgba(255,255,255,0.15); color: var(--white); font-weight: 700; }

/* -- Login / token — card centrada -- */
.auth-page-body {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
    background: var(--bg-page);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(120,16,6,0.12), transparent),
        radial-gradient(ellipse 60% 40% at 80% 110%, rgba(187,68,51,0.08), transparent);
}
.auth-card {
    background: var(--white); border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0,0,0,0.09), 0 2px 8px rgba(0,0,0,0.05);
    width: 100%; max-width: 440px; overflow: hidden;
    animation: fadeUp 0.4s ease;
}
.auth-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem 2rem 1.75rem;
    text-align: center; position: relative;
}
.auth-card-header::after {
    content: ''; position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 24px; background: var(--white);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.auth-card-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem; font-weight: 800;
    color: var(--white); margin-bottom: 0.3rem;
}
.auth-card-header p { font-size: 0.82rem; color: rgba(255,255,255,0.75); }
.auth-card-body { padding: 1.75rem 2rem 2rem; }

/* Tabs login */
.tab-btn { transition: all 0.2s; }
.tab-btn.active {
    background: var(--brand);
    color: var(--white);
    box-shadow: 0 2px 12px rgba(120,16,6,0.25);
}

/* -- Token acceso -- */
.lock-icon {
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; margin: 0 auto 1rem;
}
.token-input {
    width: 100%;
    border: 1.5px solid var(--border); border-radius: 0.85rem;
    padding: 0.85rem 3rem 0.85rem 1rem;
    font-size: 1.05rem; font-family: 'Montserrat', sans-serif;
    font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--brand); background: #fff8f8; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.token-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(187,68,51,0.1);
    background: var(--white);
}
.token-wrap { position: relative; }
.eye-btn {
    position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; font-size: 1.1rem;
    color: var(--text-muted); padding: 0.25rem;
}
.nota-token {
    margin-top: 1.25rem;
    background: linear-gradient(135deg, rgba(245,173,171,0.3), rgba(245,173,171,0.4));
    border: 1px solid rgba(245,173,171,0.5);
    border-radius: 0.85rem; padding: 0.9rem 1rem;
    display: flex; align-items: flex-start; gap: 0.6rem;
}
.nota-token p { font-size: 0.8rem; color: #9e2a1b; line-height: 1.5; }
.nota-token strong { color: #781006; }
.auth-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0 1.25rem; }
.auth-footer-link { text-align: center; font-size: 0.8rem; color: var(--text-muted); }
.auth-footer-link a { color: var(--brand); font-weight: 600; text-decoration: none; }
.auth-footer-link a:hover { text-decoration: underline; }
.access-badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: rgba(120,16,6,0.06); border-radius: 999px;
    padding: 0.3rem 0.75rem; font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand);
    margin-bottom: 1rem;
}
.access-badge span { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); display: inline-block; }

/* -- Admin tabs -- */
.tab-admin-btn {
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--text-muted); cursor: pointer;
}
.tab-admin-btn:hover { background: #f8fafc; }
.tab-admin-btn.active-tab {
    background: var(--brand) !important;
    color: var(--white) !important;
    border-color: var(--brand) !important;
}
.tab-section         { display: none !important; }
.tab-section.active  { display: block !important; }
.token-admin { font-family: monospace; letter-spacing: 0.15em; font-size: 0.85rem; }
#modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 50;
    align-items: center; justify-content: center; padding: 1rem;
}
#modal-overlay.active { display: flex; }
.fila-paisano { cursor: pointer; }
.fila-paisano:hover td { background: #fce2e4; }

/* -- Panel escaneo QR -- */
#video-container {
    position: relative; width: 100%;
    aspect-ratio: 1/1; overflow: hidden;
    border-radius: var(--radius-md); background: #000;
}
#video  { width: 100%; height: 100%; object-fit: cover; }
#canvas { display: none; }
.viewfinder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.viewfinder-box {
    width: 65%; aspect-ratio: 1/1;
    border: 3px solid rgba(255,255,255,0.85);
    border-radius: 12px;
    box-shadow: 0 0 0 2000px rgba(0,0,0,0.45);
}
.corner { position: absolute; width: 22px; height: 22px; border-color: #bb4433; border-style: solid; border-width: 0; }
.corner-tl { top: -2px;    left: -2px;  border-top-width: 4px;    border-left-width: 4px;  border-radius: 6px 0 0 0; }
.corner-tr { top: -2px;    right: -2px; border-top-width: 4px;    border-right-width: 4px; border-radius: 0 6px 0 0; }
.corner-bl { bottom: -2px; left: -2px;  border-bottom-width: 4px; border-left-width: 4px;  border-radius: 0 0 0 6px; }
.corner-br { bottom: -2px; right: -2px; border-bottom-width: 4px; border-right-width: 4px; border-radius: 0 0 6px 0; }
.scan-line {
    position: absolute; left: 5%; right: 5%; height: 2px;
    background: linear-gradient(90deg, transparent, #bb4433, transparent);
    animation: scanline 2s ease-in-out infinite; border-radius: 2px;
}
