/* ============================================================
   PASAPORTE QUANTIKO – Estilos Globales
   Versión: 2.0 (Full)
   ============================================================ */

/* ===== 1. VARIABLES CSS ===== */
:root {
    --dorado: #FFD700;
    --dorado-oscuro: #B8860B;
    --cuantico: #00E5FF;
    --rosa: #FF1493;
    --rosa-claro: #FF69B4;
    --fondo-oscuro: #0a0a1a;
    --fondo-oscuro2: #0d1b2a;
    --fondo-oscuro3: #0b1424;
    --texto-claro: #e0e0e0;
    --texto-oscuro: #1a1a2e;
    --blanco: #ffffff;
    --negro: #000000;
    --fuente-titulo: 'Orbitron', monospace;
    --fuente-nombre: 'Playfair Display', serif;
    --fuente-cuerpo: 'Montserrat', sans-serif;
    --sombra-dorada: 0 0 30px rgba(255, 215, 0, 0.6);
    --sombra-rosa: 0 0 30px rgba(255, 20, 147, 0.3);
    --sombra-neon: 0 0 15px #00E5FF, 0 0 30px #00E5FF;
    --transition-rapida: 0.3s ease;
    --transition-media: 0.6s ease;
    --border-radius-base: 18px;
    --border-radius-small: 10px;
    --border-radius-button: 25px;
}

/* ===== 2. RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: var(--fuente-cuerpo);
    background: var(--fondo-oscuro);
    color: var(--texto-claro);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background: linear-gradient(160deg, var(--fondo-oscuro) 0%, var(--fondo-oscuro2) 40%, var(--fondo-oscuro3) 100%);
    background-attachment: fixed;
}

/* ===== 3. ANIMACIONES GLOBALES ===== */
@keyframes ticker-scroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

@keyframes goldShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 20, 147, 0.8), inset 0 0 20px rgba(255, 20, 147, 0.1); }
    50% { box-shadow: 0 0 40px rgba(255, 20, 147, 1), inset 0 0 40px rgba(255, 20, 147, 0.3); }
}

@keyframes loaderFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes orbitSpin1 {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes orbitSpin2 {
    0% { transform: translate(-50%, -50%) rotate(60deg); }
    100% { transform: translate(-50%, -50%) rotate(420deg); }
}
@keyframes orbitSpin3 {
    0% { transform: translate(-50%, -50%) rotate(120deg); }
    100% { transform: translate(-50%, -50%) rotate(480deg); }
}

@keyframes atomFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes nucleusPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

@keyframes energyExpand {
    0% { width: 10px; height: 10px; opacity: 1; }
    100% { width: 200px; height: 200px; opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== 4. INTRO CUÁNTICA ===== */
#intro-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, #0a0a0a 0%, #000 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
}

#intro-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
}

#intro-overlay .grid-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,229,255,0.05) 2px, rgba(0,229,255,0.05) 4px);
    pointer-events: none;
    z-index: 2;
}

#intro-overlay .grid-dots {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(0,229,255,0.1) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0,229,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridPulse 3s ease-in-out infinite;
    z-index: 2;
}

#intro-overlay .intro-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

#intro-overlay .atom-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
    animation: atomFloat 2.5s ease-in-out infinite;
}

#intro-overlay .nucleus {
    width: 28px;
    height: 28px;
    background: radial-gradient(circle at 30% 30%, #fff, var(--rosa) 40%, #8B0000);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--rosa), 0 0 30px var(--rosa-claro);
    z-index: 5;
    animation: nucleusPulse 1.5s ease-in-out infinite;
}

#intro-overlay .orbit {
    position: absolute;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1.5px solid rgba(255, 215, 0, 0.6);
}

#intro-overlay .orbit-1 {
    width: 130px;
    height: 55px;
    animation: orbitSpin1 2.5s linear infinite;
}
#intro-overlay .orbit-2 {
    width: 160px;
    height: 48px;
    transform: translate(-50%, -50%) rotate(60deg);
    border-color: rgba(0, 229, 255, 0.6);
    animation: orbitSpin2 3.5s linear infinite;
}
#intro-overlay .orbit-3 {
    width: 180px;
    height: 65px;
    transform: translate(-50%, -50%) rotate(120deg);
    border-color: rgba(255, 105, 180, 0.6);
    animation: orbitSpin3 4s linear infinite;
}

