@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }

/* ─── Compatibilidade cross-browser ─────────────────────────────── */
html.auth-ramom-root,
html.auth-ramom-root body.auth-ramom {
    min-height: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

@supports (min-height: 100dvh) {
    html.auth-ramom-root,
    html.auth-ramom-root body.auth-ramom,
    .space-auth-page,
    .auth-split,
    .auth-hero,
    .auth-form-panel {
        min-height: 100dvh;
    }
}

@supports (height: 100svh) {
    .space-auth-page,
    .auth-split,
    .auth-hero,
    .auth-form-panel {
        min-height: 100svh;
    }
}

html, body.auth-ramom {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body.auth-ramom {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
    background: #0a0a23;
    overflow-x: hidden;
}

body.auth-ramom a {
    color: #a78bfa;
    text-decoration: none;
}
body.auth-ramom a:hover { color: #c4b5fd; }

/* ─── Página ───────────────────────────────────────────────────── */
.space-auth-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* ─── Fundo espacial (fixo atrás de tudo) ──────────────────────── */
.space-bg {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(78,217,230,.12) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 75%, rgba(139,92,246,.15) 0%, transparent 50%),
        linear-gradient(160deg, #0a0a23 0%, #1a0b2e 45%, #0a0a23 100%);
    overflow: hidden;
}

.space-bg::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image:
        radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,.9), transparent),
        radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,.7), transparent),
        radial-gradient(1.5px 1.5px at 40% 10%, rgba(255,255,255,.8), transparent),
        radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,.6), transparent),
        radial-gradient(1px 1px at 70% 25%, rgba(255,255,255,.9), transparent),
        radial-gradient(1px 1px at 85% 55%, rgba(255,255,255,.7), transparent),
        radial-gradient(1px 1px at 15% 70%, rgba(255,255,255,.5), transparent),
        radial-gradient(1px 1px at 50% 65%, rgba(255,255,255,.6), transparent),
        radial-gradient(1px 1px at 80% 90%, rgba(255,255,255,.5), transparent),
        radial-gradient(1px 1px at 92% 15%, rgba(255,255,255,.8), transparent),
        radial-gradient(1px 1px at 35% 55%, rgba(255,255,255,.5), transparent);
}

/* ─── Sistema solar (coluna esquerda, centrado como o formulário) ─ */
.auth-hero-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    padding: 16px 12px 24px;
}

.auth-hero--visual .auth-hero-center {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 48px 40px 56px 56px;
    pointer-events: none;
}

.auth-hero-center .solar-system {
    pointer-events: auto;
}

.solar-system {
    position: relative;
    width: min(90vw, 480px);
    height: min(90vw, 480px);
    max-height: min(62vh, 480px);
    flex-shrink: 0;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.solar-sun {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: clamp(56px, 13%, 72px);
    height: clamp(56px, 13%, 72px);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 32% 28%, #fffef0 0%, #ffe066 28%, #ffb020 55%, #ff6a00 100%);
    box-shadow:
        0 0 36px rgba(255, 180, 40, 1),
        0 0 90px rgba(255, 120, 0, .7),
        0 0 150px rgba(255, 90, 0, .4);
    animation: solar-sun-pulse 5s ease-in-out infinite;
    transition: opacity .45s ease, transform .45s ease;
}

@keyframes solar-sun-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.06); opacity: .95; }
}

.solar-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    animation: solar-orbit-spin linear infinite;
    transition: opacity .45s ease, width .55s ease, height .55s ease, border-color .45s ease;
    pointer-events: none;
    will-change: transform;
}

