/**
 * ATALAIA CONNECT - Hotspot PIX Design System
 * Cores: Dark Navy (#050B17), Cyber Card (#0A162B), Electric Blue (#1C82FF), Neon Cyan (#00F0FF)
 * Tipografia: Plus Jakarta Sans & Space Grotesk
 */

:root {
    /* Cores Oficiais Atalaia Connect */
    --bg-dark: #050B17;
    --bg-surface: #070E1F;
    --bg-card: #0A162B;
    --bg-card-hover: #0E1F3D;
    --primary-blue: #0A2F7C;
    --electric-blue: #1C82FF;
    --neon-cyan: #00F0FF;
    --neon-glow: rgba(0, 240, 255, 0.4);
    --electric-glow: rgba(28, 130, 255, 0.35);
    
    /* Textos & Bordas */
    --text-white: #FFFFFF;
    --text-gray: #94A3B8;
    --text-light: #E2E8F0;
    --text-muted: #64748B;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-neon: rgba(0, 240, 255, 0.3);
    --border-card: rgba(28, 130, 255, 0.2);

    /* Feedback */
    --success: #10B981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning: #F59E0B;
    --warning-glow: rgba(245, 158, 11, 0.3);

    /* Tipografia e Animações */
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* --- AURAS NEON DE FUNDO --- */
.glow-sphere {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}
.glow-1 {
    top: -120px;
    right: -100px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, var(--electric-blue) 0%, transparent 70%);
}
.glow-2 {
    top: 50%;
    left: -150px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 70%);
    opacity: 0.18;
}
.glow-3 {
    bottom: -100px;
    right: -120px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-blue) 0%, transparent 70%);
    opacity: 0.25;
}

/* --- CONTAINER & ESTRUTURA --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* --- TOPBAR INFORMATIVA --- */
.topbar {
    background: rgba(5, 11, 23, 0.95);
    border-bottom: 1px solid var(--border-subtle);
    padding: 6px 0;
    font-size: 0.8rem;
    color: var(--text-gray);
    position: relative;
    z-index: 10;
}
.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.topbar-info {
    display: flex;
    align-items: center;
    gap: 16px;
}
.topbar-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.topbar-info i {
    color: var(--neon-cyan);
}
.hotspot-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.25);
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    color: var(--neon-cyan);
    font-size: 0.75rem;
    font-weight: 600;
}
.status-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 8px var(--neon-cyan);
    animation: pulse 2s infinite;
}

/* --- HEADER FIXO --- */
header {
    background: rgba(10, 22, 43, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-img {
    height: 100px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(28, 130, 255, 0.45));
    transition: var(--transition);
}
.logo-container:hover .logo-img {
    filter: drop-shadow(0 0 16px var(--neon-cyan));
}
.header-tag {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--neon-cyan);
    text-transform: uppercase;
    background: rgba(0, 240, 255, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

/* --- HERO SECTION --- */
.hero-portal {
    text-align: center;
    padding: 36px 0 24px;
}
.badge-optic {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(28, 130, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--neon-cyan);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 16px;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.12);
}
.hero-portal h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-white);
    margin-bottom: 10px;
}
.hero-portal h1 span {
    background: linear-gradient(90deg, var(--neon-cyan), var(--electric-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}
.hero-portal p {
    color: var(--text-gray);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- GRID DE PLANOS --- */
.plans-section {
    padding: 16px 0 40px;
}
.plans-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
}

/* --- CARD DO PLANO --- */
.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    overflow: hidden;
}
.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0;
    transition: var(--transition);
}
.plan-card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 25px rgba(28, 130, 255, 0.25);
}
.plan-card:hover::before {
    opacity: 1;
}

/* Detalhes internos do card */
.plan-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.plan-header {
    margin-bottom: 8px;
    text-align: center;
}
.plan-duration {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.2;
    margin: 0;
}

/* Preço */
.plan-price-box {
    margin: 14px 0 20px;
    padding: 16px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    text-align: center;
}
.price-prefix {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
    margin-bottom: 4px;
}
.price-val {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-white);
    display: flex;
    align-items: baseline;
    justify-content: center;
    line-height: 1;
}
.price-val sup {
    font-size: 1.15rem;
    margin-right: 4px;
    color: var(--neon-cyan);
    font-weight: 600;
}
.price-sub {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: 6px;
    display: block;
}
.plan-action-box {
    margin-top: auto;
}

/* Features */
.plan-features {
    list-style: none;
    margin-bottom: 22px;
}
.plan-features li {
    font-size: 0.83rem;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.plan-features li i {
    color: var(--neon-cyan);
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* --- BOTÕES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    width: 100%;
    font-family: var(--font-heading);
    letter-spacing: 0.3px;
}

.btn-neon {
    background: linear-gradient(135deg, var(--electric-blue) 0%, var(--primary-blue) 100%);
    color: var(--text-white);
    border: 1px solid rgba(0, 240, 255, 0.4);
    box-shadow: 0 4px 18px var(--electric-glow);
}
.btn-neon:hover {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--electric-blue) 100%);
    color: #050B17;
    box-shadow: 0 6px 24px var(--neon-glow);
    transform: translateY(-2px);
}

.btn-outline-cyan {
    background: transparent;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
}
.btn-outline-cyan:hover {
    background: rgba(0, 240, 255, 0.12);
    box-shadow: 0 0 15px var(--neon-glow);
    transform: translateY(-2px);
}