#intro-overlay .electron {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
}
#intro-overlay .orbit-1 .electron { background: var(--dorado); box-shadow: 0 0 12px var(--dorado); }
#intro-overlay .orbit-2 .electron { background: var(--cuantico); box-shadow: 0 0 12px var(--cuantico); }
#intro-overlay .orbit-3 .electron { background: var(--rosa-claro); box-shadow: 0 0 12px var(--rosa-claro); }

#intro-overlay .energy-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.5);
    animation: energyExpand 2s ease-out infinite;
}
#intro-overlay .energy-ring:nth-child(2) { animation-delay: 0.7s; }
#intro-overlay .energy-ring:nth-child(3) { animation-delay: 1.4s; }

#intro-overlay .intro-title {
    font-family: var(--fuente-titulo);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 8px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--dorado) 0%, #FFC107 30%, #FF8C00 60%, var(--dorado) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShimmer 2s ease-in-out infinite;
}

#intro-overlay .intro-sub {
    font-size: 0.6rem;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
}

#intro-overlay .intro-badge {
    display: inline-block;
    margin-top: 14px;
    padding: 7px 22px;
    font-family: var(--fuente-titulo);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--rosa);
    border: 2px solid var(--rosa);
    border-radius: 30px;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.8), inset 0 0 20px rgba(255, 20, 147, 0.1);
    animation: badgePulse 2s ease-in-out infinite;
}

#intro-overlay .progress-bar {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    z-index: 10;
    text-align: center;
}

#intro-overlay .progress-track {
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

#intro-overlay .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rosa), var(--dorado), var(--cuantico));
    animation: loaderFill 4s ease forwards;
}

#intro-overlay .progress-label {
    font-family: var(--fuente-titulo);
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
}

#intro-overlay .skip-btn {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: 1px solid rgba(255, 215, 0, 0.5);
    color: rgba(255, 215, 0, 0.7);
    padding: 6px 20px;
    border-radius: 20px;
    font-family: var(--fuente-titulo);
    font-size: 0.65rem;
    cursor: pointer;
    z-index: 20;
    transition: var(--transition-rapida);
}
#intro-overlay .skip-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    color: var(--dorado);
}

/* ===== 5. LOGIN / REGISTRO ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.modal-panel {
    max-width: 420px;
    width: 92%;
    background: rgba(10, 10, 20, 0.95);
    padding: 30px 25px;
    border-radius: var(--border-radius-base);
    border: 2px solid var(--dorado);
    box-shadow: var(--sombra-dorada), 0 0 60px rgba(255, 20, 147, 0.2);
    animation: slideInUp 0.4s ease;
}

.modal-title {
    font-family: var(--fuente-nombre);
    font-size: 1.3rem;
    color: var(--dorado);
    margin-bottom: 20px;
    text-align: center;
}

.modal-panel input,
.modal-panel select {
    padding: 12px 16px;
    border: 1.5px solid var(--dorado);
    border-radius: var(--border-radius-small);
    background: #1a1a2e;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    width: 100%;
    transition: var(--transition-rapida);
}
.modal-panel input:focus,
.modal-panel select:focus {
    border-color: var(--cuantico);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

.modal-panel .btn-login {
    padding: 14px;
    border: none;
    border-radius: var(--border-radius-button);
    background: linear-gradient(135deg, var(--dorado), #FFC107);
    color: #000;
    font-weight: 700;
    font-family: var(--fuente-titulo);
    font-size: 0.9rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: var(--transition-rapida);
}
.modal-panel .btn-login:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
}

.modal-panel .btn-register {
    padding: 14px;
    border: none;
    border-radius: var(--border-radius-button);
    background: linear-gradient(135deg, var(--rosa), var(--rosa-claro));
    color: #fff;
    font-weight: 700;
    font-family: var(--fuente-titulo);
    font-size: 0.9rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: var(--transition-rapida);
}
.modal-panel .btn-register:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(255, 20, 147, 0.5);
}

.modal-panel .toggle-link {
    color: var(--dorado);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition-rapida);
}
.modal-panel .toggle-link:hover {
    text-decoration: underline;
    color: var(--cuantico);
}

.modal-panel .error-msg {
    color: #e74c3c;
    font-size: 0.75rem;
    text-align: center;
    padding: 8px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
}

/* ===== 6. APP LAYOUT ===== */
#app {
    display: none;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

