/* LF Conecta — Mobile first, experiencia NFC */
:root {
    --primary: #8b5cf6;
    --primary-deep: #6d28d9;
    --primary-soft: #c4b5fd;
    --accent: #f0abfc;
    --success: #34d399;
    --danger: #fb7185;
    --warning: #fbbf24;
    --bg: #0c0618;
    --card: rgba(28, 16, 48, 0.72);
    --text: #faf5ff;
    --muted: #c4b5fd;
    --border: rgba(167, 139, 250, 0.22);
    --radius: 20px;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    min-height: 100%;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

.page-home, .bg-gradient {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(124, 58, 237, 0.35), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(192, 38, 211, 0.2), transparent 50%),
        linear-gradient(165deg, #12081f 0%, #0c0618 45%, #160a2a 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.bg-orbs { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.45; }
.orb-1 { width: 280px; height: 280px; background: #7c3aed; top: -80px; left: -60px; }
.orb-2 { width: 220px; height: 220px; background: #db2777; bottom: 10%; right: -80px; opacity: 0.25; }
.orb-3 { width: 160px; height: 160px; background: #4f46e5; bottom: -40px; left: 30%; opacity: 0.2; }

.app-container {
    position: relative;
    z-index: 1;
    max-width: 440px;
    margin: 0 auto;
    padding: 1rem 1.1rem 3.5rem;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0 1rem;
}
.logo { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; }
.logo span {
    background: linear-gradient(90deg, var(--primary-soft), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.user-chip {
    display: flex; align-items: center; gap: 0.4rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--muted);
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    flex-shrink: 0;
}

.hero-nfc { text-align: center; padding: 0.5rem 0 1.25rem; }
.nfc-ring-wrap { position: relative; width: 140px; height: 140px; margin: 0 auto 1.1rem; }
.nfc-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 1.5px solid rgba(167, 139, 250, 0.35);
    animation: nfcPulse 2.4s ease-out infinite;
}
.ring-b { inset: 12px; animation-delay: 0.4s; border-color: rgba(240, 171, 252, 0.3); }
.ring-c { inset: 24px; animation-delay: 0.8s; border-color: rgba(139, 92, 246, 0.45); }
.nfc-core {
    position: absolute; inset: 36px; border-radius: 50%;
    background: linear-gradient(145deg, #7c3aed, #a21caf);
    display: flex; align-items: center; justify-content: center;
    color: white;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.5);
}
.nfc-icon { width: 36px; height: 36px; }
@keyframes nfcPulse {
    0% { transform: scale(0.85); opacity: 0.9; }
    100% { transform: scale(1.15); opacity: 0; }
}
.nfc-badge {
    display: inline-block;
    font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--primary-soft);
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid var(--border);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}
.hero-nfc h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.45rem; }
.hero-sub { color: var(--muted); font-size: 0.95rem; max-width: 32ch; margin: 0 auto; }

.card, .glass {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-bottom: 1rem;
}

.step-pills { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.step-pill {
    font-size: 0.72rem; font-weight: 600;
    padding: 0.3rem 0.65rem; border-radius: 999px;
    background: rgba(255,255,255,0.05); color: var(--muted);
}
.step-pill.active { background: rgba(139, 92, 246, 0.25); color: var(--primary-soft); }

.tabs {
    display: flex; gap: 0.35rem; margin-bottom: 1rem;
    background: rgba(0,0,0,0.25); padding: 0.3rem; border-radius: 14px;
}
.tab {
    flex: 1; background: transparent; border: none; color: var(--muted);
    padding: 0.55rem 0.25rem; border-radius: 10px;
    font-size: 0.72rem; font-weight: 600; font-family: inherit; cursor: pointer;
}
.tab.active {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: white;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

.label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.4rem; font-weight: 500; }
.input, select.input, textarea.input {
    width: 100%;
    background: rgba(8, 4, 18, 0.65);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 0.75rem;
    outline: none;
}
.input-lg { font-size: 1.15rem; letter-spacing: 0.04em; text-align: center; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    border: none; border-radius: 14px;
    padding: 0.85rem 1.2rem;
    font-size: 0.95rem; font-weight: 700; font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #c026d3);
    color: white;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}
.btn-block { width: 100%; }
.btn-lg { padding: 1rem 1.2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.5rem 0.85rem; font-size: 0.8rem; border-radius: 10px; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary-soft); }
.btn-text { background: transparent; color: var(--muted); width: 100%; margin-top: 0.35rem; }

.upload-zone {
    display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
    border: 1.5px dashed var(--border); border-radius: 16px;
    padding: 1.75rem 1rem; cursor: pointer; color: var(--muted);
    text-align: center; margin-bottom: 0.5rem;
}
.upload-zone:hover { border-color: var(--primary); background: rgba(139,92,246,0.08); }
.upload-icon { font-size: 1.8rem; }
.upload-hint { font-size: 0.8rem; opacity: 0.8; }
.hint { font-size: 0.78rem; color: var(--muted); text-align: center; margin-top: 0.35rem; }

.consent { margin: 1rem 0 0.25rem; }
.checkbox {
    display: flex; gap: 0.65rem; align-items: flex-start;
    font-size: 0.78rem; color: var(--muted); cursor: pointer;
}
.checkbox input { margin-top: 0.2rem; accent-color: var(--primary); flex-shrink: 0; }

.nfc-scan-panel { text-align: center; }
.nfc-scan-visual {
    position: relative; width: 88px; height: 88px; margin: 0.5rem auto 1rem;
    display: flex; align-items: center; justify-content: center; color: var(--primary-soft);
}
.nfc-pulse {
    position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid var(--primary);
    animation: nfcPulse 1.8s ease-out infinite;
}
#nfc-status { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; min-height: 2.4em; }

.trust-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
    margin: 0.5rem 0 1rem;
}
.trust-item {
    text-align: center; padding: 0.65rem 0.35rem;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 14px;
}
.trust-item span { display: block; font-size: 1.1rem; margin-bottom: 0.2rem; }
.trust-item small { font-size: 0.68rem; color: var(--muted); line-height: 1.3; display: block; }

.welcome-bar { margin-bottom: 0.75rem; }
.welcome-kicker {
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--primary-soft);
}
.welcome-name { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; }

.progress-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.9rem; }
.progress-bar { height: 10px; background: rgba(0,0,0,0.35); border-radius: 999px; overflow: hidden; }
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #e879f9);
    border-radius: 999px; transition: width 0.5s ease;
}
.progress-hint { margin-top: 0.65rem; font-size: 0.85rem; color: var(--muted); }

