:root {
    --gw-primary: #098dcc;
    --gw-primary-dark: #04527a;
    --gw-primary-soft: #e6f4fb;
    --gw-accent: #0acb8e;
    --gw-accent-soft: #e6faf4;
    --gw-surface: rgba(255, 255, 255, 0.92);
    --gw-border: rgba(9, 141, 204, 0.14);
    --gw-text: #1f2a37;
    --gw-muted: #607086;
    --gw-shadow: 0 28px 70px rgba(4, 36, 63, 0.14);
}

body.gw-auth-body {
    min-height: 100vh;
    color: var(--gw-text);
    background:
        radial-gradient(circle at top left, rgba(10, 203, 142, 0.14), transparent 24%),
        radial-gradient(circle at bottom right, rgba(9, 141, 204, 0.18), transparent 28%),
        linear-gradient(180deg, #f4f9fc 0%, #eef4f7 100%);
}

/* Evita overflow por width:100% + padding em inputs */
body.gw-auth-body *,
body.gw-auth-body *::before,
body.gw-auth-body *::after {
    box-sizing: border-box;
}

.gw-auth-shell {
    position: relative;
    min-height: 100vh;
    /* respeita a altura do topbar do site (index) */
    padding: calc(var(--top-h, 72px) + 2.25rem) 1.25rem 3rem;
}

.gw-auth-shell::before,
.gw-auth-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(24px);
    opacity: 0.7;
    pointer-events: none;
}

.gw-auth-shell::before {
    width: 220px;
    height: 220px;
    top: 110px;
    left: 4%;
    background: rgba(9, 141, 204, 0.14);
}

.gw-auth-shell::after {
    width: 260px;
    height: 260px;
    right: 3%;
    bottom: 5%;
    background: rgba(10, 203, 142, 0.12);
}

.gw-auth-grid {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
    background: var(--gw-surface);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--gw-shadow);
}

.gw-auth-grid.gw-auth-single {
    position: relative;
    grid-template-columns: minmax(0, 520px);
    justify-content: center;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.gw-auth-grid.gw-auth-single::before {
    content: "";
    position: absolute;
    inset: -28px -36px;
    border-radius: 44px;
    background:
        radial-gradient(900px 380px at 18% 18%, rgba(9, 141, 204, 0.22), transparent 58%),
        radial-gradient(780px 340px at 86% 78%, rgba(10, 203, 142, 0.18), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.15));
    filter: blur(1px);
    pointer-events: none;
    z-index: 0;
}

.gw-auth-aside {
    position: relative;
    padding: 2.8rem;
    color: #fff;
    background:
        linear-gradient(150deg, rgba(3, 24, 44, 0.4), rgba(3, 24, 44, 0.1)),
        linear-gradient(135deg, var(--gw-primary-dark) 0%, var(--gw-primary) 52%, var(--gw-accent) 100%);
}

.gw-auth-aside::after {
    content: "";
    position: absolute;
    inset: auto -80px -100px auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.gw-brand-pill,
.gw-mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.gw-brand-pill {
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
}

.gw-auth-aside h1 {
    margin: 1.2rem 0 1rem;
    font-size: clamp(2rem, 2.8vw, 3rem);
    line-height: 1.05;
    font-weight: 800;
}

.gw-auth-aside p {
    max-width: 34rem;
    color: rgba(240, 249, 255, 0.9);
    line-height: 1.75;
}

.gw-feature-list {
    display: grid;
    gap: 0.95rem;
    margin-top: 2rem;
}

.gw-feature-item {
    display: flex;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.gw-feature-item i {
    margin-top: 0.15rem;
    color: #fff;
}

.gw-feature-item strong {
    display: block;
    margin-bottom: 0.2rem;
}

.gw-feature-item span {
    color: rgba(240, 249, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.6;
}

.gw-auth-card {
    padding: 2.6rem;
    background: rgba(255, 255, 255, 0.9);
}

.gw-auth-grid.gw-auth-single .gw-auth-card {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 32px;
    box-shadow:
        0 28px 70px rgba(4, 36, 63, 0.16),
        0 0 0 6px rgba(9, 141, 204, 0.045);
}

/* “Ring” com gradient (borda real com máscara). */
.gw-auth-grid.gw-auth-single .gw-auth-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 34px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(9, 141, 204, 0.62), rgba(10, 203, 142, 0.34), rgba(9, 141, 204, 0.52));
    opacity: 0.75;
    pointer-events: none;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.gw-auth-header {
    margin-bottom: 1.6rem;
}

.gw-auth-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--gw-text);
}

