:root {
    color-scheme: light;
    --bg: #f4f4f4;
    --panel: #f4f4f4;
    --text: #00C1CA;
    --muted: #ffffff;
    --accent: #00C1CA;
    --accent-strong: #00C1CA;
    --danger: #f43f5e;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    background-image: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.auth-shell {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.auth-panel,
.auth-preview {
    background: var(--panel);
    border-radius: 28px;
    padding: 48px;
    box-shadow: var(--shadow);
}

.auth-preview {
    background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.12), transparent 60%), var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(15, 23, 42, 0.75);
    color: white;
    padding: 32px;
    max-width: 320px;
    text-align: left;
    line-height: 1.5;
}

.glass h2 {
    margin-top: 0;
    font-size: 1.75rem;
}

header {
    margin-bottom: 32px;
}

.eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.powered-by {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.powered-by .powered-by-logo {
    height: 18px;
    width: auto;
    display: block;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.75rem);
}

.subtitle {
    color: var(--muted);
    margin-top: 12px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--muted);
}

.field input,
.field select {
    width: 100%;
    border-radius: 0.5rem;
    background-color: #205E65;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.25rem;
    color: var(--muted);
}

.field input::placeholder,
.field select::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.field input:focus,
.field select:focus {
    outline: none;
    background-color: #397075;
    border-color: transparent;
}

.primary {
    border: none;
    border-radius: 18px;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    color: white;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.35);
}

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

.muted a {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 500;
}