@-webkit-keyframes solar-orbit-spin {
    from { -webkit-transform: translate(-50%, -50%) rotate(0deg); transform: translate(-50%, -50%) rotate(0deg); }
    to { -webkit-transform: translate(-50%, -50%) rotate(360deg); transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes solar-orbit-spin {
    from { -webkit-transform: translate(-50%, -50%) rotate(0deg); transform: translate(-50%, -50%) rotate(0deg); }
    to { -webkit-transform: translate(-50%, -50%) rotate(360deg); transform: translate(-50%, -50%) rotate(360deg); }
}

.solar-orbit--1 { width: 28%; height: 28%; animation-duration: 9s; z-index: 6; }
.solar-orbit--2 { width: 40%; height: 40%; animation-duration: 14s; animation-direction: reverse; z-index: 5; }
.solar-orbit--3 { width: 52%; height: 52%; animation-duration: 20s; z-index: 4; }
.solar-orbit--4 { width: 64%; height: 64%; animation-duration: 28s; animation-direction: reverse; z-index: 3; }
.solar-orbit--5 { width: 78%; height: 78%; animation-duration: 40s; z-index: 2; }
.solar-orbit--6 { width: 94%; height: 94%; animation-duration: 55s; animation-direction: reverse; z-index: 1; }

.solar-planet {
    position: absolute;
    top: 0;
    left: 50%;
    display: block;
    border: none;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px rgba(255, 255, 255, .3);
    cursor: pointer;
    background-color: transparent;
    pointer-events: auto;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: width .55s ease, height .55s ease, top .55s ease, left .55s ease, box-shadow .35s ease;
}

.solar-planet::before {
    content: '';
    position: absolute;
    top: -14px;
    right: -14px;
    bottom: -14px;
    left: -14px;
    border-radius: 50%;
}

.solar-planet:hover {
    box-shadow: 0 0 18px rgba(255, 255, 255, .55);
    filter: brightness(1.15);
}

.solar-planet:focus-visible {
    outline: 2px solid #c4b5fd;
    outline-offset: 6px;
}

.solar-planet--mercury {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 35% 30%, #e8e8e8, #8a8a8a 70%, #5a5a5a);
}

.solar-planet--venus {
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at 35% 30%, #ffe8b8, #d4a056 65%, #9a6830);
}

.solar-planet--earth {
    width: 18px;
    height: 18px;
    background: radial-gradient(circle at 35% 30%, #7ee8f0, #2e8bff 45%, #1a6b3a 75%, #0d4a28);
    box-shadow: 0 0 14px rgba(78, 217, 230, .55);
}

.solar-planet--mars {
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 35% 30%, #f0a080, #c44d2a 60%, #7a2818);
}

.solar-planet--jupiter {
    width: 28px;
    height: 28px;
    background:
        linear-gradient(180deg, transparent 18%, rgba(180, 120, 70, .45) 22%, transparent 26%),
        linear-gradient(180deg, transparent 42%, rgba(120, 80, 50, .35) 48%, transparent 54%),
        radial-gradient(circle at 35% 30%, #f0c890, #c98642 55%, #8a5020);
}

.solar-planet--saturn {
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 35% 30%, #f5dfa0, #c9a04a 60%, #8a6520);
}

.solar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 12px;
    border: 2px solid rgba(230, 200, 140, .85);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-18deg);
    box-shadow: 0 0 10px rgba(210, 180, 120, .35);
    pointer-events: none;
    transition: width .55s ease, height .55s ease;
}

/* Modo foco: esconde resto e amplia planeta seleccionado */
.solar-system.is-planet-focus {
    height: auto;
    min-height: 360px;
    padding-bottom: 44px;
}

.solar-system.is-planet-focus > .solar-sun,
.solar-system.is-planet-focus .solar-orbit:not(.is-selected) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.solar-system.is-planet-focus .solar-orbit.is-selected {
    z-index: 5;
    animation: none !important;
    width: min(220px, 52vw) !important;
    height: min(220px, 52vw) !important;
    border-color: transparent;
    top: calc(50% - 70px);
}

.solar-system.is-planet-focus .solar-orbit.is-selected .solar-planet {
    top: 50%;
    left: 50%;
    animation: planet-focus-spin 14s linear infinite;
    filter: none;
}

.solar-system.is-planet-focus .solar-orbit.is-selected .solar-planet--mercury {
    width: min(160px, 42vw);
    height: min(160px, 42vw);
    box-shadow: 0 0 40px rgba(200, 200, 200, .45);
}

.solar-system.is-planet-focus .solar-orbit.is-selected .solar-planet--venus {
    width: min(180px, 46vw);
    height: min(180px, 46vw);
    box-shadow: 0 0 45px rgba(212, 160, 86, .5);
}

.solar-system.is-planet-focus .solar-orbit.is-selected .solar-planet--earth {
    width: min(200px, 50vw);
    height: min(200px, 50vw);
    box-shadow: 0 0 55px rgba(78, 217, 230, .55);
}

.solar-system.is-planet-focus .solar-orbit.is-selected .solar-planet--mars {
    width: min(175px, 44vw);
    height: min(175px, 44vw);
    box-shadow: 0 0 45px rgba(196, 77, 42, .5);
}

.solar-system.is-planet-focus .solar-orbit.is-selected .solar-planet--jupiter {
    width: min(240px, 58vw);
    height: min(240px, 58vw);
    box-shadow: 0 0 60px rgba(201, 134, 66, .55);
}

.solar-system.is-planet-focus .solar-orbit.is-selected .solar-planet--saturn {
    width: min(210px, 52vw);
    height: min(210px, 52vw);
    box-shadow: 0 0 50px rgba(201, 160, 74, .5);
}

.solar-system.is-planet-focus .solar-orbit.is-selected .solar-ring {
    width: min(320px, 72vw);
    height: min(36px, 8vw);
    border-width: 3px;
}

@keyframes planet-focus-spin {
    from { -webkit-transform: translate(-50%, -50%) rotate(0deg); transform: translate(-50%, -50%) rotate(0deg); }
    to { -webkit-transform: translate(-50%, -50%) rotate(360deg); transform: translate(-50%, -50%) rotate(360deg); }
}

@-webkit-keyframes planet-focus-spin {
    from { -webkit-transform: translate(-50%, -50%) rotate(0deg); transform: translate(-50%, -50%) rotate(0deg); }
    to { -webkit-transform: translate(-50%, -50%) rotate(360deg); transform: translate(-50%, -50%) rotate(360deg); }
}

.solar-planet-info {
    position: absolute;
    left: 50%;
    bottom: 36px;
    z-index: 7;
    width: min(380px, 94%);
    transform: translateX(-50%);
    text-align: center;
    padding: 14px 16px 12px;
    border: 1px solid rgba(139, 92, 246, .35);
    border-radius: 14px;
    background: rgba(10, 10, 35, .82);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: solar-info-in .4s ease;
}

.solar-planet-info[hidden] {
    display: none !important;
}

.solar-planet-info__name {
    margin: 0 0 10px;
    font-size: clamp(1.15rem, 3.5vw, 1.45rem);
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #f5f3ff;
}

.solar-planet-info__facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    margin: 0 0 12px;
    text-align: left;
}

.solar-planet-info__facts dt {
    margin: 0;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #c4b5fd;
}

.solar-planet-info__facts dd {
    margin: 3px 0 0;
    font-size: .78rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, .88);
}

