/* ============================================
   JJLAB PREMIUM DESIGN SYSTEM
   Dark theme + Gold accents + Glassmorphism
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #020e24;
    --bg-secondary: #051a38;
    --bg-card: rgba(3, 25, 54, 0.65);
    --bg-card-hover: rgba(3, 35, 75, 0.75);
    --bg-glass: rgba(2, 24, 52, 0.7);
    --border-glass: rgba(2, 132, 199, 0.25);

    --accent-cyan: #38bdf8;
    --accent-blue: #0284c7;

    --gold-primary: #0284c7;
    --gold-light: #38bdf8;
    --gold-dark: #0369a1;
    --gold-gradient: linear-gradient(135deg, #0284c7, #38bdf8, #0369a1);
    --gold-glow: rgba(2, 132, 199, 0.35);

    --text-primary: #f0f6fc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --success: #34d399;
    --success-dark: #059669;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(ellipse at 30% 30%, #0b407a 0%, #05244c 45%, #020e24 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(2, 132, 199, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(15, 23, 42, 0.4) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   VISTAS SPA
   ============================================ */
.view-container {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#login-view {
    justify-content: center;
}

/* ============================================
   PANTALLA DE LOGIN
   ============================================ */
.login-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    padding: 55px 45px;
    border-radius: var(--radius-lg);
    text-align: center;
    width: 90%;
    max-width: 460px;
    animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Gold shimmer line on top of card */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold-gradient);
}

.login-card h1 {
    font-size: 1.8em;
    font-weight: 600;
    letter-spacing: 3px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.login-card .brand-subtitle {
    font-size: 0.75em;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.login-card p {
    color: var(--text-secondary);
    font-size: 1em;
    margin-bottom: 35px;
    line-height: 1.6;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.3em;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: var(--text-muted);
    font-size: 0.7em;
    letter-spacing: 2px;
    font-weight: 300;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--accent-cyan, var(--gold-primary));
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
    outline: none;
    background: rgba(6, 182, 212, 0.05);
}

/* Primary button */
.btn-primary {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.05em;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
    color: #0a0a0f;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--gold-glow);
}

.btn-primary:hover::after {
    left: 100%;
}

.flash-error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 0.9em;
}

/* ============================================
   HEADER DE GALERÍA
   ============================================ */
.gallery-header {
    width: 100%;
    max-width: 1280px;
    padding: 20px 30px;
    margin: 20px auto 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
}

.header-titles h2 {
    font-size: 1.4em;
    font-weight: 600;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: right;
    margin-bottom: 4px;
}

.header-titles p {
    color: var(--text-secondary);
    font-weight: 500;
    text-align: right;
    font-size: 0.9em;
    letter-spacing: 1px;
}

.btn-back {
    width: auto;
    padding: 10px 22px;
    font-size: 0.95em;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transform: translateX(-3px);
    border-color: var(--gold-primary);
}

/* ============================================
   SECCIÓN "DESCARGAR TODO"
   ============================================ */
.download-all-section {
    width: 100%;
    max-width: 1280px;
    padding: 15px 20px;
    margin: 12px auto 0 auto;
}

.btn-download-all {
    width: 100%;
    padding: 18px 30px;
    font-size: 1.1em;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    color: #0a0a0f;
    background: linear-gradient(135deg, var(--success-dark), var(--success));
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 25px rgba(52, 211, 153, 0.25);
    transition: all 0.3s ease;
}

.btn-download-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(52, 211, 153, 0.35);
    background: linear-gradient(135deg, var(--success), #6ee7b7);
}

.btn-download-all:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-download-all .file-count {
    font-weight: 400;
    font-size: 0.85em;
    opacity: 0.8;
}

/* Progress bar */
.progress-container {
    margin-top: 12px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--gold-primary), var(--success));
    border-radius: 6px;
    transition: width 0.4s ease;
    box-shadow: 0 0 10px rgba(212, 168, 83, 0.4);
}

.progress-text {
    margin-top: 8px;
    font-size: 0.85em;
    color: var(--text-secondary);
    text-align: center;
}