.nfc-quick {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.9rem 1rem;
}
.nfc-quick-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.nfc-mini-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(145deg, #7c3aed, #a21caf);
    display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0;
}
.nfc-quick strong { display: block; font-size: 0.9rem; }
.nfc-quick small { color: var(--muted); font-size: 0.75rem; }

.main-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin-bottom: 1.15rem;
}
.nav-item {
    background: var(--card); border: 1px solid var(--border); color: var(--muted);
    padding: 0.65rem 0.25rem; border-radius: 14px;
    font-size: 0.72rem; font-weight: 700; font-family: inherit; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
}
.nav-ico { font-size: 1rem; }
.nav-item.active {
    background: linear-gradient(145deg, rgba(124,58,237,0.35), rgba(192,38,211,0.25));
    border-color: rgba(167,139,250,0.45); color: white;
}

.section { display: none; }
.section.active { display: block; }
.section-head { margin-bottom: 0.9rem; }
.section-head h2 { font-size: 1.15rem; font-weight: 700; }
.section-sub { font-size: 0.82rem; color: var(--muted); }

.grid-stands { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.stand-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    padding: 1rem 0.75rem; text-align: center; text-decoration: none; color: var(--text);
    display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
}
.stand-card:active { transform: scale(0.97); }
.stand-card.rated { border-color: rgba(52, 211, 153, 0.45); }
.stand-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 14px; }
.stand-logo.placeholder, .speaker-photo.placeholder {
    width: 56px; height: 56px;
    background: linear-gradient(145deg, #7c3aed, #c026d3);
    border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; font-weight: 700;
}
.stand-name { font-size: 0.85rem; font-weight: 600; }
.badge-rated { font-size: 0.7rem; color: var(--success); font-weight: 700; }
.badge-go { font-size: 0.7rem; color: var(--primary-soft); font-weight: 600; }

.list-speakers { display: flex; flex-direction: column; gap: 0.6rem; }
.speaker-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    padding: 0.85rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
}
.speaker-card.rated { opacity: 0.75; }
.speaker-info { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.speaker-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.speaker-photo.placeholder { width: 44px; height: 44px; border-radius: 50%; font-size: 1rem; }
.speaker-info strong { display: block; font-size: 0.92rem; }
.speaker-info small { color: var(--muted); font-size: 0.78rem; }

.stars {
    display: flex; gap: 0.35rem; justify-content: center;
    margin: 0.75rem 0 1rem; font-size: 2rem; color: #3f2a5c; cursor: pointer;
}
.stars span.active, .stars span.hover { color: #fbbf24; }

.chat-window {
    background: rgba(8,4,18,0.55); border: 1px solid var(--border); border-radius: 16px;
    height: 300px; overflow-y: auto; padding: 1rem; margin-bottom: 0.75rem;
    display: flex; flex-direction: column; gap: 0.55rem;
}
.chat-message {
    max-width: 85%; padding: 0.7rem 1rem; border-radius: 16px; font-size: 0.9rem; line-height: 1.4;
}
.chat-message.user {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    align-self: flex-end; border-bottom-right-radius: 4px;
}
.chat-message.assistant {
    background: rgba(255,255,255,0.07); align-self: flex-start; border-bottom-left-radius: 4px;
}
.chat-input-bar { display: flex; gap: 0.5rem; }
.chat-input-bar .input { margin: 0; flex: 1; }

.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    display: flex; align-items: flex-end; justify-content: center;
    z-index: 100; padding: 1rem;
}
.modal.hidden { display: none; }
.modal-content {
    width: 100%; max-width: 440px;
    border-radius: 24px 24px 16px 16px; padding: 1.5rem;
    animation: slideUp 0.28s ease;
}
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.error {
    background: rgba(251, 113, 133, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.45);
    color: #fda4af; padding: 0.75rem 1rem; border-radius: 12px; font-size: 0.88rem; margin-top: 0.75rem;
}
.success {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: #6ee7b7; padding: 0.75rem 1rem; border-radius: 12px; font-size: 0.9rem;
}
.hidden { display: none !important; }
.empty-state { text-align: center; color: var(--muted); padding: 1.5rem 1rem; font-size: 0.9rem; }

.toast {
    position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
    background: #1e1235; border: 1px solid var(--border); color: var(--text);
    padding: 0.75rem 1.2rem; border-radius: 999px; font-size: 0.88rem; z-index: 200;
    box-shadow: var(--shadow); max-width: 90%;
}
.toast.hidden { display: none; }

.footer { text-align: center; margin-top: 2rem; color: var(--muted); font-size: 0.72rem; opacity: 0.8; }

.back-btn { color: var(--primary-soft); text-decoration: none; font-size: 0.95rem; font-weight: 600; }
.stand-logo-lg {
    width: 88px; height: 88px; object-fit: contain; margin: 0 auto 1rem; display: block; border-radius: 20px;
}
.stand-rate-card h1 { text-align: center; font-size: 1.4rem; }
.stand-rate-card .subtitle { text-align: center; color: var(--muted); }
.contact-check { margin: 1rem 0; font-size: 0.95rem; color: var(--text); }
.already-rated { text-align: center; padding: 1.5rem 0; }
.check-big { font-size: 3rem; color: var(--success); margin-bottom: 0.5rem; }


/* ===== Preloader ===== */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(ellipse at 50% 30%, #1a0a2e 0%, #0c0618 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
.preloader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-logo {
  font-family: var(--font); font-weight: 800; font-size: 2rem; letter-spacing: -0.03em;
  color: #fff; margin-bottom: 1.25rem;
  animation: preloaderPulse 1.4s ease-in-out infinite;
}
.preloader-logo span {
  background: linear-gradient(90deg, #c4b5fd, #f0abfc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.preloader-bar {
  width: 120px; height: 3px; border-radius: 99px;
  background: rgba(255,255,255,.1); overflow: hidden;
}
.preloader-bar span {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, #8b5cf6, #e879f9);
  border-radius: 99px;
  animation: preloaderSlide 1s ease-in-out infinite;
}
@keyframes preloaderPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .85; transform: scale(1.03); }
}
@keyframes preloaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(280%); }
}