.solar-planet-info__desc {
    margin: 0;
    font-size: .82rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .62);
}

@keyframes solar-info-in {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.solar-focus-back {
    position: absolute;
    bottom: 0;
    left: 50%;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
    padding: 8px 14px;
    border: 1px solid rgba(139, 92, 246, .45);
    border-radius: 999px;
    background: rgba(26, 11, 46, .88);
    color: #e9d5ff;
    font-family: inherit;
    font-size: .72rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: background .2s ease, border-color .2s ease;
}

.solar-focus-back:hover {
    background: rgba(94, 53, 177, .55);
    border-color: rgba(196, 181, 253, .6);
}

.solar-focus-back[hidden] {
    display: none !important;
}

.nebula-cloud {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .3;
}
.nebula-cloud.nc1 { width:280px; height:180px; bottom:8%; left:4%; background:rgba(139,92,246,.5); }
.nebula-cloud.nc2 { width:220px; height:160px; top:38%; right:8%; background:rgba(59,130,246,.3); }

/* ─── Grelha principal 50 / 50 ───────────────────────────────── */
.auth-split {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-height: 100vh;
}

/* Coluna esquerda — hero transparente */
.auth-hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 48px 40px 56px 56px;
    min-height: 100vh;
    position: relative;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}
.auth-brand img { height: 44px; width: auto; }
.auth-brand span { font-size: 1.05rem; font-weight: 700; color: #fff; }

.auth-hero-bottom {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.auth-hero-bottom h1 {
    margin: 0;
    font-size: clamp(1.6rem, 2.8vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: .02em;
    max-width: 380px;
}
.auth-hero-bottom h1 .accent { color: #c084fc; display: block; }

.auth-hero-tagline {
    margin: 14px 0 0;
    font-size: .92rem;
    color: rgba(255,255,255,.6);
    max-width: 360px;
    line-height: 1.6;
}

/* Coluna direita — painel do formulário */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 48px 40px;
    background: rgba(26, 11, 46, .82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(139, 92, 246, .18);
}

.auth-form-panel.is-scroll {
    align-items: flex-start;
    padding-top: 36px;
    padding-bottom: 36px;
    overflow-y: auto;
}

.auth-form-box {
    width: 100%;
    max-width: 400px;
}
.auth-form-box.is-wide { max-width: 480px; }

.auth-form-header { margin-bottom: 28px; }
.auth-form-header h2 {
    margin: 0 0 6px;
    font-size: 1.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.auth-form-header p {
    margin: 0;
    font-size: .88rem;
    color: rgba(255,255,255,.5);
}

/* ─── Campos ───────────────────────────────────────────────────── */
.auth-field { margin-bottom: 16px; }

.auth-label {
    display: block;
    margin-bottom: 5px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255,255,255,.45);
}

.auth-input-wrap { position: relative; }

.auth-input-wrap .auth-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.35);
    font-size: .9rem;
    pointer-events: none;
    z-index: 2;
    line-height: 1;
}

.auth-input,
.auth-select {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(139,92,246,.28);
    border-radius: 10px;
    background: rgba(20, 10, 40, .85);
    color: #fff;
    font-family: inherit;
    font-size: .92rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.auth-input-wrap .auth-input { padding-left: 40px; }

.auth-select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%23a78bfa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.auth-select option { background: #1a0b2e; color: #fff; }

.auth-input::placeholder { color: rgba(255,255,255,.3); }
.auth-input:focus,
.auth-select:focus {
    border-color: rgba(78,217,230,.55);
    box-shadow: 0 0 0 3px rgba(78,217,230,.1);
}

.auth-hint { margin-top: 4px; font-size: .72rem; color: rgba(255,255,255,.35); }
.auth-validation { display: block; margin-top: 4px; font-size: .75rem; color: #f87171; }

/* ─── Botões ───────────────────────────────────────────────────── */
.auth-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    margin-top: 6px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #5e35b1, #42a5f5);
    color: #fff;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(94,53,177,.35);
    transition: transform .15s, box-shadow .2s;
}
.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(94,53,177,.5);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2px 0 6px;
    font-size: .82rem;
    color: rgba(255,255,255,.5);
    flex-wrap: wrap;
    gap: 6px;
}
.auth-options label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.auth-options input[type="checkbox"] { accent-color: #7c3aed; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    font-size: .8rem;
    color: rgba(255,255,255,.35);
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,.1);
}

.auth-btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(25,25,45,.75);
    color: #fff;
    font-family: inherit;
    font-size: .86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}
.auth-btn-social:hover { background: rgba(45,45,70,.85); color: #fff; }

/* ─── Alertas & links ──────────────────────────────────────────── */
.auth-alert {
    padding: 10px 14px;
    margin-bottom: 14px;
    border-radius: 8px;
    font-size: .84rem;
    text-align: center;
    border: 1px solid rgba(74,222,128,.35);
    background: rgba(74,222,128,.07);
    color: #86efac;
}
.auth-alert.danger {
    border-color: rgba(248,113,113,.35);
    background: rgba(248,113,113,.07);
    color: #fca5a5;
}
.auth-alert ul { margin: 6px 0 0; padding-left: 18px; text-align: left; }

.auth-switch-link {
    margin-top: 16px;
    text-align: center;
    font-size: .86rem;
    color: rgba(255,255,255,.45);
}
.auth-switch-link a { font-weight: 700; }

.auth-footer-text {
    margin-top: 20px;
    text-align: center;
    font-size: .75rem;
    color: rgba(255,255,255,.35);
    line-height: 1.55;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    font-size: .84rem;
    color: rgba(255,255,255,.5);
}
.auth-back-link:hover { color: #fff; }

/* ─── Registo ──────────────────────────────────────────────────── */
.auth-fieldset { margin: 0 0 24px; padding: 0; border: none; }
.auth-fieldset legend {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #a78bfa;
}

.auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.auth-grid-2 .span-2 { grid-column: span 2; }

.auth-info-box {
    padding: 11px 13px;
    border-radius: 8px;
    border: 1px solid rgba(96,165,250,.25);
    background: rgba(59,130,246,.07);
    font-size: .76rem;
    line-height: 1.5;
    color: rgba(147,197,253,.85);
    margin-bottom: 16px;
}

.auth-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}
.auth-plan-card { position: relative; cursor: pointer; }
.auth-plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.auth-plan-card .plan-body {
    padding: 12px;
    border-radius: 10px;
    border: 2px solid rgba(139,92,246,.22);
    background: rgba(20,10,40,.5);
    transition: border-color .2s, background .2s;
}
.auth-plan-card input:checked + .plan-body {
    border-color: #7c3aed;
    background: rgba(124,58,237,.1);
}
.auth-plan-card .plan-name { font-weight: 700; font-size: .86rem; }
.auth-plan-card .plan-price { margin-top: 4px; font-size: 1rem; font-weight: 800; color: #a78bfa; }
.auth-plan-card .plan-price small { font-size: .68rem; font-weight: 500; color: rgba(255,255,255,.35); }
.auth-plan-card .plan-features { margin: 8px 0 0; padding: 0; list-style: none; font-size: .7rem; color: rgba(255,255,255,.45); }
.auth-plan-card .plan-features li { margin-bottom: 2px; }
.auth-plan-card .plan-features i { color: #4ade80; font-size: .6rem; margin-right: 3px; }

/* ─── Demo access (abaixo do hero) ─────────────────────────────── */
.auth-hero-bottom {
    width: 100%;
}

.auth-hero-bottom .auth-demo-wrap {
    margin-top: 28px;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.auth-demo-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(139,92,246,.45) transparent;
}

.auth-demo-scroll::-webkit-scrollbar { height: 4px; }
.auth-demo-scroll::-webkit-scrollbar-thumb {
    background: rgba(139,92,246,.45);
    border-radius: 4px;
}

.auth-demo-hint {
    margin: 0 0 10px;
    font-size: .76rem;
    line-height: 1.45;
    color: rgba(255,255,255,.55);
}

.auth-demo-hint strong {
    color: #e9d5ff;
    font-weight: 600;
}

.auth-demo-table {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    border-collapse: collapse;
    border: 1px solid rgba(139,92,246,.2);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(26,11,46,.7);
}

.auth-demo-table th,
.auth-demo-table td {
    padding: 8px 10px;
    border: 1px solid rgba(139,92,246,.12);
    font-size: .78rem;
    color: rgba(255,255,255,.72);
    text-align: center;
    vertical-align: middle;
}

.auth-demo-table th {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #c4b5fd;
    background: rgba(94,53,177,.22);
}

.auth-demo-table--profiles .auth-demo-profile {
    width: 32%;
    font-weight: 700;
    color: #ede9fe;
    white-space: nowrap;
}

.auth-demo-table--profiles .auth-demo-email {
    font-family: 'Courier New', Courier, monospace;
    font-size: .72rem;
    color: rgba(255,255,255,.82);
    word-break: break-all;
}

.auth-demo-table--profiles .auth-demo-school {
    font-weight: 600;
    color: #c4b5fd;
    white-space: nowrap;
}

.auth-demo-row.is-clickable {
    cursor: pointer;
    transition: background .15s ease;
}

.auth-demo-row.is-clickable:hover,
.auth-demo-row.is-clickable:focus-visible {
    background: rgba(94,53,177,.38);
    outline: none;
}

.auth-demo-row.is-disabled {
    opacity: .4;
    cursor: not-allowed;
}

.auth-btn-demo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    margin-top: 10px;
    padding: 6px 12px;
    border: 1px solid rgba(139,92,246,.35);
    border-radius: 5px;
    background: rgba(94,53,177,.25);
    color: #e9d5ff;
    font-family: inherit;
    font-size: .72rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.auth-btn-demo--super {
    font-family: 'Courier New', Courier, monospace;
    font-size: .68rem;
}

.auth-btn-demo:hover:not(:disabled) { background: rgba(94,53,177,.5); }
.auth-btn-demo:disabled { opacity: .35; cursor: not-allowed; }

.auth-demo-more {
    margin-top: 14px;
    font-size: .76rem;
    color: rgba(255,255,255,.55);
}

.auth-demo-more summary {
    cursor: pointer;
    color: #c4b5fd;
    font-weight: 600;
    list-style: none;
}

.auth-demo-more summary::-webkit-details-marker { display: none; }

.auth-demo-more[open] summary {
    margin-bottom: 8px;
}

.auth-demo-scroll--compact {
    margin-top: 4px;
}

/* ─── Responsivo: telemóvel pequeno → grande ───────────────────── */
@media (max-width: 900px) {
    /* Sistema solar — apenas desktop */
    .auth-hero-center,
    .auth-hero-center .solar-system {
        display: none !important;
    }

    /* Login: coluna hero só servia para o solar */
    .auth-hero.auth-hero--visual {
        display: none !important;
    }

    .auth-split {
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        flex-direction: column;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: 100dvh;
        width: 100%;
    }

    .auth-form-panel {
        -webkit-box-ordinal-group: 2;
        -webkit-order: 1;
        order: 1;
        -webkit-box-flex: 0;
        -webkit-flex: 0 0 auto;
        flex: 0 0 auto;
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        width: 100%;
        min-height: auto;
        border-left: none;
        border-bottom: none;
        background: rgba(10, 10, 35, .22);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        padding:
            max(24px, calc(20px + env(safe-area-inset-top, 0px)))
            max(20px, env(safe-area-inset-right, 0px))
            clamp(24px, 5vw, 32px)
            max(20px, env(safe-area-inset-left, 0px));
    }

    /* Login: só formulário — ocupa ecrã e desce ligeiramente do topo */
    .auth-hero.auth-hero--visual + .auth-form-panel {
        -webkit-box-flex: 1;
        -webkit-flex: 1 1 auto;
        flex: 1 1 auto;
        min-height: 0;
        -webkit-box-pack: start;
        -webkit-justify-content: flex-start;
        justify-content: flex-start;
        padding-top: clamp(96px, 20vh, 168px);
    }

    .auth-form-header {
        margin-bottom: 24px;
        text-align: center;
    }

    .auth-form-header h2,
    .auth-form-header p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .auth-form-header h2 {
        font-size: clamp(1.45rem, 5vw, 1.85rem);
    }

    .auth-form-header p {
        max-width: 22rem;
    }

    .auth-form-panel.is-scroll {
        overflow-y: visible;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
    }

    .auth-hero {
        -webkit-box-ordinal-group: 3;
        -webkit-order: 2;
        order: 2;
        min-height: auto;
        padding:
            clamp(20px, 4vw, 28px)
            max(20px, env(safe-area-inset-right, 0px))
            max(28px, calc(24px + env(safe-area-inset-bottom, 0px)))
            max(20px, env(safe-area-inset-left, 0px));
        justify-content: flex-start;
        gap: clamp(16px, 4vw, 24px);
        text-align: center;
        align-items: stretch;
    }

    .auth-hero--visual .auth-hero-center {
        position: relative;
        inset: auto;
        padding: 0 0 8px;
        pointer-events: auto;
    }

    .auth-hero-bottom {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .auth-hero-bottom h1 {
        max-width: none;
        margin: 0 auto;
        font-size: clamp(1.35rem, 5.5vw, 2rem);
    }

    .auth-hero-tagline {
        max-width: 34rem;
        margin-left: auto;
        margin-right: auto;
        font-size: clamp(.82rem, 3.2vw, .95rem);
    }

    .auth-hero-bottom .auth-demo-wrap {
        margin-top: clamp(16px, 4vw, 24px);
        text-align: center;
    }

    .auth-brand {
        justify-content: center;
    }

    .auth-brand img { height: clamp(36px, 10vw, 44px); }
    .auth-brand span { font-size: clamp(.92rem, 3.5vw, 1.05rem); }

    .auth-hero-center {
        flex: none;
        padding: 0;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .solar-system.is-planet-focus {
        min-height: 520px;
    }

    .solar-system.is-planet-focus .solar-orbit.is-selected {
        top: calc(50% - 80px);
    }

    .solar-planet-info {
        bottom: 40px;
        padding: 12px 14px 10px;
    }

    .solar-planet-info__facts {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .solar-system {
        width: min(86vw, 340px);
        height: min(86vw, 340px);
        max-height: none;
        margin: 0 auto;
    }

    .solar-system.is-planet-focus .solar-orbit.is-selected .solar-planet--mercury {
        width: min(140px, 52vw);
        height: min(140px, 52vw);
    }

    .solar-system.is-planet-focus .solar-orbit.is-selected .solar-planet--jupiter {
        width: min(200px, 62vw);
        height: min(200px, 62vw);
    }

    .auth-form-box,
    .auth-form-box.is-wide {
        max-width: 28rem;
        width: 100%;
        margin: 0 auto;
    }

    .auth-input,
    .auth-select {
        background: rgba(10, 10, 35, .35);
        border-color: rgba(139, 92, 246, .22);
    }

    .auth-btn-primary,
    .auth-btn-social {
        height: clamp(44px, 12vw, 48px);
        font-size: clamp(.86rem, 3.4vw, .92rem);
    }

    .auth-grid-2 { grid-template-columns: 1fr; }
    .auth-grid-2 .span-2 { grid-column: span 1; }

    .auth-demo-hint {
        font-size: clamp(.72rem, 3vw, .76rem);
        text-align: center;
    }

    .auth-demo-table--profiles .auth-demo-profile {
        width: 34%;
    }

    .auth-demo-table--profiles .auth-demo-email {
        font-size: clamp(.64rem, 2.6vw, .72rem);
    }

    .auth-demo-table th {
        font-size: clamp(.62rem, 2.4vw, .7rem);
        padding: 7px 8px;
    }

    .auth-demo-table td {
        padding: 8px;
        font-size: clamp(.72rem, 3vw, .78rem);
    }
}

/* Telemóvel médio (ex: iPhone 12–15, Android 6") */
@media (max-width: 600px) and (min-width: 401px) {
    .auth-form-panel {
        background: rgba(10, 10, 35, .18);
    }
}

/* Telemóvel pequeno (ex: iPhone SE, 320–400px) */
@media (max-width: 400px) {
    .auth-hero {
        padding-left: max(14px, env(safe-area-inset-left, 0px));
        padding-right: max(14px, env(safe-area-inset-right, 0px));
        gap: 18px;
    }

    .auth-hero-bottom h1 { font-size: 1.28rem; }
    .auth-hero-tagline { font-size: .8rem; line-height: 1.55; }

    .auth-form-panel {
        padding-left: max(14px, env(safe-area-inset-left, 0px));
        padding-right: max(14px, env(safe-area-inset-right, 0px));
        background: rgba(10, 10, 35, .16);
    }

    .solar-system {
        width: min(88vw, 300px);
        height: min(88vw, 300px);
    }

    .auth-form-header { margin-bottom: 22px; text-align: center; }
    .auth-form-header h2 { font-size: 1.38rem; text-align: center; }
    .auth-form-header p { text-align: center; margin-left: auto; margin-right: auto; }

    .auth-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .auth-btn-demo {
        min-height: 36px;
        font-size: .66rem;
    }
}

/* Telemóvel muito pequeno (≤ 360px) */
@media (max-width: 360px) {
    .auth-hero-bottom h1 { font-size: 1.18rem; }
    .auth-brand span { font-size: .88rem; }
    .auth-btn-demo { font-size: .62rem; min-height: 34px; }

    .solar-system {
        width: min(90vw, 280px);
        height: min(90vw, 280px);
    }
}

/* ─── Fallbacks quando o navegador não suporta recursos modernos ─ */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .auth-form-panel {
        background: rgba(26, 11, 46, .94);
    }

    .auth-form-panel .auth-input,
    .auth-form-panel .auth-select {
        background: rgba(20, 10, 40, .95);
    }

    .solar-planet-info,
    .solar-focus-back {
        background: rgba(10, 10, 35, .95);
    }

    @media (max-width: 900px) {
        .auth-form-panel {
            background: rgba(10, 10, 35, .9);
        }
    }
}

@supports not (width: min(10px, 10px)) {
    .solar-system {
        width: 90vw;
        height: 90vw;
        max-width: 480px;
        max-height: 480px;
    }

    @media (max-width: 900px) {
        .solar-system {
            width: 86vw;
            height: 86vw;
            max-width: 340px;
            max-height: 340px;
        }
    }
}

@supports not (gap: 12px) {
    .auth-brand > * + * { margin-left: 12px; }
    .auth-btn-primary > * + * { margin-left: 8px; }
    .auth-options label > * + * { margin-left: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    .solar-orbit,
    .solar-sun,
    .solar-system.is-planet-focus .solar-orbit.is-selected .solar-planet,
    .solar-planet-info {
        -webkit-animation: none !important;
        animation: none !important;
        transition: none !important;
    }
}
