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

:root {
    --blue-primary: #1E60B3;
    --blue-dark: #174d90;
    --blue-panel: #2568bf;
    --blue-circle1: rgba(255, 255, 255, 0.18);
    --blue-circle2: rgba(255, 255, 255, 0.12);
    --blue-circle3: rgba(255, 255, 255, 0.08);
    --text-dark: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --input-bg: #F9FAFB;
}

html,
body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: #f3f6fb;
}

/* ── Layout ── */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ── Left Panel ── */
.login-left {
    position: relative;
    width: 38%;
    min-width: 260px;
    background: linear-gradient(160deg, #2568bf 0%, #1a4f9a 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 2.2rem 2.5rem 2.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

/* Decorative circles */
.login-left::before,
.login-left::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.login-left::before {
    width: 320px;
    height: 320px;
    background: var(--blue-circle1);
    top: -80px;
    right: -110px;
}

.login-left::after {
    width: 220px;
    height: 220px;
    background: var(--blue-circle2);
    bottom: 40px;
    left: -60px;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.deco-c1 {
    width: 170px;
    height: 170px;
    background: var(--blue-circle2);
    bottom: 100px;
    right: -50px;
}

.deco-c2 {
    width: 100px;
    height: 100px;
    background: var(--blue-circle1);
    top: 46%;
    left: -20px;
}

/* Brand */
.left-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    z-index: 1;
    text-decoration: none;
}

.left-brand img {
    width: 34px;
    height: 34px;
    filter: brightness(0) invert(1);
}

.left-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.left-brand-text span {
    color: rgb(163 207 255);
}

/* Tagline */
.left-tagline {
    z-index: 1;
}

.left-tagline h2 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.9rem, 3.5vw, 2.7rem);
    color: #fff;
    line-height: 1.2;
    font-weight: 400;
}

.left-tagline h2 em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
}

/* Footer note */
.left-footer {
    z-index: 1;
}

.left-footer p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
}

/* ── Right Panel ── */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: #fff;
}

.login-card {
    width: 100%;
    max-width: 440px;
}

.login-card h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
    letter-spacing: -0.4px;
}

.login-card h1 span {
    color: var(--blue-primary);
}

.login-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 2.2rem;
}

/* Error */
.login-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    font-size: 0.83rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.4rem;
}

/* Form */
.form-group {
    margin-bottom: 1.3rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.45rem;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    padding: 0.72rem 2.8rem 0.72rem 0.95rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background: var(--input-bg);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-wrap input::placeholder {
    color: #9CA3AF;
}

.input-wrap input:focus {
    border-color: var(--blue-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 96, 179, 0.12);
}

.input-icon {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 0.92rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.input-icon:hover {
    color: var(--blue-primary);
}

/* Forgot password */
.forgot-row {
    text-align: right;
    margin-top: 0.5rem;
}

.forgot-row a {
    font-size: 0.8rem;
    color: var(--blue-primary);
    font-weight: 500;
    text-decoration: none;
}

.forgot-row a:hover {
    text-decoration: underline;
}

/* Submit */
.btn-signin {
    width: 100%;
    padding: 0.8rem;
    background: var(--blue-primary);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1.6rem;
    letter-spacing: 0.2px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-signin:hover {
    background: var(--blue-dark);
    box-shadow: 0 4px 14px rgba(30, 96, 179, 0.35);
    transform: translateY(-1px);
}

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

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.6rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider span {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Register link */
.register-row {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.register-row a {
    color: var(--blue-primary);
    font-weight: 600;
    text-decoration: none;
}

.register-row a:hover {
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-left {
        width: 100%;
        min-width: unset;
        padding: 2rem 1.8rem 3rem;
        min-height: 240px;
    }

    .login-left::before {
        width: 220px;
        height: 220px;
        top: -60px;
        right: -70px;
    }

    .login-left::after {
        width: 160px;
        height: 160px;
        bottom: -40px;
        left: -50px;
    }

    .deco-c1 {
        width: 120px;
        height: 120px;
        bottom: -30px;
        right: -30px;
    }

    .deco-c2 {
        width: 70px;
        height: 70px;
        top: 55%;
    }

    .left-tagline h2 {
        font-size: 1.8rem;
    }

    .login-right {
        padding: 2.5rem 1.5rem;
    }

    .login-card h1 {
        font-size: 1.45rem;
    }
}

@media (max-width: 480px) {
    .login-right {
        padding: 2rem 1.2rem;
    }
}

.login-error-lock {
    align-items: flex-start;
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.login-error-lock i {
    color: #1e60b3;
    margin-top: .08rem;
}