/* ============================================
   CUADRÍCULA DE GALERÍA
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1280px;
    padding: 20px;
    margin: 0 auto;
}

.card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 168, 83, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px var(--gold-glow);
}

.media-container {
    width: 100%;
    height: 280px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.media-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover .media-container::after {
    opacity: 1;
}

.media-container img,
.media-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .media-container img,
.card:hover .media-container video {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: var(--gold-light);
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75em;
    font-weight: 600;
    letter-spacing: 1px;
    z-index: 2;
    border: 1px solid rgba(212, 168, 83, 0.2);
}

.actions {
    padding: 16px 20px;
    text-align: center;
}

.btn-download-small {
    padding: 12px;
    width: 100%;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-download-small:hover {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
    color: #0a0a0f;
    border-color: var(--gold-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--gold-glow);
}

/* ============================================
   LOADER
   ============================================ */
.loader-container {
    text-align: center;
    margin: 80px 0;
}

.loader-container p {
    color: var(--text-secondary);
    margin-top: 5px;
    font-size: 0.95em;
    letter-spacing: 1px;
}

.loader {
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top: 3px solid var(--gold-primary);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    margin: 80px auto;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3.5em;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.empty-state .hint {
    font-size: 0.9em;
    color: var(--text-muted);
}

/* ============================================
   MODAL DE VISTA PREVIA
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--text-secondary);
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1001;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.close-modal:hover {
    color: var(--gold-primary);
    background: rgba(255, 255, 255, 0.12);
}

.modal-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 20px;
}

.modal-content img,
.modal-content video {
    max-width: 90%;
    max-height: 75vh;
    border-radius: var(--radius-md);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.download-fab {
    margin-top: 25px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
    color: #0a0a0f;
    padding: 14px 35px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1em;
    letter-spacing: 1px;
    box-shadow: 0 8px 30px var(--gold-glow);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.download-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(212, 168, 83, 0.5);
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-top: 30px;
    font-size: 0.8em;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Staggered card entrance */
.card:nth-child(1) {
    animation-delay: 0.05s;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.15s;
}

.card:nth-child(4) {
    animation-delay: 0.2s;
}

.card:nth-child(5) {
    animation-delay: 0.25s;
}

.card:nth-child(6) {
    animation-delay: 0.3s;
}

.card:nth-child(7) {
    animation-delay: 0.35s;
}

.card:nth-child(8) {
    animation-delay: 0.4s;
}

.card:nth-child(9) {
    animation-delay: 0.45s;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .login-card {
        padding: 40px 25px;
    }

    .login-card h1 {
        font-size: 1.4em;
        letter-spacing: 2px;
    }

    input[type="text"] {
        font-size: 1.1em;
        padding: 14px 16px;
    }

    .gallery-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 16px 20px;
    }

    .header-titles h2,
    .header-titles p {
        text-align: center;
    }

    .btn-back {
        width: 100%;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        padding: 15px;
    }

    .btn-download-all {
        font-size: 1em;
        padding: 15px 20px;
    }
}

/* ============================================
   ESTILOS DE VISTA PREVIA BLOQUEADA (CLIENTE)
   ============================================ */
.preview-banner {
    width: 100%;
    max-width: 1280px;
    margin: 12px auto 0 auto;
    padding: 14px 20px;
    background: rgba(212, 168, 83, 0.15);
    border: 1px dashed var(--gold-primary);
    border-radius: var(--radius-md);
    color: var(--gold-light);
    font-size: 0.95em;
    text-align: center;
    box-shadow: 0 4px 15px rgba(212, 168, 83, 0.1);
}

.preview-locked .media-container {
    filter: blur(1.5px) contrast(1.05);
}

.watermark-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 1.4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
    letter-spacing: 2px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 4px;
}

.btn-locked {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}


/* ============================================
   ESTILOS DEL PANEL DE ADMINISTRACIÓN (ADMIN)
   ============================================ */
:root {
    --accent-cyan: #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.3);
    --error-red: #ef4444;
}