.gw-auth-header p {
    margin: 0.6rem 0 0;
    color: var(--gw-muted);
    line-height: 1.65;
}

.gw-alert {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    font-size: 0.92rem;
    border: 1px solid transparent;
}

.gw-alert.error {
    background: #fff0f1;
    color: #c93045;
    border-color: rgba(201, 48, 69, 0.12);
}

.gw-alert.info {
    background: var(--gw-primary-soft);
    color: var(--gw-primary-dark);
    border-color: var(--gw-border);
}

.gw-form {
    display: grid;
    gap: 1rem;
}

.gw-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.gw-form-grid.gw-form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gw-field {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

.gw-field-full {
    grid-column: 1 / -1;
}

.gw-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gw-muted);
}

.gw-label .required {
    color: #ef4444;
}

.gw-input-wrap {
    position: relative;
}

.gw-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #91a4b6;
}

.gw-field input,
.gw-field select {
    width: 100%;
    min-height: 52px;
    padding: 0.92rem 1rem 0.92rem 2.9rem;
    border: 1px solid var(--gw-border);
    border-radius: 16px;
    background: rgba(248, 251, 253, 0.92);
    color: var(--gw-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gw-field select {
    appearance: none;
    cursor: pointer;
}

.gw-field input:focus,
.gw-field select:focus {
    outline: none;
    border-color: rgba(9, 141, 204, 0.38);
    box-shadow: 0 0 0 4px rgba(9, 141, 204, 0.1);
    background: #fff;
}

.gw-input-wrap.has-action input {
    padding-right: 3.2rem;
}

.gw-input-action {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #7b8da0;
    cursor: pointer;
}

.gw-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.gw-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--gw-border);
    background: rgba(248, 251, 253, 0.92);
}

.gw-radio input {
    min-height: auto;
    width: auto;
    padding: 0;
}

.gw-hint {
    margin: 0;
    font-size: 0.82rem;
    color: var(--gw-muted);
    line-height: 1.55;
}

.gw-error {
    font-size: 0.8rem;
    color: #dc2626;
}

.gw-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.65rem;
}

.gw-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.gw-actions-secondary {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.92rem;
    color: var(--gw-muted);
}

.gw-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--gw-muted);
    user-select: none;
}

.gw-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--gw-primary);
    margin: 0;
}

.gw-check span {
    line-height: 1.2;
}

.gw-link {
    color: var(--gw-primary);
    font-weight: 700;
    text-decoration: none;
}

.gw-link:hover {
    color: var(--gw-primary-dark);
}

.gw-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 52px;
    padding: 0.95rem 1.35rem;
    border: 0;
    border-radius: 18px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--gw-primary) 0%, var(--gw-primary-dark) 100%);
    box-shadow: 0 18px 30px rgba(4, 82, 122, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.gw-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 20px 34px rgba(4, 82, 122, 0.2);
}

.gw-button.gw-button-full {
    width: 100%;
}

.gw-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.2rem;
    font-size: 0.83rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gw-primary);
}

.gw-section-box {
    padding: 1.2rem;
    border-radius: 24px;
    background: rgba(248, 251, 253, 0.9);
    border: 1px solid rgba(9, 141, 204, 0.08);
}

@media (max-width: 992px) {
    .gw-auth-grid {
        grid-template-columns: 1fr;
    }

    .gw-auth-aside {
        padding-bottom: 2rem;
    }
}

@media (max-width: 720px) {
    .gw-auth-shell {
        padding-top: calc(var(--top-h, 72px) + 1.75rem);
    }

    .gw-auth-card,
    .gw-auth-aside {
        padding: 1.4rem;
    }

    .gw-auth-grid.gw-auth-single .gw-auth-card {
        border-radius: 26px;
    }

    .gw-auth-header h2 {
        font-size: 1.65rem;
    }

    .gw-field input,
    .gw-field select {
        min-height: 46px;
        padding: 0.78rem 0.9rem 0.78rem 2.55rem;
        border-radius: 14px;
    }

    .gw-input-icon {
        left: 0.85rem;
        font-size: 0.95rem;
    }

    .gw-input-wrap.has-action input {
        padding-right: 3rem;
    }

    .gw-input-action {
        right: 0.75rem;
    }

    .gw-button {
        min-height: 48px;
        padding: 0.85rem 1.15rem;
        border-radius: 16px;
    }

    .gw-form-grid,
    .gw-form-grid.gw-form-grid-3 {
        grid-template-columns: 1fr;
    }

    .gw-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .gw-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .gw-actions-row .gw-link {
        text-align: center;
    }
}