/* ===== Popups / modals extras ===== */
.popup-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(6, 2, 16, .72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  animation: fadeIn .25s ease;
}
.popup-overlay.hidden { display: none; }
.popup-box {
  width: 100%; max-width: 360px;
  background: linear-gradient(165deg, rgba(40,22,70,.95), rgba(20,10,40,.98));
  border: 1px solid rgba(167,139,250,.35);
  border-radius: 22px;
  padding: 1.5rem 1.35rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: popIn .35s cubic-bezier(.22,1,.36,1);
  text-align: center;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { opacity: 0; transform: scale(.9) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.popup-box h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.popup-box p { color: var(--muted); font-size: .92rem; margin-bottom: 1.1rem; }
.popup-ico { font-size: 2.4rem; margin-bottom: .5rem; }

/* Toast stack */
.toast-stack {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  z-index: 800; display: flex; flex-direction: column; gap: .5rem;
  width: min(92%, 360px); pointer-events: none;
}
.toast-item {
  pointer-events: auto;
  background: rgba(30, 16, 55, .95);
  border: 1px solid rgba(167,139,250,.4);
  color: #faf5ff;
  padding: .85rem 1.1rem;
  border-radius: 14px;
  font-size: .88rem;
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
  animation: toastIn .35s ease;
  backdrop-filter: blur(10px);
}
.toast-item.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(10px); }
}