/* ===== 7. TICKER ===== */
.ticker-bar {
    height: 26px;
    background: rgba(10, 10, 20, 0.95);
    border-bottom: 1px solid var(--dorado);
    display: flex;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

.ticker-content {
    display: flex;
    gap: 24px;
    animation: ticker-scroll 45s linear infinite;
    white-space: nowrap;
    padding: 0 12px;
    font-family: var(--fuente-titulo);
    font-size: 7px;
    font-weight: bold;
    color: #fff;
}

/* ===== 8. HEADER ===== */
header {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: rgba(10, 10, 20, 0.95);
    border-bottom: 1px solid var(--dorado);
    flex-shrink: 0;
}

header .brand {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
header .brand span:first-child { font-size: 1.2rem; }
header .brand span:last-child {
    font-family: var(--fuente-titulo);
    font-size: 0.75rem;
    color: var(--dorado);
    font-weight: 700;
}

#onlineStats {
    font-family: var(--fuente-titulo);
    font-size: 0.6rem;
    color: var(--dorado);
}

#perm-id {
    font-family: var(--fuente-titulo);
    font-size: 0.6rem;
    color: var(--dorado);
    background: rgba(255, 215, 0, 0.08);
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid var(--dorado);
}

/* ===== 9. BADGES BAR ===== */
.badges-bar {
    height: 40px;
    background: rgba(10, 10, 20, 0.9);
    border-bottom: 1px solid var(--dorado);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    overflow-x: auto;
    padding: 0 10px;
}

.badge-item {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: var(--fuente-titulo);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
    color: var(--dorado);
    white-space: nowrap;
}

/* ===== 10. CÓDIGOS FLOTANTES ===== */
.draggable-float {
    position: fixed;
    background: rgba(10, 10, 20, 0.9);
    color: var(--dorado);
    padding: 4px 10px;
    border-radius: 12px;
    font-family: var(--fuente-titulo);
    font-weight: 700;
    font-size: 0.65rem;
    border: 1px solid var(--dorado);
    z-index: 1500;
    cursor: grab;
    user-select: none;
}
.draggable-float:active {
    cursor: grabbing;
}

#sessionCodeFloat {
    bottom: 60px;
    left: 16px;
    font-size: 0.9rem;
    padding: 6px 12px;
    border: 2px solid var(--dorado);
}

#device-id-float {
    top: 10px;
    right: 10px;
}

/* ===== 11. vCARD ===== */
.vcard-wrapper {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    border-radius: var(--border-radius-base);
    box-shadow: var(--sombra-dorada), 0 0 60px rgba(255, 20, 147, 0.2);
    cursor: pointer;
    min-height: 600px;
}

.vcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius-base);
    border: 2.5px solid var(--dorado);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: linear-gradient(135deg, var(--fondo-oscuro2), #111827, var(--fondo-oscuro3));
    overflow-y: auto;
}

.face-front { transform: rotateY(0deg); }
.face-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--fondo-oscuro2), #111827, var(--fondo-oscuro3));
}

/* Colores dinámicos de recuadro y rombo */
.recuadro-color {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    background: var(--dorado);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: none;
    z-index: 8;
}

.rombo-color {
    position: absolute;
    top: 10px;
    left: 36px;
    width: 16px;
    height: 16px;
    transform: rotate(45deg);
    background: var(--rosa);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: none;
    z-index: 8;
}

/* Badge verificado */
.badge-verificado {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0055ff;
    border: 1.5px solid #fff;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
}

/* Device ID en vCard */
.device-id-vcard {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--dorado);
    padding: 2px 6px;
    border-radius: 8px;
    font-family: var(--fuente-titulo);
    font-size: 0.55rem;
    border: 1px solid var(--dorado);
}

/* Logo país */
.logo-pais-container {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    cursor: pointer;
}
.logo-pais {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 2px solid var(--dorado);
}
.logo-pais-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    border: 2px dashed var(--dorado);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}

/* Foto de perfil (avatar) */
.profile-circle {
    width: 160px;
    height: 160px;
    border-radius: 10px;
    perspective: 800px;
    cursor: pointer;
    margin-bottom: 10px;
    background: var(--fondo-oscuro2);
    border: 2px solid var(--dorado);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    flex-shrink: 0;
    overflow: hidden;
}

.profile-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.profile-img, .profile-qr {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}
.profile-img img, .profile-qr img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-qr {
    transform: rotateY(180deg);
    background: #fff;
}

/* Campos de texto en vCard */
.nombre {
    font-family: var(--fuente-nombre);
    font-size: 1.1rem;
    color: #fff;
    text-align: center;
    margin: 4px 0;
    font-weight: 700;
}

