:root {
    --bg: #080b16;
    --bg-soft: #10162a;
    --panel: rgba(255, 255, 255, 0.08);
    --panel-strong: rgba(255, 255, 255, 0.13);
    --text: #f8fafc;
    --muted: #b9c2d5;
    --line: rgba(255, 255, 255, 0.14);
    --primary: #7c3aed;
    --primary-2: #2563eb;
    --accent: #22d3ee;
    --danger: #fb7185;
    --success: #34d399;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 8%, rgba(124, 58, 237, 0.35), transparent 28rem),
        radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.18), transparent 24rem),
        linear-gradient(135deg, #060813 0%, #0b1021 50%, #111827 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 80%);
}

body,
button,
input,
select {
    font: inherit;
}

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

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: min(1180px, calc(100% - 32px));
    margin: 16px auto 0;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(8, 11, 22, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(0,0,0,.22);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-weight: 900;
    letter-spacing: -0.06em;
    background: linear-gradient(135deg, var(--primary), var(--primary-2), var(--accent));
    box-shadow: 0 14px 38px rgba(37, 99, 235, .32);
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav > a:not(.btn) {
    padding: 10px 12px;
    color: var(--muted);
    border-radius: 999px;
}

.nav > a:not(.btn):hover {
    color: var(--text);
    background: rgba(255,255,255,.07);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(255,255,255,.08);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, filter .18s ease, background .18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 14px 34px rgba(37, 99, 235, .32);
}

.btn-light {
    color: var(--text);
    background: rgba(255,255,255,.1);
    border: 1px solid var(--line);
}

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

.btn-lg {
    padding: 14px 22px;
}

.btn-full {
    width: 100%;
}

.hero {
    min-height: calc(100vh - 100px);
    display: grid;
    grid-template-columns: 1.04fr .96fr;
    align-items: center;
    gap: 48px;
    padding: 72px 0 46px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #c4b5fd;
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.eyebrow::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 24px var(--accent);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 20px;
    font-size: clamp(2.4rem, 7vw, 5.7rem);
    line-height: .93;
    letter-spacing: -0.075em;
}

h2 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.055em;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

p {
    color: var(--muted);
    line-height: 1.75;
}

.hero-content p {
    max-width: 720px;
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
    box-shadow: var(--shadow);
}

.browser-bar {
    height: 58px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 22px;
    border-bottom: 1px solid var(--line);
}

.browser-bar span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
}

.mock-site {
    min-height: 430px;
    padding: 28px;
}

.mock-gradient {
    height: 160px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 25% 20%, rgba(255,255,255,.85), transparent 8rem),
        linear-gradient(135deg, var(--primary), var(--primary-2), var(--accent));
}

.mock-lines {
    margin: 26px 0;
}

.mock-lines span {
    display: block;
    height: 16px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.15);
}

.mock-lines span:nth-child(1) { width: 86%; }
.mock-lines span:nth-child(2) { width: 68%; }
.mock-lines span:nth-child(3) { width: 46%; }

.mock-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.mock-grid i {
    height: 96px;
    border-radius: 20px;
    background: rgba(255,255,255,.12);
    border: 1px solid var(--line);
}

.section {
    padding: 54px 0;
}

.section-title {
    max-width: 720px;
    margin-bottom: 26px;
}

.cards {
    display: grid;
    gap: 18px;
}

.cards.three {
    grid-template-columns: repeat(3, 1fr);
}

.card,
.panel-card,
.stat-card,
.form-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 55px rgba(0,0,0,.18);
    backdrop-filter: blur(18px);
}

.card {
    padding: 26px;
}

.icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 16px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: center;
}

.feature-list {
    display: grid;
    gap: 12px;
}

.feature-list span,
.roadmap span {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--text);
    background: rgba(255,255,255,.08);
}

.auth-shell {
    min-height: calc(100vh - 150px);
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 34px;
    align-items: center;
    padding: 52px 0;
}

.auth-shell.compact {
    grid-template-columns: 1fr 480px;
}

.auth-copy h1 {
    font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.form-card {
    padding: 26px;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: #e5e7eb;
    font-weight: 800;
}

.field input,
.field select {
    width: 100%;
    height: 50px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: 0;
    padding: 0 15px;
    color: var(--text);
    background: rgba(255,255,255,.08);
}

.field input:focus,
.field select:focus {
    border-color: rgba(34, 211, 238, .7);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, .12);
}