.audio-banner {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(6, 182, 212, 0.2);
    border: 1px dashed var(--accent-cyan);
    border-radius: var(--radius-pill);
    padding: 10px 24px;
    font-size: 0.9em;
    color: #a5f3fc;
    cursor: pointer;
    z-index: 2000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.audio-banner:hover {
    background: rgba(6, 182, 212, 0.35);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
}

/* Fondos dinámicos en validador */
body.success-bg {
    background: radial-gradient(circle at top left, #022c22 0%, #064e3b 40%, #0a0a0f 100%) !important;
}

body.error-bg {
    background: radial-gradient(circle at top left, #450a0a 0%, #7f1d1d 40%, #0a0a0f 100%) !important;
}

/* Header Admin */
.admin-header {
    width: 100%;
    max-width: 1280px;
    padding: 24px 35px;
    margin: 25px auto 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
}

.admin-header h2 {
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-cyan);
    margin-bottom: 4px;
}

#operator-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.btn-logout {
    padding: 10px 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.9em;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ff8787;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

/* Grid de administración */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 25px;
    width: 100%;
    max-width: 1280px;
    padding: 25px;
    margin: 0 auto;
}

.admin-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 35px 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    min-height: 520px;
    display: flex;
    flex-direction: column;
}

.admin-card .card-header {
    margin-bottom: 30px;
}

.admin-card h3 {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-card h3 i {
    color: var(--accent-cyan);
}

.admin-card p {
    font-size: 0.85em;
    color: var(--text-secondary);
}

/* Barcode input styling */
.barcode-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.4em;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 5px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: #fff;
    text-align: center;
    margin-bottom: 25px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.barcode-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px var(--accent-cyan-glow);
    background: rgba(6, 182, 212, 0.03);
}

.scan-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.85em;
    margin-bottom: 30px;
}

.pulsing-dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite ease-in-out;
}

@keyframes pulse-dot {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7);
    }
    70% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 0 8px rgba(6, 182, 212, 0);
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    }
}

/* Feedback de Escaneo Validador */
.scan-feedback-card {
    border-radius: var(--radius-md);
    padding: 25px;
    border: 1px solid var(--border-glass);
    text-align: center;
    animation: cardEntrance 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-feedback {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.3);
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.15);
}

.error-feedback {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.15);
}