.cargo {
    color: #FFFF00;
    font-weight: bold;
    text-shadow: 0 0 10px #FFFF00;
    font-size: 0.7rem;
    background: rgba(255, 255, 0, 0.15);
    padding: 4px 12px;
    border-radius: 14px;
    border: 1px solid #FFFF00;
    margin-bottom: 8px;
    text-align: center;
}

.rol-nivel {
    font-family: var(--fuente-titulo);
    font-size: 0.6rem;
    color: #aaa;
    text-align: center;
    margin-bottom: 6px;
}
.rol-nivel span {
    color: var(--dorado);
    font-weight: 700;
}

.bono-box {
    font-family: var(--fuente-titulo);
    font-size: 0.9rem;
    font-weight: 900;
    color: #00C853;
    background: rgba(0, 200, 83, 0.1);
    padding: 5px 14px;
    border-radius: 12px;
    border: 1px solid #00C853;
    margin-bottom: 6px;
    display: none;
}

.saldo-qtx {
    font-family: var(--fuente-titulo);
    font-size: 0.65rem;
    color: #ccc;
    text-align: center;
    margin-bottom: 10px;
}
.saldo-qtx span {
    color: var(--dorado);
    font-weight: 700;
}

/* Botones grid */
.botones-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    width: 100%;
    margin-top: auto;
}

.btn-q {
    padding: 8px 4px;
    border: 1.5px solid var(--dorado);
    border-radius: var(--border-radius-small);
    background: rgba(255, 215, 0, 0.05);
    color: var(--dorado);
    font-family: var(--fuente-titulo);
    font-size: 0.55rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-rapida);
    text-align: center;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 0 rgba(255, 215, 0, 0.2);
}
.btn-q:hover {
    background: rgba(255, 215, 0, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}
.btn-q:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 rgba(255, 215, 0, 0.3);
}
.btn-q.btn-grande {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border-color: var(--dorado);
}

.info-extra {
    font-size: 0.55rem;
    color: #ccc;
    text-align: center;
    margin-top: 8px;
    width: 100%;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    padding-top: 6px;
}

/* Datos reverso */
.datos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    font-size: 0.7rem;
    color: #ccc;
    margin-bottom: 10px;
}
.datos-grid > div {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}
.datos-grid strong {
    color: #fff;
    font-size: 0.6rem;
}
.datos-grid .dni-neon {
    color: #FFFF00;
    text-shadow: 0 0 5px #FFFF00, 0 0 10px #FFFF00, 0 0 20px #FFAA00, 0 0 40px #FFAA00;
    font-weight: 900;
}

/* Huella, firma, hash en reverso */
.quantika-hash {
    font-family: var(--fuente-titulo);
    font-size: 0.5rem;
    color: var(--cuantico);
    word-break: break-all;
    text-align: center;
    padding: 2px 0;
}

/* Código de barras */
#barcodeCanvas {
    width: 100%;
    max-width: 200px;
    margin-top: 10px;
    filter: invert(1);
    min-height: 50px;
}

/* ===== 12. MÉTRICAS BAR (FOOTER) ===== */
.metrics-bar {
    height: 44px;
    background: rgba(10, 10, 20, 0.95);
    border-top: 2px solid var(--dorado);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
    font-family: var(--fuente-titulo);
    font-size: 0.55rem;
    color: var(--dorado);
    flex-shrink: 0;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.metric-value {
    font-weight: 700;
    font-size: 0.7rem;
}
.metric-label {
    font-size: 0.45rem;
    opacity: 0.7;
}

/* ===== 13. BOTONES FLOTANTES ===== */
.floating-btn {
    position: fixed;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--fondo-oscuro2);
    border: 2px solid var(--dorado);
    color: var(--dorado);
    cursor: pointer;
    z-index: 1500;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-rapida);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}
.floating-btn:active {
    transform: scale(0.95);
}

