@charset "UTF-8";

/* =========================================================
   WifiMaxx Web — Estilos globais (Standalone)
   ========================================================= */

:root {
    --primary: #97227a;
    --primary-dark: #6f2070;
    --primary-gradient: linear-gradient(90deg, #97227a 0%, #88227a 50%, #6f2070 100%);
    --success: #28a745;
    --error: #dc3545;
    --warning: #ff9800;
    --text: #212121;
    --text-secondary: #666;
    --text-light: #999;
    --bg: #f5f0f7;
    --card-bg: rgba(255, 255, 255, 0.95);
    --border: #e0e0e0;
    --radius: 16px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    min-height: 100dvh;
}

/* ===== Header ===== */
.app-header {
    background: var(--primary-gradient);
    color: #fff;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.3rem;
}

.app-header__nav {
    display: flex;
    gap: 0.5rem;
}

.app-header__nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.app-header__nav a:hover,
.app-header__nav a.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* ===== Page Container ===== */
.page-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ===== Card ===== */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.4s ease-out;
}

.card__title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.card__title h1 {
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 700;
}

.card__title p {
    margin: 0.3rem 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Steps ===== */
.steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.step__number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    background: #e0e0e0;
    color: #999;
    transition: var(--transition);
}

.step.active .step__number {
    background: var(--primary-gradient);
    color: #fff;
}

.step.completed .step__number {
    background: var(--success);
    color: #fff;
}

.step__line {
    width: 30px;
    height: 2px;
    background: #e0e0e0;
    transition: var(--transition);
}

.step.completed + .step__line,
.step.completed ~ .step__line {
    background: var(--success);
}

/* ===== Form ===== */
.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #424242;
    font-size: 0.95rem;
}

.form-label .required { color: #e74c3c; }

.form-control {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(151, 34, 122, 0.1);
    background: #fff;
}

.form-control.valid { border-color: var(--success); background: rgba(40, 167, 69, 0.05); }
.form-control.invalid { border-color: var(--error); background: rgba(220, 53, 69, 0.05); }
.form-control:disabled, .form-control[readonly] { background: #f8f9fa; cursor: not-allowed; opacity: 0.7; }

.form-feedback {
    font-size: 0.85rem;
    margin-top: 0.4rem;
    min-height: 1.2rem;
    transition: var(--transition);
}

.form-feedback.valid { color: var(--success); }
.form-feedback.invalid { color: var(--error); }

.form-row { display: flex; gap: 1rem; }
.form-col { flex: 1; }

.form-select {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2"><polyline points="6,9 12,15 18,9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
}

.form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(151, 34, 122, 0.1); }
.form-select.valid { border-color: var(--success); }
.form-select.invalid { border-color: var(--error); }

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.8rem;
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
}

.date-group { display: flex; gap: 0.5rem; }
.date-select { flex: 1; }

.password-field { position: relative; display: flex; align-items: center; }
.password-field .form-control { padding-right: 3.5rem; }

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #999;
    transition: color 0.3s;
    z-index: 10;
}

.password-toggle:hover { color: var(--primary); }
.password-toggle svg { width: 24px; height: 24px; }
.password-toggle .icon-eye-off,
.password-toggle.is-showing .icon-eye { display: none; }
.password-toggle.is-showing .icon-eye-off { display: block; }

/* ===== Buttons ===== */
.btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(151, 34, 122, 0.3);
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(151, 34, 122, 0.4); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; opacity: 0.6; }

.btn--outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
}

.btn--outline:hover:not(:disabled) { background: rgba(151, 34, 122, 0.08); box-shadow: none; }

