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

:root {
    --navy: #0a1628;
    --blue: #1a6fff;
    --gray: #8a9ab5;
    --gray-light: #e8ecf2;
    --off-white: #f5f7fa;
    --red: #e74c3c;
    --green: #28c940;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--off-white);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 520px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(10, 22, 40, 0.14), 0 0 0 1px rgba(10, 22, 40, 0.05);
}

/* LEFT PANEL */
.login-brand {
    background: var(--navy);
    flex: 1;
    padding: 52px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(26, 111, 255, 0.2) 0%, transparent 70%);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-logo-mark {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: -0.02em;
}

.brand-copy {
    position: relative;
}

.brand-headline {
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.brand-headline strong {
    font-weight: 600;
    color: #fff;
}

.brand-stats {
    display: flex;
    gap: 32px;
    margin-top: 28px;
}

.brand-stat-val {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.03em;
}

.brand-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 2px;
}

/* RIGHT PANEL */
.login-form-panel {
    background: #fff;
    flex: 1;
    padding: 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 0.88rem;
    color: var(--gray);
    margin-bottom: 40px;
}

/* Success banner — shown after registration */
.success-banner {
    display: none;
    background: rgba(40, 201, 64, 0.08);
    border: 1px solid rgba(40, 201, 64, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.84rem;
    color: #1a7a2e;
    margin-bottom: 20px;
    align-items: center;
    gap: 8px;
}

.success-banner.show {
    display: flex;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--navy);
    background: var(--off-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.input-group input:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 111, 255, 0.1);
}

button[type="submit"] {
    width: 100%;
    background: var(--navy);
    color: #fff;
    padding: 13px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s, transform 0.15s;
}

button[type="submit"]:hover {
    background: var(--blue);
    transform: translateY(-1px);
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    color: var(--red);
    font-size: 0.82rem;
    margin-top: 14px;
    opacity: 0;
    transition: opacity 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.error-message.show {
    opacity: 1;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.register-link {
    font-size: 0.82rem;
    color: var(--gray);
}

.register-link a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

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

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    font-size: 0.8rem;
    color: var(--gray);
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--navy);
}

@media (max-width: 640px) {
    .login-brand {
        display: none;
    }

    .login-wrapper {
        max-width: 420px;
    }

    .login-form-panel {
        padding: 36px 28px;
    }
}