/* Posiciones específicas */
.floating-btn-analytics { right: 16px; bottom: 100px; }
.floating-btn-ai { right: 16px; bottom: 150px; border-color: var(--rosa); color: var(--rosa); }
.floating-btn-ceo { right: 16px; bottom: 200px; border-color: #ff6600; color: #ff6600; }
.floating-btn-chat { right: 16px; bottom: 250px; border-color: #00C853; color: #00C853; }

/* ===== 14. MODALES ===== */
.logo-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}
.logo-modal.active {
    display: flex;
}

.logo-modal-content {
    background: var(--fondo-oscuro2);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid var(--dorado);
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideInUp 0.4s ease;
}
.logo-modal-content h3 {
    font-family: var(--fuente-titulo);
    color: var(--dorado);
    margin-bottom: 20px;
}
.logo-modal-content input,
.logo-modal-content button {
    margin: 10px 0;
    padding: 10px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--dorado);
    background: #1a1a2e;
    color: #fff;
}
.logo-modal-content button {
    background: var(--dorado);
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-rapida);
}
.logo-modal-content button:hover {
    background: #ffed4a;
}
.logo-modal-content button[type="button"] {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}
.logo-modal-content button[type="button"]:hover {
    background: #c0392b;
}

/* ===== 15. TOASTS / NOTIFICACIONES ===== */
.toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 90%;
    pointer-events: none;
}

.toast {
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--fuente-cuerpo);
    font-weight: bold;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: slideInUp 0.3s ease;
    pointer-events: auto;
    margin-bottom: 8px;
}
.toast-info { background: #2ecc71; color: #fff; }
.toast-warning { background: #f39c12; color: #fff; }
.toast-error { background: #e74c3c; color: #fff; }

/* ===== 16. PANEL CEO (estilos incrustados en el HTML, pero algunos adicionales) ===== */
.ceo-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
    display: none;
}
.ceo-panel-overlay.active {
    display: block;
}

.ceo-panel-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding-top: 60px;
}

.ceo-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--fuente-titulo);
    z-index: 2100;
}

.ceo-header-btn {
    background: #ff6600;
    color: #fff;
    border: none;
    padding: 4px 12px;
    border-radius: 12px;
    font-family: var(--fuente-titulo);
    cursor: pointer;
    font-size: 0.75rem;
}

/* ===== 17. RESPONSIVE ===== */
@media (max-width: 768px) {
    .vcard-wrapper {
        max-width: 100%;
        min-height: 520px;
    }
    .vcard-face {
        padding: 12px 10px;
    }
    .profile-circle {
        width: 120px;
        height: 120px;
    }
    .nombre {
        font-size: 0.95rem;
    }
    .cargo {
        font-size: 0.6rem;
    }
    .botones-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
    .btn-q {
        font-size: 0.5rem;
        padding: 6px 2px;
    }
    .datos-grid {
        font-size: 0.6rem;
        gap: 4px;
    }
    .datos-grid > div {
        padding: 4px 6px;
    }
    .metrics-bar {
        font-size: 0.45rem;
        padding: 0 4px;
    }
    .metric-value {
        font-size: 0.6rem;
    }
    .floating-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .floating-btn-analytics { bottom: 80px; }
    .floating-btn-ai { bottom: 125px; }
    .floating-btn-ceo { bottom: 170px; }
    .floating-btn-chat { bottom: 215px; }
    #sessionCodeFloat {
        font-size: 0.7rem;
        padding: 4px 10px;
        bottom: 50px;
        left: 10px;
    }
    #device-id-float {
        font-size: 0.5rem;
        padding: 2px 8px;
        top: 6px;
        right: 6px;
    }
    .logo-pais, .logo-pais-placeholder {
        width: 32px;
        height: 32px;
    }
    .modal-panel {
        padding: 20px 16px;
    }
    .modal-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .vcard-wrapper {
        min-height: 480px;
    }
    .profile-circle {
        width: 100px;
        height: 100px;
    }
    .nombre {
        font-size: 0.85rem;
    }
    .btn-q {
        font-size: 0.45rem;
        padding: 4px 2px;
    }
    .datos-grid {
        grid-template-columns: 1fr 1fr;
        font-size: 0.55rem;
    }
    .datos-grid > div {
        padding: 3px 5px;
    }
    .metrics-bar {
        font-size: 0.4rem;
    }
    .metric-value {
        font-size: 0.5rem;
    }
    .floating-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
    .floating-btn-analytics { bottom: 70px; right: 10px; }
    .floating-btn-ai { bottom: 110px; right: 10px; }
    .floating-btn-ceo { bottom: 150px; right: 10px; }
    .floating-btn-chat { bottom: 190px; right: 10px; }
}