.form-feedback {
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.form-feedback.error {
    background: rgba(244, 63, 94, 0.12);
    color: var(--danger);
}

.form-feedback.success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.divider {
    border: none;
    border-top: 1px dashed rgba(15, 23, 42, 0.15);
    margin: 32px 0;
}

.small {
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    body {
        padding: 16px;
    }

    .auth-panel,
    .auth-preview {
        padding: 32px 24px;
        border-radius: 24px;
    }

    .glass {
        width: 100%;
    }
}

/* -----------------------------
   Login (layout unificado)
   Escopado por data-auth-page
------------------------------ */

body[data-auth-page="login"],
body[data-auth-page="password-reset"],
body[data-auth-page="confirm"],
body[data-auth-page="first-access"] {
    background: var(--bg);
    background-image: none;
    color: var(--muted);
    font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body[data-auth-page="login"] .login-card-wrapper,
body[data-auth-page="password-reset"] .login-card-wrapper,
body[data-auth-page="confirm"] .login-card-wrapper,
body[data-auth-page="first-access"] .login-card-wrapper {
    width: min(1100px, 100%);
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 50px rgba(2, 6, 23, 0.55);
}

body[data-auth-page="login"] .login-left,
body[data-auth-page="login"] .login-right,
body[data-auth-page="password-reset"] .login-left,
body[data-auth-page="password-reset"] .login-right,
body[data-auth-page="confirm"] .login-left,
body[data-auth-page="confirm"] .login-right,
body[data-auth-page="first-access"] .login-left,
body[data-auth-page="first-access"] .login-right {
    flex: 1 1 50%;
    min-width: 0;
}

body[data-auth-page="login"] .login-left,
body[data-auth-page="password-reset"] .login-left,
body[data-auth-page="confirm"] .login-left,
body[data-auth-page="first-access"] .login-left {
    background: #074c53;
    padding: 56px 52px;
}

body[data-auth-page="login"] .login-header,
body[data-auth-page="password-reset"] .login-header,
body[data-auth-page="confirm"] .login-header,
body[data-auth-page="first-access"] .login-header {
    margin-bottom: 32px;
}

body[data-auth-page="login"] .login-left .eyebrow,
body[data-auth-page="password-reset"] .login-left .eyebrow,
body[data-auth-page="confirm"] .login-left .eyebrow,
body[data-auth-page="first-access"] .login-left .eyebrow {
    color: var(--muted);
}

body[data-auth-page="login"] .login-left h1,
body[data-auth-page="password-reset"] .login-left h1,
body[data-auth-page="confirm"] .login-left h1,
body[data-auth-page="first-access"] .login-left h1 {
    color: var(--muted);
}

body[data-auth-page="login"] .login-left .subtitle,
body[data-auth-page="password-reset"] .login-left .subtitle,
body[data-auth-page="confirm"] .login-left .subtitle,
body[data-auth-page="first-access"] .login-left .subtitle {
    color: rgba(255, 255, 255, 0.72);
}

body[data-auth-page="login"] .login-left .field,
body[data-auth-page="password-reset"] .login-left .field,
body[data-auth-page="confirm"] .login-left .field,
body[data-auth-page="first-access"] .login-left .field {
    color: rgba(255, 255, 255, 0.8);
}

body[data-auth-page="login"] .login-left .field input,
body[data-auth-page="login"] .login-left .field select,
body[data-auth-page="password-reset"] .login-left .field input,
body[data-auth-page="password-reset"] .login-left .field select,
body[data-auth-page="confirm"] .login-left .field input,
body[data-auth-page="confirm"] .login-left .field select,
body[data-auth-page="first-access"] .login-left .field input,
body[data-auth-page="first-access"] .login-left .field select {
    border: none;
    border-radius: 14px;
}

body[data-auth-page="login"] .login-left .field input:focus,
body[data-auth-page="login"] .login-left .field select:focus,
body[data-auth-page="password-reset"] .login-left .field input:focus,
body[data-auth-page="password-reset"] .login-left .field select:focus,
body[data-auth-page="confirm"] .login-left .field input:focus,
body[data-auth-page="confirm"] .login-left .field select:focus,
body[data-auth-page="first-access"] .login-left .field input:focus,
body[data-auth-page="first-access"] .login-left .field select:focus {
    outline: 2px solid var(--accent);
}

body[data-auth-page="login"] .login-left .primary,
body[data-auth-page="password-reset"] .login-left .primary,
body[data-auth-page="confirm"] .login-left .primary,
body[data-auth-page="first-access"] .login-left .primary {
    box-shadow: 0 12px 28px rgb(0, 193, 202, 0.28);
}

body[data-auth-page="login"] .login-left .primary:hover,
body[data-auth-page="password-reset"] .login-left .primary:hover,
body[data-auth-page="confirm"] .login-left .primary:hover,
body[data-auth-page="first-access"] .login-left .primary:hover {
    box-shadow: 0 16px 34px rgb(0, 193, 202, 0.38);
}

body[data-auth-page="login"] .login-right,
body[data-auth-page="password-reset"] .login-right,
body[data-auth-page="confirm"] .login-right,
body[data-auth-page="first-access"] .login-right {
    position: relative;
    background-image: url('../img/fundo-card.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 52px;
}

body[data-auth-page="login"] .login-right::before,
body[data-auth-page="password-reset"] .login-right::before,
body[data-auth-page="confirm"] .login-right::before,
body[data-auth-page="first-access"] .login-right::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(23, 2, 2, 0.55);
}

body[data-auth-page="login"] .login-hero-content,
body[data-auth-page="password-reset"] .login-hero-content,
body[data-auth-page="confirm"] .login-hero-content,
body[data-auth-page="first-access"] .login-hero-content {
    position: relative;
    z-index: 1;
    color: var(--muted);
    text-align: center;
    max-width: 380px;
}

body[data-auth-page="login"] .login-hero-content h2,
body[data-auth-page="password-reset"] .login-hero-content h2,
body[data-auth-page="confirm"] .login-hero-content h2,
body[data-auth-page="first-access"] .login-hero-content h2 {
    margin: 0 0 12px;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
}

body[data-auth-page="login"] .login-hero-content p,
body[data-auth-page="password-reset"] .login-hero-content p,
body[data-auth-page="confirm"] .login-hero-content p,
body[data-auth-page="first-access"] .login-hero-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

@media (max-width: 900px) {
    body[data-auth-page="login"] .login-card-wrapper,
    body[data-auth-page="password-reset"] .login-card-wrapper,
    body[data-auth-page="confirm"] .login-card-wrapper,
    body[data-auth-page="first-access"] .login-card-wrapper {
        flex-direction: column;
    }

    body[data-auth-page="login"] .login-left,
    body[data-auth-page="login"] .login-right,
    body[data-auth-page="password-reset"] .login-left,
    body[data-auth-page="password-reset"] .login-right,
    body[data-auth-page="confirm"] .login-left,
    body[data-auth-page="confirm"] .login-right,
    body[data-auth-page="first-access"] .login-left,
    body[data-auth-page="first-access"] .login-right {
        flex-basis: auto;
    }
}