.field select option {
    color: #111827;
}

.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.error {
    display: block;
    margin-top: 7px;
    color: var(--danger);
    font-weight: 700;
}

.form-link {
    margin: 16px 0 0;
    text-align: center;
    font-size: .95rem;
}

.form-link a {
    color: #bfdbfe;
    font-weight: 900;
}

.alert {
    width: min(760px, 100%);
    margin: 24px auto 0;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    font-weight: 800;
    background: rgba(255,255,255,.08);
}

.alert-success {
    color: #bbf7d0;
    border-color: rgba(52, 211, 153, .35);
}

.alert-error {
    color: #fecdd3;
    border-color: rgba(251, 113, 133, .35);
}

.dashboard {
    padding: 56px 0;
}

.dashboard-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.dashboard-head h1 {
    margin-bottom: 10px;
    font-size: clamp(2rem, 5vw, 4rem);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card {
    padding: 22px;
}

.stat-card small {
    display: block;
    margin-bottom: 9px;
    color: var(--muted);
    font-weight: 800;
}

.stat-card strong {
    font-size: 1.55rem;
}

.panel-card {
    padding: 26px;
}

.roadmap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.footer {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 24px;
    padding: 18px 4px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
    font-size: .92rem;
}

@media (max-width: 900px) {
    .topbar {
        align-items: flex-start;
        border-radius: 24px;
    }

    .brand small {
        display: none;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(8, 11, 22, .96);
        box-shadow: var(--shadow);
    }

    .nav.is-open {
        display: flex;
    }

    .nav a {
        width: 100%;
    }

    .hero,
    .auth-shell,
    .auth-shell.compact,
    .split {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 48px;
    }

    .cards.three,
    .stats-grid,
    .roadmap {
        grid-template-columns: 1fr;
    }

    .dashboard-head {
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    main,
    .topbar,
    .footer {
        width: min(100% - 22px, 1180px);
    }

    .topbar {
        margin-top: 10px;
        padding: 12px;
    }

    .brand strong {
        font-size: .94rem;
    }

    .brand-mark,
    .menu-toggle {
        width: 40px;
        height: 40px;
    }

    h1 {
        font-size: clamp(2.2rem, 14vw, 3.5rem);
    }

    .hero-actions,
    .footer {
        flex-direction: column;
    }

    .hero-actions .btn,
    .dashboard-head .btn {
        width: 100%;
    }

    .mock-site {
        min-height: 340px;
        padding: 18px;
    }

    .mock-grid {
        grid-template-columns: 1fr;
    }

    .two-cols {
        grid-template-columns: 1fr;
    }

    .form-card,
    .card,
    .panel-card,
    .stat-card {
        border-radius: 20px;
        padding: 20px;
    }
}

.google-choice {
    display: grid;
    gap: 10px;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    font-weight: 850;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.google-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.13);
    border-color: rgba(255,255,255,.28);
}

.google-btn span {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    color: #111827;
    font-weight: 950;
    border-radius: 50%;
    background: #fff;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 750;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, .12);
    border: 1px solid rgba(245, 158, 11, .26);
    font-size: .82rem;
    font-weight: 900;
}

/* Módulo Sites */
.auth-shell.wide {
    grid-template-columns: .75fr 1.25fr;
    align-items: start;
}

.form-wide {
    max-width: none;
}

textarea {
    width: 100%;
    resize: vertical;
    min-height: 118px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px 14px;
    outline: none;
    background: rgba(255,255,255,.08);
}

textarea:focus,
input:focus,
select:focus {
    border-color: rgba(124, 58, 237, .76);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .14);
}

.field small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: .8rem;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.theme-option {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-height: 108px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,.06);
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.theme-option:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.1);
}

.theme-option input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary-2);
}

.theme-option strong,
.theme-option small {
    display: block;
}

.theme-option small {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.45;
}

.theme-option:has(input:checked) {
    border-color: rgba(124, 58, 237, .72);
    background: rgba(124, 58, 237, .14);
}

.split-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.panel-actions form {
    margin: 0;
}

.empty-state {
    text-align: center;
}

.site-list {
    display: grid;
    gap: 14px;
}

