.auth-page {
    padding: clamp(2rem, 5vw, 4rem) 1rem 5rem;
}

.auth-shell {
    width: min(100%, 31rem);
    margin: 0 auto;
}

.auth-page-register .auth-shell {
    width: min(100%, 34rem);
}

.auth-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 3vw, 2.3rem);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top center, rgba(186, 158, 255, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.025) 100%);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.auth-card-header {
    margin-bottom: 1.4rem;
}

.auth-card-title {
    margin: 0;
    color: var(--platea-text-primary, #f7f2ff);
    font-family: var(--platea-font-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif);
    font-size: clamp(1.85rem, 4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.auth-card-subtitle {
    margin: 0.7rem 0 0;
    color: rgba(247, 242, 255, 0.7);
    font-size: 0.98rem;
    line-height: 1.55;
}

.auth-actions-stack {
    display: grid;
    gap: 0.9rem;
    justify-items: center;
    margin-top: 0.4rem;
}

.auth-actions-stack .btn {
    width: 100%;
}

.auth-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: -0.3rem;
}

.auth-remember-option {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(247, 242, 255, 0.74);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.auth-remember-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: var(--platea-primary, #ba9eff);
}

.auth-forgot-link {
    color: var(--platea-primary, #ba9eff);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

.auth-forgot-link:hover {
    text-decoration: underline;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-field {
    display: grid;
    gap: 0.55rem;
}

.auth-label {
    color: rgba(247, 242, 255, 0.74);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-input,
.auth-submit {
    width: 100%;
    min-height: 3.5rem;
    border-radius: 18px;
}

.auth-input {
    padding: 0 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.045);
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.auth-input:hover {
    background: rgba(255, 255, 255, 0.06);
}

.auth-input:focus {
    outline: none;
    border-color: rgba(186, 158, 255, 0.42);
    background: rgba(255, 255, 255, 0.075);
    box-shadow: 0 0 0 7px rgba(132, 85, 239, 0.11);
}

.auth-password-control {
    position: relative;
}

.auth-password-control .auth-input {
    padding-right: 3.25rem;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--platea-primary, #ba9eff);
    transform: translateY(-50%);
    cursor: pointer;
    transition: color 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-password-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.auth-password-toggle-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-password-toggle-icon-hide {
    display: none;
}

.auth-password-toggle.is-visible .auth-password-toggle-icon-show {
    display: none;
}

.auth-password-toggle.is-visible .auth-password-toggle-icon-hide {
    display: inline-flex;
}

.auth-password-toggle:hover {
    color: var(--platea-primary-dim, #8455ef);
    filter: brightness(1.05);
}

.auth-password-toggle:active {
    transform: translateY(-50%) scale(0.98);
}

.auth-password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(132, 85, 239, 0.24);
}

.auth-field-error {
    color: #ffb4b9;
    font-size: 0.82rem;
    line-height: 1.45;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.2rem;
    padding: 0 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: linear-gradient(135deg, var(--platea-primary, #ba9eff) 0%, var(--platea-primary-dim, #8455ef) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 16px 30px rgba(132, 85, 239, 0.26);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 18px 32px rgba(132, 85, 239, 0.3);
}

.auth-submit:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 7px rgba(132, 85, 239, 0.14),
        0 18px 32px rgba(132, 85, 239, 0.3);
}

.auth-footer-copy {
    margin: 1.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(247, 242, 255, 0.66);
    text-align: center;
    font-size: 0.96rem;
    line-height: 1.6;
}

.auth-inline-link {
    margin-left: 0.2rem;
    color: var(--platea-primary, #ba9eff);
    text-decoration: none;
    font-weight: 700;
}

.auth-inline-link:hover {
    text-decoration: underline;
}

.auth-alert {
    margin-bottom: 1rem;
}

.auth-success-panel {
    margin: 0 0 1.4rem;
    padding: 1.1rem 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(132, 239, 165, 0.25);
    background: linear-gradient(180deg, rgba(44, 110, 73, 0.28) 0%, rgba(22, 56, 38, 0.28) 100%);
    color: rgba(247, 255, 250, 0.92);
}

.auth-success-title {
    margin: 0 0 0.5rem;
    color: #f4fff6;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.auth-success-body {
    margin: 0;
    color: rgba(235, 255, 240, 0.82);
    font-size: 0.95rem;
    line-height: 1.55;
}

.auth-success-email {
    margin: 0.75rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(132, 239, 165, 0.18);
    color: #f4fff6;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-all;
}

.auth-success-email-prefix {
    display: block;
    margin-bottom: 0.2rem;
    color: rgba(235, 255, 240, 0.65);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-submit-link {
    text-decoration: none;
}

@media (max-width: 768px) {
    .auth-page {
        padding: 1.5rem 0.9rem 3rem;
    }

    .auth-card {
        padding: 1.35rem;
        border-radius: 24px;
    }

    .auth-card-title {
        font-size: 1.8rem;
    }

    .auth-input,
    .auth-submit {
        min-height: 3.35rem;
    }
}
