:root {
    --bg: #030712;
    --bg-alt: #050c1f;
    --surface: rgba(15, 23, 42, 0.85);
    --surface-light: rgba(148, 163, 184, 0.1);
    --card: rgba(255, 255, 255, 0.04);
    --border: rgba(226, 232, 240, 0.12);
    --primary: #8b5cf6;
    --primary-strong: #a855f7;
    --primary-soft: rgba(139, 92, 246, 0.18);
    --secondary: #14b8a6;
    --accent: #6366f1;
    --text: #f8fafc;
    --muted: #cbd5f5;
    --warning: #facc15;
}

* {
    box-sizing: border-box;
}

body.front-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.25), transparent 45%),
                radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.32), transparent 40%),
                var(--bg);
    color: var(--text);
    line-height: 1.6;
    letter-spacing: 0.01em;
}

body.front-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"%3E%3Cg fill="none" stroke="%231f2937" stroke-width="0.5" opacity="0.3"%3E%3Cpath d="M0 100h200M100 0v200"/%3E%3C/g%3E%3C/svg%3E');
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.section {
    padding: 5rem 0;
    position: relative;
}

.section:first-of-type {
    padding-top: 7rem;
}

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.main-nav {
    position: sticky;
    top: 16px;
    z-index: 50;
}

.main-nav__inner {
    width: min(1200px, 92vw);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border);
    border-radius: 999px;
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 20px 60px rgba(8, 8, 11, 0.65);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a {
    color: var(--muted);
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.95rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.25);
}

.btn-primary {
    background: linear-gradient(120deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text);
    box-shadow: 0 20px 35px rgba(99, 102, 241, 0.35);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--primary-soft);
    color: var(--text);
}

.tagline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.4);
    color: var(--secondary);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin: 1.5rem 0 1rem;
}

.hero p {
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.hero-visual {
    position: relative;
    padding: 2.5rem;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.8), rgba(79, 70, 229, 0.25));
    border-radius: 32px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.55);
}

.hero-visual::after {
    content: '';
    position: absolute;
    inset: 1.5rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.hero-visual__ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent);
    position: absolute;
    top: -20px;
    right: -20px;
    filter: blur(2px);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.metric-card {
    padding: 1.5rem;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.metric-card strong {
    display: block;
    font-size: 2rem;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.pill {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
}

.glass-panel {
    border-radius: 28px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 25px 60px rgba(2, 6, 23, 0.65);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 1.5rem;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.75);
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 60%);
    transition: opacity 0.3s ease;
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-card h3 {
    margin: 1rem 0 0.5rem;
}

.feature-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(20, 184, 166, 0.12);
    color: var(--secondary);
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.timeline-step {
    padding: 1.25rem;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.timeline-step span {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary-soft);
    margin-bottom: 0.75rem;
}

.plan-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    color: var(--muted);
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    border-radius: 26px;
    padding: 2rem;
    border: 1px solid var(--border);
    background: rgba(3, 7, 18, 0.8);
    position: relative;
    overflow: hidden;
}

.plan-card.featured {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.35);
    transform: translateY(-5px);
}

.plan-card ul {
    list-style: none;
    margin: 1.5rem 0 2rem;
    padding: 0;
}

.plan-card li {
    margin-bottom: 0.7rem;
    color: var(--muted);
    display: flex;
    gap: 0.5rem;
}

.plan-card li i {
    color: var(--secondary);
}

.testimonial {
    margin-top: 3rem;
    border-radius: 30px;
    padding: 2.5rem;
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.2), rgba(14, 165, 233, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.testimonial p {
    font-size: 1.15rem;
    color: var(--muted);
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

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

.hidden {
    display: none !important;
}

.badge {
    padding: 0.6rem 1.3rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
    color: var(--muted);
}

.cta-card {
    border-radius: 32px;
    padding: 3rem;
    background: linear-gradient(130deg, rgba(139, 92, 246, 0.25), rgba(20, 184, 166, 0.25));
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
}

.cta-card h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.footer {
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 4rem;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Signup */
.signup-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    align-items: stretch;
    padding: 3rem 0 4rem;
}

.signup-highlight {
    border-radius: 32px;
    padding: 2.5rem;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.9), rgba(99, 102, 241, 0.25));
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.signup-highlight ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}

.signup-highlight li {
    margin-bottom: 1.2rem;
    display: flex;
    gap: 0.75rem;
    color: var(--muted);
}

.signup-panel {
    border-radius: 32px;
    background: rgba(3, 7, 18, 0.9);
    border: 1px solid var(--border);
    padding: 2.5rem;
    box-shadow: 0 30px 60px rgba(2, 6, 23, 0.7);
}

.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.stepper::after {
    content: '';
    position: absolute;
    bottom: 0.35rem;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(148, 163, 184, 0.15);
}

.step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.step-node span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.7);
    font-weight: 600;
}