.btn--secondary { background: linear-gradient(90deg, #555, #333); }
.btn--success { background: linear-gradient(90deg, #28a745, #218838); }

.btn-group { display: flex; flex-direction: column; gap: 0.8rem; }

/* ===== Divider ===== */
.divider-or {
    display: flex; align-items: center; gap: 1rem;
    margin: 0.5rem 0; color: #999; font-size: 0.85rem;
}

.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: #e0e0e0; }

/* ===== Result Card ===== */
.result-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0f0f0;
    text-align: center;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.4s ease-out;
}

.result-card__icon { font-size: 3rem; margin-bottom: 0.8rem; display: block; }
.result-card__title { font-size: 1.2rem; font-weight: 700; color: #2c3e50; margin: 0 0 0.5rem; }
.result-card__text { font-size: 0.9rem; color: #666; line-height: 1.5; margin: 0 0 1.2rem; }

/* ===== Plans ===== */
.plans-grid { display: flex; flex-direction: column; gap: 1.2rem; }

.plan-card {
    background: #fff; border-radius: 16px; padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); border: 2px solid #f0f0f0;
    transition: var(--transition); position: relative; overflow: hidden; cursor: pointer;
}

.plan-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); border-color: var(--primary); }
.plan-card.highlighted { border-color: var(--primary); box-shadow: 0 4px 20px rgba(151, 34, 122, 0.15); }

.plan-badge {
    position: absolute; top: 12px; right: -30px;
    background: var(--primary-gradient); color: #fff;
    font-size: 0.7rem; font-weight: 700; padding: 4px 40px;
    text-transform: uppercase; letter-spacing: 0.5px;
    transform: rotate(35deg); box-shadow: 0 2px 8px rgba(151, 34, 122, 0.3);
}

.plan-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.plan-card__name { font-size: 1.3rem; font-weight: 700; color: #2c3e50; margin: 0; }

.plan-card__price-value {
    font-size: 1.4rem; font-weight: 800;
    background: var(--primary-gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}

.plan-card__description { color: #666; font-size: 0.9rem; margin: 0 0 1rem; line-height: 1.4; }

.plan-card__specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1rem; }

.plan-spec { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; background: #f8f8f8; border-radius: 10px; }
.plan-spec__icon { font-size: 1.1rem; }
.plan-spec__label { font-size: 0.7rem; color: #999; text-transform: uppercase; letter-spacing: 0.3px; }
.plan-spec__value { font-size: 0.85rem; font-weight: 600; color: #333; }

.plan-card__action { margin-top: 0.5rem; }

.plans-empty, .plans-error { text-align: center; padding: 3rem 1rem; color: #999; }
.plans-empty__icon, .plans-error__icon { font-size: 3rem; margin-bottom: 1rem; }

.btn-retry {
    margin-top: 1rem; padding: 0.8rem 1.5rem;
    background: var(--primary-gradient); color: #fff;
    border: none; border-radius: 12px; font-weight: 600; cursor: pointer;
}

/* ===== Skeleton ===== */
.plan-skeleton { background: #fff; border-radius: 16px; padding: 1.5rem; border: 2px solid #f0f0f0; }

.skeleton-line {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px;
}

.skeleton-title { width: 40%; height: 20px; }
.skeleton-price { width: 25%; height: 24px; }
.skeleton-text { width: 100%; height: 14px; margin-top: 12px; }
.skeleton-text.short { width: 60%; }
.skeleton-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.skeleton-spec { height: 40px; border-radius: 10px; }
.skeleton-btn { width: 100%; height: 44px; margin-top: 12px; border-radius: 12px; }

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; display: none; justify-content: center; align-items: center; z-index: 9999; }
.modal.active { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px); }

.modal__content {
    background: #fff; padding: 1.5rem; border-radius: 20px; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); max-width: 420px; width: 90%;
    animation: modalSlideIn 0.3s; z-index: 2; position: relative;
}

.modal__close {
    position: absolute; top: 0.8rem; right: 0.8rem;
    background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #999; z-index: 3; line-height: 1;
}

.modal__close:hover { color: #333; }
.modal__body { display: flex; flex-direction: column; gap: 16px; }
.modal__body h3 { margin: 0; color: #333; font-size: 1.2rem; }
.modal__body p { margin: 0; color: #666; font-size: 0.95rem; }

.modal__spinner {
    width: 50px; height: 50px; border: 4px solid #e0e0e0; border-top: 4px solid var(--primary);
    border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto;
}

/* ===== Payment Modals ===== */
.payment-plan-summary { text-align: center; margin-bottom: 1rem; }

.payment-plan-price {
    font-size: 1.6rem; font-weight: 800;
    background: var(--primary-gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}

.payment-method-title { font-weight: 600; color: #555; margin-bottom: 0.8rem; }
.payment-methods { display: flex; flex-direction: column; gap: 0.8rem; }

.payment-method-option {
    display: flex; align-items: center; gap: 1rem; padding: 1rem;
    border: 2px solid #f0f0f0; border-radius: 14px; cursor: pointer; transition: var(--transition);
}

.payment-method-option:hover { border-color: var(--primary); background: rgba(151,34,122,0.04); transform: translateY(-2px); }

.payment-method-icon {
    width: 48px; height: 48px; background: linear-gradient(135deg, #97227a, #6f2070);
    border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0;
}

.payment-method-info { display: flex; flex-direction: column; text-align: left; }
.payment-method-name { font-size: 1.05rem; font-weight: 700; color: #2c3e50; }
.payment-method-desc { font-size: 0.8rem; color: #888; margin-top: 2px; }

.form-section-title {
    font-size: 0.85rem; font-weight: 700; color: var(--primary);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin: 1.2rem 0 0.6rem; padding-bottom: 0.4rem;
    border-bottom: 2px solid rgba(151, 34, 122, 0.15);
}

.form-section-title:first-of-type { margin-top: 0.5rem; }

.payment-form-summary {
    background: rgba(151,34,122,0.06); border-radius: 10px;
    padding: 0.8rem; font-size: 0.9rem; color: #555; margin-bottom: 1rem; text-align: center;
}

.payment-form-error {
    background: rgba(220,53,69,0.08); border: 1px solid rgba(220,53,69,0.2);
    border-radius: 10px; padding: 0.7rem 1rem; color: #c62828;
    font-size: 0.85rem; margin-bottom: 0.8rem; text-align: center;
}

/* ===== PIX ===== */
.pix-amount {
    font-size: 1.8rem; font-weight: 800;
    background: var(--primary-gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text; margin: 0.3rem 0;
}

.pix-qr-container {
    background: #fff; border: 2px solid #f0f0f0; border-radius: 16px;
    padding: 1rem; display: flex; align-items: center; justify-content: center; min-height: 200px;
}

.pix-qr-container img { max-width: 220px; width: 100%; border-radius: 8px; }
.pix-qr-loading { text-align: center; color: #999; }
.pix-copy-section { margin-top: 1rem; }

.pix-copy-section label {
    display: block; font-size: 0.8rem; color: #888; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 0.5rem; text-align: left;
}

.pix-code-container {
    background: #f8f8f8; border: 1px solid #e0e0e0; border-radius: 10px;
    padding: 0.8rem; margin-bottom: 0.8rem; max-height: 80px; overflow-y: auto;
}

.pix-code-text {
    font-family: 'Courier New', monospace; font-size: 0.75rem; color: #333;
    word-break: break-all; line-height: 1.4; user-select: all; text-align: left;
}

.pix-timer {
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.6rem; background: rgba(255,152,0,0.08); border-radius: 10px;
    font-size: 0.85rem; color: #e65100; font-weight: 600; margin-top: 0.8rem;
}

.pix-status { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem; font-size: 0.85rem; color: #666; }

.pix-status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warning); animation: pulse 1.5s infinite; }
.pix-status-dot.expired { background: #c62828; animation: none; }
.pix-status-dot.paid { background: var(--success); animation: none; }

.payment-result-icon { font-size: 4rem; margin-bottom: 0.5rem; }

/* ===== Helpers ===== */
.helper-text { text-align: center; margin-top: 1.2rem; padding-top: 0.8rem; border-top: 1px solid #eee; }
.helper-text p { margin: 0; font-size: 0.85rem; color: #777; }

.link { color: var(--primary); text-decoration: none; font-weight: 500; cursor: pointer; }
.link:hover { text-decoration: underline; }

.spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3); border-radius: 50%;
    border-top-color: #fff; animation: spin 1s linear infinite; margin-right: 8px;
}

.hidden { display: none !important; }

.text-center { text-align: center; }
.text-muted { color: var(--text-light); }

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.required-mark { color: var(--error); }

/* ===== Card Header ===== */
.card-header { margin-bottom: 1.2rem; }
.card-header h2 { margin: 0 0 0.3rem; font-size: 1.4rem; color: var(--text); }
.card-header p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }

/* ===== Button stack ===== */
.btn-stack { display: flex; flex-direction: column; gap: 0.8rem; }

/* ===== Button outline ===== */
.btn-outline {
    background: transparent !important;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
    -webkit-text-fill-color: var(--primary);
}
.btn-outline:hover { background: rgba(151,34,122,0.08) !important; }

/* ===== Form error ===== */
.form-error {
    background: rgba(220,53,69,0.08); border: 1px solid rgba(220,53,69,0.2);
    border-radius: 10px; padding: 0.7rem 1rem; color: #c62828;
    font-size: 0.85rem; margin-bottom: 0.8rem; text-align: center;
}

/* ===== Modal Overlay (for planos/ativação modals) ===== */
.modal-overlay {
    position: fixed; inset: 0; display: none;
    justify-content: center; align-items: center;
    z-index: 9999; background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.modal-card {
    position: relative;
    background: #fff; border-radius: var(--radius);
    padding: 2rem; max-width: 420px; width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease-out;
    max-height: 90vh; overflow-y: auto;
}

.modal-card--lg { max-width: 500px; }

.modal-close {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; font-size: 1.5rem;
    color: #999; cursor: pointer; line-height: 1;
    z-index: 1;
}
.modal-close:hover { color: #333; }

/* ===== Feedback Overlay ===== */
.feedback-overlay {
    position: fixed; inset: 0; display: none;
    justify-content: center; align-items: center;
    z-index: 10000; background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}
.feedback-overlay.active { display: flex; }

.feedback-card {
    background: #fff; border-radius: var(--radius);
    padding: 2rem; max-width: 360px; width: 85%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease-out;
    text-align: center;
}

.feedback-card h3 { margin: 0.8rem 0 0.4rem; color: #333; font-size: 1.2rem; }
.feedback-card p { margin: 0; color: #666; font-size: 0.9rem; line-height: 1.5; }

.feedback-icon { display: flex; justify-content: center; align-items: center; min-height: 48px; }
.feedback-icon .spinner {
    width: 40px; height: 40px;
    border: 3px solid #e0e0e0; border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
    margin: 0;
}

/* ===== Steps bar completed state ===== */
.steps-bar .step.completed { opacity: 1; }
.steps-bar .step.completed .step-number {
    background: var(--success); color: #fff;
}

/* ===== Plans header ===== */
.plans-header { text-align: center; margin-bottom: 1.5rem; }
.plans-header h2 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.plans-header p { color: var(--text-secondary); font-size: 0.9rem; margin: 0; }

/* ===== Section transitions ===== */
.section-hidden { display: none !important; }

/* ===== Animations ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .card { padding: 1.5rem; }
    .card__title h1 { font-size: 1.5rem; }
    .form-row { flex-direction: column; gap: 0; }
    .form-control, .form-select { padding: 0.85rem 1rem; font-size: 16px; }
    .date-group { gap: 0.3rem; }
    .app-header__nav { gap: 0.2rem; }
    .app-header__nav a { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
    .plan-card__specs { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .page-container { padding: 0 0.5rem; margin: 1rem auto; }
    .card { border-radius: 18px; padding: 1.2rem; }
    .result-card { padding: 1.4rem; }
    .result-card__icon { font-size: 2.5rem; }
    .payment-method-icon { width: 40px; height: 40px; font-size: 1.2rem; }
    .pix-qr-container img { max-width: 180px; }
    .pix-amount { font-size: 1.4rem; }
    .app-header__nav a { font-size: 0.75rem; padding: 0.3rem 0.5rem; }
}
