:root {
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-glow: rgba(2, 132, 199, 0.25);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.25);
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --card-border: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.portal-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem 1rem;
    flex: 1;
}

/* Header */
.portal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.portal-header .brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.825rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.portal-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.portal-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Cards dos Planos */
.plans-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.plan-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.25rem;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.plan-card:hover, .plan-card.featured {
    border-color: var(--accent);
    box-shadow: 0 10px 25px -5px var(--primary-glow);
    transform: translateY(-2px);
}

.plan-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.plan-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.plan-duration {
    font-size: 0.825rem;
    color: var(--accent);
    font-weight: 600;
    background: rgba(56, 189, 248, 0.12);
    padding: 0.2rem 0.6rem;
    border-radius: 0.5rem;
}

.plan-price-box {
    margin-bottom: 1rem;
}

.plan-price-currency {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.plan-price-val {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
}

.plan-features {
    list-style: none;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.plan-features li {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plan-features li svg {
    color: var(--success);
    flex-shrink: 0;
}

/* Botões */
.btn-buy {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, #0369a1 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 var(--primary-glow);
    transition: all 0.2s ease;
}

.btn-buy:hover, .btn-buy:active {
    background: linear-gradient(135deg, #0284c7 0%, #075985 100%);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    box-shadow: 0 4px 14px 0 var(--success-glow);
}

.btn-secondary {
    background: #334155;
    color: var(--text-main);
    box-shadow: none;
}

.btn-secondary:hover {
    background: #475569;
}

/* Formulário de Checkout */
.form-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    background: #0f172a;
    border: 1px solid var(--card-border);
    border-radius: 0.65rem;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--accent);
}

.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    cursor: pointer;
}

.terms-check input {
    margin-top: 0.2rem;
}

/* Tela de Pagamento Pix */
.pix-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.qr-wrapper {
    background: #ffffff;
    padding: 0.75rem;
    border-radius: 0.75rem;
    display: inline-block;
    margin: 1rem auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.qr-wrapper img {
    display: block;
    max-width: 220px;
    width: 100%;
    height: auto;
}

.copy-paste-box {
    background: #0f172a;
    border: 1px dashed var(--card-border);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin: 1rem 0;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.775rem;
    color: var(--accent);
    max-height: 70px;
    overflow-y: auto;
    user-select: all;
}

.timer-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pulse-loader {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f59e0b;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Sucesso */
.success-icon {
    width: 64px;
    height: 64px;
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    color: var(--success);
}

.credential-box {
    background: #0f172a;
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 1.25rem 0;
    text-align: left;
}

.credential-item {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.9rem;
}

.credential-item .label {
    color: var(--text-muted);
}

.credential-item .value {
    color: #ffffff;
    font-weight: 700;
    font-family: monospace;
}

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