/* ===== 18. UTILIDADES ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: var(--dorado);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--dorado-oscuro);
}

/* ===== 19. ESTILOS DE GÉNERO PARA vCARD ===== */
/* Se aplicarán dinámicamente con JS, pero dejamos los estilos base */
.vcard-femenino {
    background: linear-gradient(135deg, #4a0e2a, #6a1a3a, #3a0a1a) !important;
    border-color: var(--rosa) !important;
}
.vcard-masculino {
    background: linear-gradient(135deg, #0a1a3a, #0d2a4a, #0a1a2a) !important;
    border-color: var(--cuantico) !important;
}

/* ===== 20. NOTIFICACIONES PUSH EN HEADER ===== */
.notification-badge {
    position: relative;
    display: inline-block;
}
.notification-badge .badge-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    padding: 1px 5px;
    font-size: 0.5rem;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
    border: 1px solid #fff;
}

/* ===== 21. EFECTO NEÓN PARA DNI ===== */
.dni-neon {
    color: #FFFF00;
    text-shadow: 0 0 5px #FFFF00, 0 0 10px #FFFF00, 0 0 20px #FFAA00, 0 0 40px #FFAA00;
    font-weight: 900;
}

/* ===== 22. ESTILOS PARA EL TEMA DÍA/NOCHE ===== */
body.modo-dia {
    background: #ffffff !important;
    color: #1a1a2e !important;
}
body.modo-dia .vcard-face {
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0, #d0d0d0) !important;
    border-color: #333 !important;
}
body.modo-dia .nombre {
    color: #1a1a2e !important;
}
body.modo-dia .cargo {
    color: #000 !important;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3) !important;
}
body.modo-dia .saldo-qtx {
    color: #333 !important;
}
body.modo-dia .btn-q {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #333 !important;
    border-color: #333 !important;
}
body.modo-dia .btn-q:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}
body.modo-dia .metrics-bar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-top-color: #333 !important;
    color: #333 !important;
}
body.modo-dia .ticker-bar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: #333 !important;
}
body.modo-dia header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: #333 !important;
}
body.modo-dia .badges-bar {
    background: rgba(255, 255, 255, 0.9) !important;
    border-bottom-color: #333 !important;
}
body.modo-dia .badge-item {
    color: #333 !important;
    border-color: #333 !important;
}
body.modo-dia #onlineStats {
    color: #333 !important;
}
body.modo-dia #perm-id {
    color: #333 !important;
    border-color: #333 !important;
}
body.modo-dia .recuadro-color {
    border-color: rgba(0, 0, 0, 0.3) !important;
}
body.modo-dia .rombo-color {
    border-color: rgba(0, 0, 0, 0.3) !important;
}
body.modo-dia .device-id-vcard {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #333 !important;
    border-color: #333 !important;
}
body.modo-dia .datos-grid > div {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
}
body.modo-dia .datos-grid strong {
    color: #333 !important;
}
body.modo-dia .info-extra {
    color: #333 !important;
    border-top-color: rgba(0, 0, 0, 0.1) !important;
}
body.modo-dia .bono-box {
    color: #005500 !important;
    border-color: #005500 !important;
    background: rgba(0, 200, 83, 0.1) !important;
}
body.modo-dia .quantika-hash {
    color: #0055aa !important;
}
body.modo-dia .floating-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: #333 !important;
    color: #333 !important;
}
body.modo-dia .floating-btn-ai {
    border-color: var(--rosa) !important;
    color: var(--rosa) !important;
}
body.modo-dia .floating-btn-ceo {
    border-color: #ff6600 !important;
    color: #ff6600 !important;
}
body.modo-dia .floating-btn-chat {
    border-color: #00C853 !important;
    color: #00C853 !important;
}
body.modo-dia .logo-pais {
    border-color: #333 !important;
}
body.modo-dia .logo-pais-placeholder {
    border-color: #333 !important;
}

/* ===== 23. ESTILOS PARA INSIGNIAS ===== */
.insignia {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-family: var(--fuente-titulo);
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid transparent;
}
.insignia-oro {
    background: linear-gradient(135deg, #FFD700, #FFC107);
    color: #000;
    border-color: #B8860B;
}
.insignia-plata {
    background: linear-gradient(135deg, #C0C0C0, #A9A9A9);
    color: #000;
    border-color: #808080;
}
.insignia-bronce {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    color: #fff;
    border-color: #8B4513;
}
.insignia-diamante {
    background: linear-gradient(135deg, #B9F2FF, #00E5FF);
    color: #000;
    border-color: #0097A7;
}
.insignia-platino {
    background: linear-gradient(135deg, #E5E4E2, #C0C0C0);
    color: #000;
    border-color: #808080;
}