*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* ── Wrapper ─────────────────────────────────── */
.auth-wrapper {
    display: flex;
    width: 920px;
    max-width: 100%;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .04);
    overflow: hidden;
}

/* ── Form side ───────────────────────────────── */
.auth-form-side {
    flex: 1;
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 90vh;
}

.brand-logo {
    width: 44px;
    height: 44px;
    background: #f0f4ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid #dce8ff;
}

.brand-logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* ── Tabs ────────────────────────────────────── */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.75rem;
    gap: 0;
}

.auth-tab {
    flex: 1;
    padding: .65rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    color: #6c757d;
    text-align: center;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
    letter-spacing: .01em;
}

.auth-tab.active {
    color: #0b5ed7;
    border-bottom-color: #0b5ed7;
}

.auth-tab:hover:not(.active) {
    color: #343a40;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ── Inputs ──────────────────────────────────── */
.form-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: .35rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.form-control,
.form-select {
    width: 100%;
    border-radius: 10px;
    padding: .7rem 1rem;
    border: 1.5px solid #dee2e6;
    background-color: #f8f9fa;
    font-size: .9rem;
    font-family: inherit;
    transition: all .2s;
    outline: none;
    color: #212529;
}

.form-control:focus,
.form-select:focus {
    background-color: #fff;
    border-color: #0b5ed7;
    box-shadow: 0 0 0 3px rgba(11, 94, 215, .12);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .1);
}

.invalid-feedback {
    display: block;
    font-size: .8rem;
    color: #dc3545;
    margin-top: .3rem;
}

.input-group {
    position: relative;
}

.input-group .form-control {
    padding-right: 3rem;
}

.toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    line-height: 1;
}

/* ── Btn ─────────────────────────────────────── */
.btn-auth {
    width: 100%;
    padding: .8rem;
    background: #0b5ed7;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-family: inherit;
}

.btn-auth:hover {
    background: #0a53be;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(11, 94, 215, .28);
}

.btn-auth:active {
    transform: translateY(0);
}

/* ── Alert ───────────────────────────────────── */
.auth-alert {
    padding: .75rem 1rem;
    border-radius: 10px;
    font-size: .875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
}

.auth-alert.danger {
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.auth-alert.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* ── Form rows ───────────────────────────────── */
.form-row {
    display: grid;
    gap: .75rem;
    margin-bottom: .75rem;
}

.form-row.cols-2 {
    grid-template-columns: 1fr 1fr;
}

.form-group {
    margin-bottom: .75rem;
}

.form-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0;
    color: #adb5bd;
    font-size: .8rem;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

/* ── Info side ───────────────────────────────── */
.auth-info-side {
    width: 340px;
    flex-shrink: 0;
    background: #f8f9fb;
    border-left: 1px solid #e9ecef;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: .5rem;
}

.info-subtitle {
    font-size: .875rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: .875rem;
    margin-bottom: 1.5rem;
}

.feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b5ed7;
    flex-shrink: 0;
    font-size: .95rem;
}

.feature-text h6 {
    font-size: .9rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 .2rem;
}

.feature-text p {
    font-size: .8rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

.zone-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #e8f4fd;
    border: 1px solid #bee3f8;
    color: #1a6fa8;
    font-size: .75rem;
    font-weight: 600;
    padding: .3rem .65rem;
    border-radius: 20px;
    margin: .2rem;
}

/* ── Footer ──────────────────────────────────── */
.auth-footer {
    margin-top: 1.5rem;
    font-size: .78rem;
    color: #adb5bd;
    text-align: center;
}

/* ── Password strength ───────────────────────── */
.pass-strength {
    margin-top: .4rem;
}

.pass-strength-bar {
    height: 4px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
}

.pass-strength-fill {
    height: 100%;
    border-radius: 4px;
    width: 0;
    transition: width .3s, background .3s;
}

.pass-strength-label {
    font-size: .75rem;
    margin-top: .25rem;
    color: #6c757d;
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
        align-items: flex-start;
    }

    .auth-info-side {
        display: none;
    }

    .auth-wrapper {
        max-width: 460px;
    }

    .auth-form-side {
        padding: 2rem 1.75rem;
        max-height: none;
    }

    .form-row.cols-2 {
        grid-template-columns: 1fr;
    }
}