:root {
    --bg-1: #eef6ff;
    --bg-2: #f8fbff;
    --card-bg: rgba(255, 255, 255, 0.96);
    --text-main: #16324f;
    --text-muted: #6b7f95;
    --border: #d7e6f5;
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-soft: #e9f2ff;
    --danger: #dc3545;
    --success-bg: #ecfdf3;
    --success-text: #166534;
    --danger-bg: #fef2f2;
    --danger-text: #991b1b;
    --warning-bg: #fff7ed;
    --warning-text: #9a3412;
    --shadow: 0 20px 60px rgba(13, 110, 253, 0.12);
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background: radial-gradient(circle at top left, #dcebff 0%, transparent 34%),
    radial-gradient(circle at bottom right, #edf5ff 0%, transparent 28%),
    linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.auth-shell {
    width: 100%;
    max-width: 1120px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.auth-side {
    position: relative;
    padding: 56px 48px;
    background: linear-gradient(145deg, #0d6efd 0%, #0a58ca 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .16) 0, transparent 26%),
    radial-gradient(circle at 80% 75%, rgba(255, 255, 255, .10) 0, transparent 24%);
    pointer-events: none;
}

.auth-brand,
.auth-side-content,
.auth-side-footer {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 42px;
}

.auth-brand__logo img {
    max-height: 56px;
    width: auto;
    display: block;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    padding: 6px;
}

.auth-brand__text {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.auth-side-title {
    margin: 0 0 16px;
    font-size: 42px;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-side-text {
    max-width: 460px;
    margin: 0;
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .92);
}

.auth-side-points {
    margin-top: 36px;
    display: grid;
    gap: 14px;
}

.auth-side-point {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, .94);
}

.auth-side-point i {
    width: 18px;
    text-align: center;
}

.auth-side-footer {
    margin-top: 56px;
    font-size: 13px;
    color: rgba(255, 255, 255, .78);
}

.auth-card-wrap {
    padding: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: var(--card-bg);
    border: 1px solid #eef4fb;
    border-radius: var(--radius-xl);
    box-shadow: 0 16px 44px rgba(13, 110, 253, 0.08);
    padding: 34px 30px 30px;
}

.auth-card__title {
    margin: 0;
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    color: var(--text-main);
}

.auth-card__subtitle {
    margin: 10px 0 28px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.alert {
    border: 0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.alert ul {
    margin: 10px 0 0;
    padding-left: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #24476b;
}

.input-wrap {
    position: relative;
}

.input-wrap .form-control {
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--border);
    padding-left: 46px;
    padding-right: 46px;
    font-size: 15px;
    box-shadow: none;
    transition: .2s ease;
    background: #fff;
}

.input-wrap .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.20rem rgba(13, 110, 253, 0.14);
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #7d93ab;
    font-size: 15px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #7d93ab;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
}

.password-toggle:hover {
    background: rgba(13, 110, 253, .06);
    color: var(--primary);
}

.field-error {
    margin-top: 7px;
    font-size: 13px;
    color: var(--danger);
}

.auth-submit {
    width: 100%;
    height: 52px;
    margin-top: 8px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 12px 24px rgba(13, 110, 253, 0.22);
    transition: .2s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    opacity: .98;
}

.auth-submit:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

.auth-footer-note {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 991px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .auth-side {
        padding: 32px 28px;
    }

    .auth-side-title {
        font-size: 30px;
    }

    .auth-side-footer {
        margin-top: 28px;
    }

    .auth-card-wrap {
        padding: 22px;
    }

    .auth-card {
        max-width: none;
    }
}

@media (max-width: 576px) {
    .auth-page {
        padding: 12px;
    }

    .auth-shell {
        border-radius: 24px;
    }

    .auth-side,
    .auth-card-wrap {
        padding: 22px 18px;
    }

    .auth-card {
        padding: 26px 18px 22px;
        border-radius: 20px;
    }

    .auth-card__title {
        font-size: 26px;
    }

    .auth-side-title {
        font-size: 26px;
    }

    .auth-side-text {
        font-size: 15px;
    }
}