.site-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255,255,255,.075);
    box-shadow: 0 18px 50px rgba(0,0,0,.16);
}

.site-row h2 {
    margin: 8px 0 4px;
    font-size: clamp(1.55rem, 3vw, 2.3rem);
}

.site-row p {
    margin: 0;
}

.site-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.site-row code,
.big-code {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #c4b5fd;
    background: rgba(0,0,0,.18);
    font-size: .9rem;
    word-break: break-all;
}

.big-code {
    max-width: 100%;
    margin-top: 8px;
}

.status-pill {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.status-draft {
    color: #fde68a;
    border: 1px solid rgba(245,158,11,.26);
    background: rgba(245,158,11,.12);
}

.status-published {
    color: #bbf7d0;
    border: 1px solid rgba(34,197,94,.28);
    background: rgba(34,197,94,.13);
}

.muted-line {
    display: block;
    margin-top: 9px;
    color: var(--muted);
}

.prompt-box {
    overflow: auto;
    max-height: 360px;
    margin: 14px 0 0;
    padding: 18px;
    white-space: pre-wrap;
    word-break: break-word;
    color: #dbeafe;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(0,0,0,.22);
    line-height: 1.6;
}

@media (max-width: 860px) {
    .auth-shell.wide,
    .theme-grid {
        grid-template-columns: 1fr;
    }

    .split-panel,
    .site-row {
        align-items: stretch;
        flex-direction: column;
    }

    .panel-actions,
    .site-row-actions {
        justify-content: stretch;
    }

    .panel-actions .btn,
    .panel-actions form,
    .panel-actions button,
    .site-row-actions .btn,
    .site-row-actions code {
        width: 100%;
    }
}

/* IA real, logo e paleta */
.form-section-title {
    margin: 24px 0 14px;
    padding-top: 10px;
    color: #e0f2fe;
    font-size: .86rem;
    font-weight: 950;
    letter-spacing: .11em;
    text-transform: uppercase;
    border-top: 1px solid var(--line);
}

.form-section-title:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.field input[type="file"] {
    height: auto;
    min-height: 50px;
    padding: 12px 14px;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.color-field {
    min-width: 0;
}

.color-field input[type="color"] {
    height: 54px;
    padding: 6px;
    cursor: pointer;
}

.palette-preview,
.palette-readonly {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    align-content: end;
    min-height: 86px;
}

.palette-preview span,
.palette-readonly span {
    min-height: 64px;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 12px 30px rgba(0,0,0,.2);
}

.theme-grid-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 680px;
    overflow: auto;
    padding-right: 4px;
}

.theme-swatch {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
    margin-top: 12px;
}

.theme-swatch::before,
.theme-swatch::after,
.theme-swatch {
    min-height: 12px;
}

.theme-swatch {
    background: linear-gradient(90deg, var(--s1), var(--s2), var(--s3));
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
}

.warning-card {
    margin-bottom: 16px;
    border-color: rgba(245, 158, 11, .38);
    background: rgba(245, 158, 11, .1);
}

.warning-card strong {
    display: block;
    margin-bottom: 8px;
    color: #fde68a;
}

.warning-card p {
    margin-bottom: 8px;
}

.warning-card small {
    display: block;
    color: #fed7aa;
    word-break: break-word;
}

.identity-panel {
    margin-bottom: 16px;
}

.logo-preview {
    display: grid;
    place-items: center;
    min-width: 220px;
    min-height: 130px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,255,255,.08);
}

.logo-preview img {
    max-width: 220px;
    max-height: 110px;
    object-fit: contain;
}

@media (max-width: 900px) {
    .color-grid,
    .theme-grid-large {
        grid-template-columns: 1fr;
    }

    .palette-preview,
    .palette-readonly {
        grid-template-columns: repeat(2, 1fr);
    }
}

.current-logo-card,
.republish-info {
    min-height: 104px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .06);
}

.current-logo-card img {
    max-width: 180px;
    max-height: 72px;
    object-fit: contain;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .9);
}

.republish-info strong {
    color: var(--text);
    font-size: 1rem;
}

.republish-info small,
.current-logo-card small {
    color: var(--muted);
    line-height: 1.5;
}

.stacked-actions {
    margin-top: 18px;
    justify-content: flex-start;
}
