/* =====================================================
   AUTH PAGES - LOGIN & REGISTER
   Modern, minimal and clean design
   ===================================================== */

:root {
    --primary-dark: #43213b;
    --primary-light: #faf4f8;
    --accent-blue: #9d5cbf;
    --accent-teal: #f08bb5;
    --accent-rose: #e05b8a;
    --accent-plum: #b04aa2;
    --text-dark: #4b3545;
    --text-light: #8d6f7e;
    --border-light: #eadce4;
    --success: #8c6b86;
    --danger: #d46b86;
}

.login-page {
    background: linear-gradient(180deg, #fffafc 0%, #f8eff5 100%);
}

.auth-screen {
    opacity: 1;
    transform: none;
    transition: opacity 0.26s ease, transform 0.26s ease;
}

.auth-screen.is-entered {
    animation: authScreenEnter 0.26s ease;
}

.auth-screen.is-leaving {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

@keyframes authScreenEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-shell {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 20px;
}

.login-card {
    width: 100%;
    max-width: 790px;
    padding: 18px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 22px 56px rgba(107, 69, 92, 0.12);
    border: 1px solid rgba(176, 74, 162, 0.08);
}

.login-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(176, 74, 162, 0.1);
    color: var(--accent-plum);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-soft-link {
    color: var(--accent-rose);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.login-soft-link:hover {
    text-decoration: underline;
}

.login-card-layout {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
}

.login-card-aside {
    position: relative;
    min-height: 430px;
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(233, 99, 150, 0.16), transparent 42%),
        linear-gradient(180deg, #fff6fb 0%, #fdeff6 100%);
}

.login-card-aside::after {
    content: '';
    position: absolute;
    top: 0;
    right: -1px;
    width: 56px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.12) 44%,
        rgba(255, 255, 255, 0.26) 74%,
        rgba(255, 255, 255, 0.42) 100%
    );
}

.login-aside-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.login-art {
    min-height: 280px;
    border-radius: 22px;
    background:
        linear-gradient(160deg, rgba(255,255,255,0.85), rgba(255,255,255,0.25)),
        radial-gradient(circle at 20% 20%, rgba(255, 183, 214, 0.9), transparent 30%),
        radial-gradient(circle at 80% 30%, rgba(180, 146, 255, 0.35), transparent 26%),
        linear-gradient(135deg, #f5dbe8 0%, #f8eef3 40%, #edf5fb 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.login-aside-copy h2 {
    margin: 0 0 10px;
    color: #4c2f42;
    font-size: 28px;
    line-height: 1.15;
}

.login-aside-copy p {
    margin: 0;
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.7;
}

.login-card-main {
    padding: 36px 34px;
}

.login-card-header {
    margin-bottom: 22px;
}

.login-card-header h1 {
    margin: 0 0 8px;
    color: var(--primary-dark);
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.1;
}

.login-card-header p {
    margin: 0;
    color: var(--text-light);
    font-size: 15px;
}

.password-field {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.password-field input {
    padding-right: 56px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: rgba(176, 74, 162, 0.08);
    color: var(--accent-plum);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1;
}

.password-toggle:hover,
.password-toggle:focus {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-plum), var(--accent-rose));
    box-shadow: 0 8px 18px rgba(176, 74, 162, 0.18);
    outline: none;
}

.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 4px 0 18px;
    flex-wrap: wrap;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
}

.remember-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-plum);
}

.forgot-link {
    color: var(--accent-plum);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.forgot-link:hover {
    color: var(--accent-rose);
    text-decoration: underline;
}

.login-submit,
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    margin-top: 4px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-plum), var(--accent-rose));
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.login-submit:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(176, 74, 162, 0.22);
    filter: brightness(1.01);
}

.auth-links {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}

.auth-links p {
    margin: 0;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.auth-links a {
    color: var(--accent-plum);
    font-weight: 600;
    text-decoration: none;
}

.auth-links a:hover {
    color: var(--accent-rose);
    text-decoration: underline;
}

.auth-form label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.auth-form input,
.auth-form select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border-light);
    border-radius: 16px;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
    color: var(--text-dark);
}

.auth-form input::placeholder {
    color: #b49aa7;
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: rgba(176, 74, 162, 0.5);
    box-shadow: 0 0 0 4px rgba(176, 74, 162, 0.08);
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.register-form .form-group small {
    display: block;
    margin-top: 8px;
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.5;
}

.auth-form label input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
    cursor: pointer;
}

.alert {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 22px;
    font-size: 14px;
    border-left: 4px solid;
}

.alert-danger {
    background: #fff5f8;
    color: #b23c64;
    border-left-color: var(--accent-rose);
}

.alert-success {
    background: #fff8fc;
    color: #8d4b7e;
    border-left-color: var(--accent-plum);
}

.alert strong {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 480px) {
    .login-shell {
        padding: 24px 12px 30px;
    }

    .login-card {
        padding: 12px;
        border-radius: 24px;
    }

    .login-card-layout {
        grid-template-columns: 1fr;
    }

    .login-card-aside {
        min-height: 220px;
    }

    .login-art {
        min-height: 170px;
    }

    .login-card-main {
        padding: 24px 20px 22px;
    }

    .login-aside-copy h2 {
        font-size: 22px;
    }

    .login-card-header h1 {
        font-size: 24px;
    }

    .auth-form input,
    .auth-form select {
        font-size: 16px;
    }

    .login-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .login-card-aside {
        display: none;
    }

    .login-card-layout {
        grid-template-columns: 1fr;
    }

    .login-card-aside::after {
        display: none;
    }
}

@media (max-width: 980px) {
    .login-card-layout {
        grid-template-columns: 1fr;
    }

    .login-card-aside::after {
        top: auto;
        right: auto;
        left: 0;
        bottom: -1px;
        width: 100%;
        height: 44px;
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 46%,
            rgba(255, 255, 255, 0.24) 76%,
            rgba(255, 255, 255, 0.38) 100%
        );
    }
}
