html,
body {
    min-height: 100%;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top, rgba(57, 125, 237, 0.18), transparent 28%),
        linear-gradient(180deg, #212a3a 0%, #1f2736 100%);
    color: #f4f7fb;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.auth-shell {
    min-height: 100vh;
    padding: 1.5rem 1rem 2rem;
}

.auth-card {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
}

.auth-header {
    padding-top: 0.25rem;
    margin-bottom: 2.25rem;
}

.auth-back-link {
    color: #eef3ff;
    text-decoration: none;
    font-size: 1.3rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.auth-title {
    margin: 1.15rem 0 0;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-subtitle {
    margin: 0.5rem 0 0;
    color: #aeb8ca;
    font-size: 0.98rem;
}

.auth-form-group {
    margin-bottom: 1.2rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.55rem;
    color: #9fabc0;
    font-size: 1.12rem;
}

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

.auth-input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(210, 219, 233, 0.45);
    border-radius: 0;
    background: transparent;
    color: #f7f9ff;
    padding: 0 2.75rem 0.8rem 0;
    font-size: 1.15rem;
    box-shadow: none;
}

.auth-input::placeholder {
    color: rgba(174, 184, 202, 0.8);
}

.auth-input:focus {
    outline: 0;
    border-bottom-color: #4c93ff;
    box-shadow: none;
    background: transparent;
    color: #f7f9ff;
}

.auth-password-toggle {
    position: absolute;
    top: 0.1rem;
    right: 0;
    border: 0;
    background: transparent;
    color: #b8c2d5;
    font-size: 1.15rem;
    line-height: 1;
    padding: 0.1rem 0.2rem;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
    color: #ffffff;
}

.auth-error {
    margin-top: 0.45rem;
    color: #ff9090;
    font-size: 0.92rem;
}

.auth-alert {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    padding: 0.95rem 1rem;
    margin-bottom: 1rem;
}

.auth-alert-danger {
    background: rgba(122, 32, 55, 0.55);
    color: #ffd8e0;
}

.auth-alert-success {
    background: rgba(24, 105, 70, 0.45);
    color: #dcfff0;
}

.auth-button {
    width: 100%;
    min-height: 3.5rem;
    border: 0;
    border-radius: 0.95rem;
    background: linear-gradient(180deg, #2d8eff 0%, #2377e0 100%);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 10px 26px rgba(29, 103, 188, 0.28);
}

.auth-button:hover,
.auth-button:focus {
    background: linear-gradient(180deg, #3d9cff 0%, #2d82ea 100%);
    color: #ffffff;
}

.auth-button-small {
    width: auto;
    min-height: 2.75rem;
    padding: 0.7rem 1.1rem;
    font-size: 0.95rem;
    border-radius: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.6rem 0 1.2rem;
    color: #f4f7fb;
    font-size: 1.1rem;
    font-weight: 700;
}

.auth-social-list {
    display: grid;
    gap: 1rem;
}

.auth-social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 3.1rem;
    border: 1px solid rgba(236, 242, 250, 0.7);
    border-radius: 0.95rem;
    background: transparent;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    opacity: 0.72;
    cursor: pointer;
    transition:
        opacity 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease;
}

.auth-social-button:hover,
.auth-social-button:focus {
    opacity: 1;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.06);
}

.auth-social-button-disabled,
.auth-social-button:disabled {
    cursor: not-allowed;
}

.auth-social-button-disabled:hover,
.auth-social-button-disabled:focus,
.auth-social-button:disabled:hover,
.auth-social-button:disabled:focus {
    opacity: 0.72;
    border-color: rgba(236, 242, 250, 0.7);
    background: transparent;
}

.auth-social-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.9rem;
    font-weight: 700;
}

.auth-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-link {
    color: #dfe7f7;
    text-decoration: none;
    font-weight: 600;
}

.auth-link:hover,
.auth-link:focus {
    color: #ffffff;
    text-decoration: underline;
}

.auth-note {
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
    color: #d8e1f2;
    padding: 1rem 1rem 1.1rem;
}

.app-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.app-topbar {
    padding: 0.1rem 0 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #ffffff;
    text-decoration: none;
}

.app-brand-mark {
    display: grid;
    grid-template-columns: repeat(3, 0.5rem);
    gap: 0.14rem;
}

.app-brand-mark span {
    width: 0.5rem;
    height: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.88);
    transform: rotate(45deg);
}

.app-brand-text {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 0 1rem;
}

.app-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.app-hero-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-hero-subtitle {
    margin: 0.8rem auto 0;
    max-width: 20rem;
    color: #b9c3d4;
    font-size: 1rem;
}

.app-actions {
    display: grid;
    gap: 1rem;
    padding-bottom: 0.5rem;
    margin-top: auto;
}

.app-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    color: #d8e0f1;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
}

.app-secondary-link:hover,
.app-secondary-link:focus {
    color: #ffffff;
}

.app-outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.5rem;
    border: 1px solid #2d8eff;
    border-radius: 0.95rem;
    background: transparent;
    color: #2d8eff;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}

.app-outline-button:hover,
.app-outline-button:focus {
    color: #58a6ff;
    border-color: #58a6ff;
}

.app-label {
    color: #eef3ff;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

.app-privacy {
    margin: 0;
    color: #9ea9bd;
    font-size: 0.98rem;
    line-height: 1.6;
    text-align: center;
}

.app-privacy a {
    color: #2d8eff;
    text-decoration: none;
}

.app-privacy a:hover,
.app-privacy a:focus {
    color: #58a6ff;
    text-decoration: underline;
}

@media (min-width: 768px) {
    .auth-shell {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }

    .auth-card {
        max-width: 30rem;
    }

    .app-content {
        width: 100%;
    }
}