.step-node.active {
    color: var(--text);
}

.step-node.active span {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.15);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.input, input[type="text"], input[type="email"], input[type="password"], input[type="tel"], textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    color: var(--text);
    font-size: 1rem;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.plan-options {
    display: grid;
    gap: 1rem;
}

.plan-option-card {
    position: relative;
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    transition: border 0.2s ease, transform 0.2s ease;
}

.plan-option-card:hover {
    border-color: rgba(139, 92, 246, 0.6);
}

.plan-option-card input {
    display: none;
}

.plan-option-card.active {
    border-color: rgba(139, 92, 246, 0.8);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.2);
}

.plan-option-card .price {
    font-size: 1.4rem;
    font-weight: 600;
}

.badge-floating {
    position: absolute;
    top: -12px;
    right: 16px;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.2);
    border: 1px solid rgba(20, 184, 166, 0.5);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.feedback-box {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #bbf7d0;
    font-size: 0.9rem;
}

.state-card {
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.state-card.success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #bbf7d0;
}

.state-card.error {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

/* Recuperar instalação */
.recovery-shell {
    max-width: 640px;
    margin: 0 auto;
    padding: 3rem;
    border-radius: 32px;
    background: rgba(2, 6, 23, 0.88);
    border: 1px solid var(--border);
    box-shadow: 0 25px 60px rgba(2, 6, 23, 0.75);
}

.status-widget {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

/* Status page */
.install-shell {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.status-headline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-headline h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0;
}

.status-headline p {
    color: var(--muted);
    margin: 0;
}

.status-link {
    color: var(--text);
    font-weight: 600;
}

.progress-shell {
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 2rem;
    background: rgba(3, 7, 18, 0.8);
}

.progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--muted);
}

.status-chip.completed {
    border-color: rgba(34, 197, 94, 0.5);
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.12);
}

.status-chip.installing,
.status-chip.running,
.status-chip.pending {
    border-color: rgba(250, 204, 21, 0.4);
    color: #fef3c7;
    background: rgba(250, 204, 21, 0.12);
}

.status-chip.failed {
    border-color: rgba(248, 113, 113, 0.5);
    color: #fecaca;
    background: rgba(248, 113, 113, 0.12);
}

.progress-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(120deg, var(--primary), var(--secondary));
    border-radius: inherit;
    transition: width 0.6s ease;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.progress-meta {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.8rem;
}

.install-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.install-step {
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 1.25rem 1.5rem;
    background: rgba(3, 7, 18, 0.75);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.install-step.step-completed {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 15px 30px rgba(34, 197, 94, 0.15);
}

.install-step.step-running {
    border-color: rgba(250, 204, 21, 0.4);
    box-shadow: 0 15px 30px rgba(250, 204, 21, 0.1);
}

.install-step.step-failed {
    border-color: rgba(248, 113, 113, 0.5);
    box-shadow: 0 15px 30px rgba(248, 113, 113, 0.1);
}

.install-step__info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text);
}

.install-step.step-completed .step-icon {
    border-color: rgba(34, 197, 94, 0.5);
    color: #86efac;
}

.install-step.step-running .step-icon {
    border-color: rgba(250, 204, 21, 0.5);
    color: #facc15;
}

.install-step.step-failed .step-icon {
    border-color: rgba(248, 113, 113, 0.5);
    color: #fecaca;
}

.install-step__status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.status-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    display: inline-flex;
    background: rgba(148, 163, 184, 0.4);
    box-shadow: 0 0 10px currentColor;
}

.install-step.step-completed .status-dot,
.status-chip.completed .status-dot {
    background: #22c55e;
    color: #22c55e;
}

.install-step.step-running .status-dot,
.status-chip.installing .status-dot,
.status-chip.running .status-dot,
.status-chip.pending .status-dot {
    background: #facc15;
    color: #facc15;
}

.install-step.step-failed .status-dot,
.status-chip.failed .status-dot {
    background: #f87171;
    color: #f87171;
}

.log-panel {
    margin-top: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(2, 6, 23, 0.9);
    padding: 1.2rem;
}

.log-panel pre {
    margin: 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: #86efac;
    max-height: 240px;
    overflow: auto;
    font-size: 0.85rem;
}

.state-card.info {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #bfdbfe;
}

/* Test page */
.code-block {
    margin-top: 2rem;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--muted);
    max-height: 320px;
    overflow: auto;
}

/* Utility */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.float {
    animation: float 6s ease-in-out infinite;
}

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

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
    100% {
        transform: translateY(0px);
    }
}

@media (max-width: 768px) {
    .main-nav__inner {
        flex-direction: column;
        gap: 1rem;
    }
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    .signup-panel, .signup-highlight, .recovery-shell {
        padding: 1.8rem;
    }
    .plan-card.featured {
        transform: translateY(0);
    }
}