/* Post-login effects */
.section.active .stand-card,
.section.active .speaker-card {
  animation: cardRise .45s ease both;
}
.section.active .stand-card:nth-child(1) { animation-delay: .05s; }
.section.active .stand-card:nth-child(2) { animation-delay: .1s; }
.section.active .stand-card:nth-child(3) { animation-delay: .15s; }
.section.active .stand-card:nth-child(4) { animation-delay: .2s; }
.section.active .stand-card:nth-child(5) { animation-delay: .25s; }
.section.active .stand-card:nth-child(6) { animation-delay: .3s; }
@keyframes cardRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.stand-card:hover, .speaker-card:hover {
  border-color: rgba(167,139,250,.55);
  box-shadow: 0 8px 28px rgba(124,58,237,.2);
}
.progress-card {
  position: relative; overflow: hidden;
}
.progress-card::after {
  content: '';
  position: absolute; top: -40%; right: -20%;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,121,249,.2), transparent 70%);
  pointer-events: none;
}
.welcome-bar { animation: cardRise .5s ease; }
.install-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
  padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom));
  background: rgba(20,10,40,.96);
  border-top: 1px solid rgba(167,139,250,.3);
  display: flex; gap: .75rem; align-items: center; justify-content: space-between;
  backdrop-filter: blur(12px);
}
.install-banner.hidden { display: none; }
.install-banner p { font-size: .82rem; color: var(--muted); margin: 0; flex: 1; }
