/* ==========================================================================
   PIX Hotspot — Design System Corporativo Clean
   Paleta Principal: Azul (#2563eb, #1d4ed8), Preto (#090d16, #000000), 
                     Cinza (#0f172a, #1e293b, #334155, #64748b, #94a3b8), 
                     Branco (#ffffff, #f8fafc)
   ========================================================================== */

:root {
    --bg-canvas: #090d16;
    --bg-card: rgba(15, 23, 42, 0.92);
    --bg-card-subtle: rgba(30, 41, 59, 0.6);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus: #2563eb;
    
    /* Azul Corporativo */
    --blue-primary: #2563eb;
    --blue-primary-hover: #1d4ed8;
    --blue-active: #1e40af;
    --blue-subtle: rgba(37, 99, 235, 0.12);
    --blue-border: rgba(59, 130, 246, 0.35);
    --blue-glow: rgba(37, 99, 235, 0.25);
    
    /* Tipografia e Cores Neutras */
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    /* Radios e Efeitos */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fundo corporativo com iluminação azul sutil */
.background-glow {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.14) 0%, rgba(15, 23, 42, 0.05) 55%, transparent 70%);
    z-index: -1;
    filter: blur(80px);
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* Header Corporativo */
.header {
    text-align: center;
    margin-bottom: 24px;
}

.brand-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    margin-bottom: 12px;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.brand-icon-wrapper svg {
    width: 28px;
    height: 28px;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
    font-weight: 400;
}

.device-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-subtle);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.device-badge strong {
    color: #93c5fd;
    font-weight: 600;
}

/* Cards das Etapas */
.step-card {
    display: none;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.step-card.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-card h2 {
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #ffffff;
}

/* Lista de Planos */
.plans-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-card {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--blue-primary);
    opacity: 0;
    transition: var(--transition);
}

.plan-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--blue-border);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
}

.plan-card:hover::before {
    opacity: 1;
}

.plan-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.plan-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

.plan-price-tag {
    background: var(--blue-subtle);
    border: 1px solid var(--blue-border);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    text-align: right;
    white-space: nowrap;
}

.plan-price {
    font-size: 18px;
    font-weight: 700;
    color: #60a5fa;
    letter-spacing: -0.5px;
}

/* Botão de Voltar */
.btn-back {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    font-family: inherit;
}

.btn-back:hover {
    color: #ffffff;
    transform: translateX(-3px);
}

/* Resumo do Plano Selecionado */
.selected-plan-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.plan-badge-info .badge-tag {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
}

.plan-badge-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.plan-badge-price {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

/* Formulário de Identificação / CPF */
.pix-form-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.form-group input {
    width: 100%;
    background: rgba(11, 15, 25, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 13px 16px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 1px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px var(--blue-glow);
    background: rgba(11, 15, 25, 1);
}

.form-group input.input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.input-hint {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 2px;
}

/* Botão de Ação Primário (Azul Corporativo) */
.btn-action-primary {
    width: 100%;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-action-primary:hover {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.btn-action-primary:active {
    transform: translateY(0);
}

.btn-action-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* QR Code & Checkout PIX */
.qr-box {
    text-align: center;
    background: #ffffff;
    padding: 18px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.qr-box img {
    width: 190px;
    height: 190px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.timer {
    color: #1e293b;
    font-weight: 600;
    font-size: 13px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.timer span {
    color: #2563eb;
    font-weight: 700;
    font-family: ui-monospace, monospace;
}

.copia-cola-box label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    display: block;
    text-align: left;
}

.input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.input-group input {
    flex: 1;
    background: rgba(11, 15, 25, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: #ffffff;
    font-size: 13px;
    font-family: ui-monospace, monospace;
}

.btn-copy {
    background: var(--blue-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0 20px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.btn-copy:hover {
    background: var(--blue-primary-hover);
}

/* Alertas Inline */
.alert-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-out;
}

.alert-box.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.alert-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* Sucesso e Liberação */
.success-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 9999px;
    background: rgba(37, 99, 235, 0.15);
    border: 2px solid #3b82f6;
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.3);
}

.info-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    margin: 16px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-success {
    width: 100%;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-md);
    margin-top: 12px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-success:hover {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.loader-spinner {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--blue-primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin: 0 auto 8px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status-msg {
    font-size: 12px;
    color: #60a5fa;
    margin-top: 6px;
    display: block;
}

.footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
    margin-top: 28px;
}

/* ========================================================= */
/* Seção de Vouchers (Corporativo Clean)                     */
/* ========================================================= */
.voucher-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0 14px 0;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.voucher-divider::before,
.voucher-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-subtle);
}

.voucher-divider span {
    padding: 0 12px;
}

.voucher-box {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.voucher-box:hover {
    border-color: rgba(59, 130, 246, 0.35);
}

.btn-toggle-voucher {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-toggle-voucher:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
}

.voucher-arrow {
    font-size: 11px;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.voucher-arrow.open {
    transform: rotate(180deg);
}

.voucher-form-container {
    padding: 0 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.3s ease-out;
}

.btn-action-voucher {
    width: 100%;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-md);
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    font-family: inherit;
}

.btn-action-voucher:hover {
    border-color: var(--blue-primary);
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-action-voucher:active {
    transform: translateY(0);
}

.btn-action-voucher:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