.btn-pix {
    background: linear-gradient(135deg, #00D2B4 0%, #008775 100%);
    color: #FFFFFF;
    border: 1px solid rgba(0, 210, 180, 0.4);
    box-shadow: 0 4px 16px rgba(0, 210, 180, 0.25);
}
.btn-pix:hover {
    background: linear-gradient(135deg, #32E7CD 0%, #00B59B 100%);
    color: #050B17;
    box-shadow: 0 6px 22px rgba(0, 210, 180, 0.45);
    transform: translateY(-2px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-gray);
    border: 1px solid var(--border-subtle);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

/* --- TELA 2: MODAL / CONTAINER DE PAGAMENTO PIX --- */
.view-step {
    display: none;
    animation: fadeIn 0.35s ease-out forwards;
}
.view-step.active {
    display: block;
}

.payment-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    max-width: 580px;
    margin: 20px auto 40px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(28, 130, 255, 0.15);
    position: relative;
    overflow: hidden;
}

/* Banner de Cortesia Ativa (1 Minuto) */
.courtesy-banner {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(28, 130, 255, 0.12));
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 22px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}
.courtesy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.courtesy-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--neon-cyan);
}
.courtesy-badge {
    background: #050B17;
    color: var(--neon-cyan);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}
.courtesy-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.4;
}
/* Barra de Progresso do Tempo */
.time-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-pill);
    margin-top: 10px;
    overflow: hidden;
}
.time-progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--electric-blue));
    box-shadow: 0 0 10px var(--neon-cyan);
    transition: width 1s linear;
}

/* Resumo do Pedido */
.order-summary-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.order-plan-info h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-white);
}
.order-plan-info span {
    font-size: 0.8rem;
    color: var(--text-gray);
}
.order-plan-price {
    text-align: right;
}
.order-plan-price .val {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neon-cyan);
}

/* Área do QR Code */
.qr-container {
    text-align: center;
    margin: 20px 0;
}
.qr-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 240, 255, 0.2);
    position: relative;
    line-height: 0;
}
#qr-code-target {
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 0;
}
#qr-code-target canvas, #qr-code-target img {
    display: block;
    width: 230px !important;
    height: 230px !important;
    margin: 0 auto;
    border-radius: 4px;
}
.qr-instruction {
    font-size: 0.82rem;
    color: var(--text-gray);
    margin-top: 10px;
}

/* PIX Copia e Cola */
.pix-code-box {
    margin: 18px 0;
}
.pix-code-label {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}
.pix-input-group {
    display: flex;
    gap: 8px;
}
.pix-code-input {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-light);
    font-family: monospace;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    outline: none;
}
.btn-copy {
    width: auto;
    padding: 10px 18px;
    font-size: 0.85rem;
    white-space: nowrap;
    background: var(--electric-blue);
    color: var(--text-white);
}
.btn-copy:hover {
    background: var(--neon-cyan);
    color: #050B17;
}

/* Status em Tempo Real */
.live-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: rgba(28, 130, 255, 0.06);
    border-radius: var(--radius-md);
    border: 1px dashed rgba(0, 240, 255, 0.3);
    margin-bottom: 20px;
}
.radar-pulse {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 10px var(--warning);
    animation: pulseRadar 1.5s infinite;
}
.live-status-text {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Botões de Ação do Pagamento */
.payment-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dev-sim-box {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}
.btn-simulate {
    background: rgba(245, 158, 11, 0.12);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    font-size: 0.8rem;
    padding: 8px 16px;
}
.btn-simulate:hover {
    background: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 14px var(--warning-glow);
}

/* --- TELA 3: SUCESSO / PAGAMENTO CONFIRMADO --- */
.success-card {
    background: var(--bg-card);
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-lg);
    max-width: 540px;
    margin: 30px auto 50px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 35px var(--neon-glow);
}
.success-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.15);
    border: 2px solid var(--neon-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--neon-cyan);
    font-size: 2.2rem;
    box-shadow: 0 0 30px var(--neon-glow);
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.success-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
}
.success-subtitle {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* Detalhes da Conexão Ativada */
.voucher-details-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 26px;
    text-align: left;
}
.voucher-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.85rem;
}
.voucher-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.voucher-label {
    color: var(--text-gray);
}
.voucher-value {
    color: var(--text-white);
    font-weight: 600;
}
.voucher-value.highlight {
    color: var(--neon-cyan);
}

/* --- FOOTER INFORMATIVO --- */
footer {
    margin-top: auto;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding: 24px 0 16px;
    font-size: 0.82rem;
    color: var(--text-gray);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-brand span {
    color: var(--text-white);
    font-weight: 600;
}
.footer-support {
    display: flex;
    align-items: center;
    gap: 14px;
}
.footer-support a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
}
.footer-support a:hover {
    color: var(--neon-cyan);
}
.footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- TOAST NOTIFICATION --- */
.toast-notice {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0A162B;
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px var(--neon-glow);
    color: var(--text-white);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast-notice.show {
    transform: translateY(0);
    opacity: 1;
}

/* --- ANIMAÇÕES --- */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}
@keyframes pulseRadar {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 10px var(--neon-cyan); }
    50% { box-shadow: 0 0 20px var(--neon-cyan), 0 0 30px var(--electric-blue); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- RESPONSIVIDADE PARA SMARTPHONES --- */
@media (max-width: 768px) {
    .topbar {
        font-size: 0.72rem;
    }
    .topbar-content {
        justify-content: center;
    }
    .topbar-info span:not(:last-child) {
        display: none;
    }
    .hero-portal {
        padding: 24px 0 16px;
    }
    .hero-portal h1 {
        font-size: 1.65rem;
    }
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .plan-card {
        padding: 20px;
    }
    .payment-card, .success-card {
        padding: 20px 16px;
        margin: 14px auto;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
