:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-darker: #0369a1;
    --primary-light: #e0f2fe;
    --secondary: #f59e0b;
    --secondary-dark: #d97706;
    --ink: #0f172a;
    --body: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f1f5f9;
    --white: #ffffff;
    --danger: #dc2626;
    --success: #16a34a;
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

.auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--body);
    background: var(--bg);
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow-x: hidden;
}

.auth-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.auth-card {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    background: var(--white);
    border-radius: 0;
    overflow: hidden;
    width: 100%;
    min-height: 100vh;
    box-shadow: none;
}

/* ---------- Brand panel ---------- */
.auth-brand {
    position: relative;
    padding: 64px 60px;
    color: #fff;
    background:
        radial-gradient(520px 320px at 85% 0%, rgba(245, 158, 11, 0.35), transparent 65%),
        linear-gradient(145deg, #0369a1 0%, #0ea5e9 45%, #0284c7 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.auth-brand-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 1;
}

.auth-brand-content {
    position: relative;
    z-index: 2;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #fff;
    margin-bottom: 64px;
    transition: transform 0.3s ease;
}

.brand-mark:hover {
    transform: translateY(-2px);
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 22px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 0.2px;
}

.brand-copy h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 38px;
    line-height: 1.25;
    margin: 0 0 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.brand-copy p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 44px;
    max-width: 400px;
    line-height: 1.6;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 16px;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    transform: translateX(0);
    transition: transform 0.25s ease;
}

.brand-features li:hover {
    transform: translateX(6px);
}

.brand-features li i {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--secondary);
    font-size: 18px;
    flex: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: background 0.25s ease, transform 0.25s ease;
}

.brand-features li:hover i {
    background: rgba(255, 255, 255, 0.24);
    transform: scale(1.08);
}

.brand-footer {
    position: relative;
    z-index: 2;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 48px;
}

/* ---------- Form panel ---------- */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 60px;
    background: var(--white);
    overflow-y: auto;
}

.auth-form-inner {
    width: 100%;
    max-width: 400px;
    animation: authFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-mobile-logo {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    color: var(--primary-dark);
}

.auth-mobile-logo .brand-icon {
    background: var(--primary-light);
    color: var(--primary-dark);
    width: 46px;
    height: 46px;
    border-radius: 13px;
    font-size: 22px;
}

.auth-mobile-logo .brand-name {
    color: var(--ink);
    font-size: 22px;
}

.auth-head {
    margin-bottom: 32px;
}

.auth-head h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: var(--ink);
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.auth-head p {
    font-size: 15px;
    color: var(--muted);
    margin: 0;
}

/* ---------- Form controls ---------- */
.form-field {
    margin-bottom: 22px;
}

.form-field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.form-field:focus-within label {
    color: var(--primary-dark);
}

.input-icon {
    position: relative;
}

.input-icon>i.field-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 18px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-icon:focus-within>i.field-icon {
    color: var(--primary);
}

.form-control {
    width: 100%;
    height: 52px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 0 16px 0 48px;
    font-size: 15px;
    color: var(--ink);
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.form-control.is-invalid {
    border-color: var(--danger);
    background: #fdf2f2;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--muted);
    width: 36px;
    height: 36px;
    border-radius: 9px;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.toggle-password:hover {
    color: var(--primary-dark);
    background: var(--primary-light);
}

.field-error {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--danger);
    font-weight: 500;
}

/* ---------- Row helpers ---------- */
.form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
    gap: 12px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--body);
    cursor: pointer;
    user-select: none;
}

.remember input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
}

.link-accent {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.link-accent:hover {
    color: var(--secondary-dark);
    text-decoration: underline;
}

/* ---------- Buttons ---------- */
.btn-primary-cta {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 15.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 22px -6px rgba(2, 132, 199, 0.4);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary-cta:hover {
    filter: brightness(1.05);
    box-shadow: 0 14px 28px -6px rgba(2, 132, 199, 0.55);
    transform: translateY(-2px);
}

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

/* ---------- Alerts ---------- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
    animation: alertSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes alertSlideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-alert i {
    font-size: 18px;
    flex: none;
    margin-top: 1px;
}

.auth-alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.auth-alert-info {
    background: var(--primary-light);
    color: var(--primary-darker);
    border: 1px solid #bae6fd;
}

/* ---------- Footer switch ---------- */
.auth-switch {
    margin-top: 28px;
    text-align: center;
    font-size: 14.5px;
    color: var(--muted);
}

.auth-switch a {
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-switch a:hover {
    color: var(--secondary-dark);
    text-decoration: underline;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.auth-back:hover {
    color: var(--primary-dark);
    transform: translateX(-4px);
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .auth-card {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    .auth-brand {
        display: none;
    }

    .auth-mobile-logo {
        display: flex;
    }

    .auth-form-panel {
        padding: 48px 32px;
    }
}

@media (max-width: 576px) {
    .auth-form-panel {
        padding: 36px 20px;
    }

    .auth-head h1 {
        font-size: 25px;
    }

    .auth-head p {
        font-size: 14px;
    }

    .form-control {
        height: 48px;
        padding-left: 44px;
    }

    .input-icon>i.field-icon {
        left: 14px;
        font-size: 16px;
    }

    .btn-primary-cta {
        height: 48px;
    }
}