.feedback-status {
    font-size: 1.5em;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.status-success {
    color: var(--success);
}

.status-error {
    color: var(--error-red);
}

.feedback-details {
    display: inline-block;
    min-width: 200px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 15px 20px;
}

.detail-label {
    display: block;
    font-size: 0.7em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.detail-code {
    font-size: 1.2em;
    font-family: monospace;
    font-weight: 700;
    margin-bottom: 12px;
}

.detail-nip {
    font-size: 2.2em;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--success), #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Gestor de Brazalete */
.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.search-box input[type="text"] {
    margin-bottom: 0;
    text-align: left;
    font-size: 1.05em;
    letter-spacing: 1px;
    font-weight: 400;
}

.btn-search-manual {
    padding: 0 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-search-manual:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.bracelet-info-panel {
    animation: fadeIn 0.4s ease-out;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.info-header h4 {
    font-size: 1.15em;
    font-weight: 600;
}

.badge-status {
    padding: 6px 14px;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(52, 211, 153, 0.15);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.status-inactive {
    background: rgba(212, 168, 83, 0.15);
    color: var(--gold-light);
    border: 1px solid rgba(212, 168, 83, 0.25);
}

.actions-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-action {
    width: 100%;
    padding: 14px 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95em;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-activate {
    background: linear-gradient(135deg, var(--success-dark), var(--success));
    color: #0a0a0f;
}

.btn-activate:hover {
    background: linear-gradient(135deg, var(--success), #6ee7b7);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.2);
}

.btn-deactivate {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ff8787;
}

.btn-deactivate:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-whatsapp {
    background: #25d366;
    color: #fff;
}

.btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.nip-cloud-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.nip-cloud-section span {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.nip-cloud-section strong {
    font-family: monospace;
    font-size: 1.8em;
    letter-spacing: 2px;
    color: var(--success);
}

.preview-gallery-header h5 {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
    border-top: 1px solid var(--border-glass);
    padding-top: 20px;
}

.preview-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 5px;
}

.preview-item {
    aspect-ratio: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 0.7em;
    background: rgba(0,0,0,0.6);
    padding: 1px 3px;
    border-radius: 3px;
}

.no-files-msg,
.error-msg {
    grid-column: 1 / -1;
    font-size: 0.8em;
    color: var(--text-muted);
    text-align: center;
    padding: 20px 0;
}

.loader-small {
    grid-column: 1 / -1;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-top: 2px solid var(--accent-cyan);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

/* Historial de actividad */
.history-section {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto 50px auto;
    padding: 30px;
    min-height: auto;
}

.history-section h3 {
    margin-bottom: 20px;
}

.history-table-container {
    width: 100%;
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9em;
}

.history-table th,
.history-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-glass);
}

.history-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-table td {
    color: var(--text-primary);
}

.history-table .monospaced {
    font-family: monospace;
    font-weight: 700;
    font-size: 1.1em;
}

.history-table .date-col {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.btn-table-action {
    padding: 6px 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8em;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-table-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--accent-cyan);
}

/* Responsive Admin */
@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-card {
        min-height: auto;
    }
}

/* ============================================
   ESTILOS DE CONFIGURADOR DE EVENTOS (EDICIÓN)
   ============================================ */
.configurador-section {
    min-height: auto !important;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: var(--accent-cyan);
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95em;
    font-family: 'Outfit', sans-serif;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-group select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Checkbox neón */
.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.form-group-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

.form-group-checkbox label {
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group-checkbox label i {
    color: var(--accent-cyan);
}

/* Input con botón inline */
.input-with-button {
    display: flex;
    gap: 10px;
}

.input-with-button input[type="text"] {
    margin-bottom: 0;
    text-align: left;
    font-size: 1em;
    padding: 10px 16px;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 2px;
}

.btn-secondary {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--accent-cyan);
}

/* Contenedor de checkboxes con scroll */
.checkboxes-scroll-container {
    max-height: 120px;
    overflow-y: auto;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px;
    background: rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkboxes-scroll-container label {
    font-size: 0.85em;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkboxes-scroll-container input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

/* Mensaje de estado */
.config-status-msg {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    text-align: center;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.config-status-msg.success {
    background: rgba(52, 211, 153, 0.15);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.config-status-msg.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error-red);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-save-config {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary)) !important;
    color: #0a0a0f !important;
}

.btn-save-config:hover {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light)) !important;
    box-shadow: 0 4px 15px var(--gold-glow) !important;
}

/* Hacer que la columna derecha del gestor ocupe dos filas en pantallas grandes */
@media (min-width: 901px) {
    .gestor-section {
        grid-row: span 2;
    }
}

/* Subidor de logos y stickers */
.upload-asset-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-upload {
    padding: 8px 16px !important;
    font-size: 0.85em !important;
    background: rgba(6, 182, 212, 0.1) !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
    color: #a5f3fc !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    background: rgba(6, 182, 212, 0.25) !important;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px var(--accent-cyan-glow) !important;
}

.upload-filename {
    font-size: 0.8em;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

/* ============================================
   NUEVO DISEÑO DE PESTAÑAS (TABS) PARA MÓVIL
   ============================================ */
.tabs-container {
    width: 100%;
    max-width: 750px;
    margin: 20px auto 0 auto;
    padding: 0 15px;
    z-index: 10;
}

.admin-tabs {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 6px;
    backdrop-filter: blur(10px);
}

.tab-btn {
    flex: 1;
    padding: 12px 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.tab-btn i {
    font-size: 1.05em;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(6, 182, 212, 0.4));
    border: 1px solid rgba(6, 182, 212, 0.4);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

/* Contenedor principal de contenidos de pestañas */
.admin-content-container {
    width: 100%;
    max-width: 1280px;
    padding: 0 20px;
    margin: 0 auto;
}

.tab-content {
    display: none !important;
}

.tab-content.active {
    display: flex !important;
    width: 100%;
    max-width: 750px;
    margin: 25px auto 50px auto;
    animation: cardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Ajustar las pestañas y tarjetas en móvil */
@media (max-width: 600px) {
    .admin-tabs {
        padding: 4px;
    }
    
    .tab-btn {
        font-size: 0.78em;
        padding: 10px 2px;
        gap: 4px;
    }
    
    .tab-btn i {
        font-size: 0.9em;
    }
    
    .tabs-container {
        padding: 0 10px;
    }
    
    .admin-content-container {
        padding: 0 10px;
    }

    .tab-content.active {
        margin: 15px auto 40px auto;
        padding: 25px 20px;
    }
}

/* Estilos de botones de compartir (row) */
.btn-copy-link {
    background: rgba(6, 182, 212, 0.15) !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
    color: #a5f3fc !important;
}

.btn-copy-link:hover {
    background: rgba(6, 182, 212, 0.25) !important;
    box-shadow: 0 0 10px var(--accent-cyan-glow) !important;
}

.btn-show-qr {
    background: rgba(212, 168, 83, 0.15) !important;
    border: 1px solid rgba(212, 168, 83, 0.3) !important;
    color: var(--gold-light) !important;
}

.btn-show-qr:hover {
    background: rgba(212, 168, 83, 0.25) !important;
    box-shadow: 0 0 10px var(--gold-glow) !important;
}

/* Ajustes de botones de compartir en móvil */
@media (max-width: 480px) {
    .share-buttons-row {
        flex-direction: column;
        gap: 8px !important;
    }
}

/* ============================================
   ESTILOS MULTI-CLIENTE (UBICACIONES/CENOTES)
   ============================================ */
#client-selector-container {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    padding: 6px 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

#client-select {
    border: none !important;
    background: transparent !important;
    font-weight: 600;
    color: var(--accent-cyan) !important;
    padding-right: 5px !important;
    font-size: 0.95em;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    outline: none;
}

#client-select option {
    background: #0b0f19;
    color: #fff;
    padding: 10px;
}

.clientes-section form input:focus {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px var(--accent-cyan-glow) !important;
}

.clientes-section form label {
    display: block;
    font-size: 0.8em;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* ============================================
   RESPONSIVE IMPROVEMENTS FOR ADMIN PANEL
   ============================================ */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        padding: 20px 15px !important;
        margin: 15px 10px 0 10px !important;
        width: calc(100% - 20px) !important;
        text-align: center;
    }
    
    .admin-header .header-titles {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .admin-header .header-brand-container {
        flex-direction: column;
        justify-content: center;
        gap: 8px !important;
        margin-bottom: 8px !important;
    }
    
    .admin-header .header-titles > div:nth-child(2) {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: center !important;
    }
    
    .admin-header .header-actions {
        display: flex !important;
        width: 100% !important;
        gap: 10px !important;
    }

    #tv-slideshow-btn,
    #logout-btn {
        flex: 1;
        justify-content: center;
        margin: 0 !important;
        font-size: 0.8em !important;
        padding: 10px 8px !important;
        white-space: nowrap;
    }

    .audio-banner {
        font-size: 0.75em !important;
        padding: 8px 16px !important;
        width: 90% !important;
        text-align: center;
    }
}

/* ============================================
   ESTILOS DE COMPARTIDO NATIVO Y SELECCIÓN
   ============================================ */
.btn-share-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(16, 185, 129, 0.85);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.btn-share-overlay:hover {
    background: #059669;
    transform: scale(1.1);
}

.btn-share-overlay:disabled {
    background: rgba(152, 152, 168, 0.5);
    cursor: not-allowed;
    transform: none;
}

.preview-select-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #10b981;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    outline: none;
    transition: transform 0.2s ease;
    z-index: 10;
}

.preview-select-checkbox:hover {
    transform: scale(1.15);
}

/* Borde brillante de selección */
.preview-item.selected {
    border: 2px solid #10b981 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3) !important;
}