:root {
    --gold: #C9952A;
    --gold-light: #F5E4B8;
    --gold-dark: #8B6318;
    --navy: #0F1F3D;
    --navy-mid: #1E3560;
    --navy-light: #E8EDF7;
    --white: #FAFAF8;
    --text: #1A1A2E;
    --text-muted: #5A6480;
    --border: rgba(15, 31, 61, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --error: #C0392B;
    --error-bg: #FDECEA;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--white);
    color: var(--text);
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ── LEFT PANEL ── */
.left-panel {
    background: var(--navy);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.left-panel::before {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 149, 42, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.left-panel::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 149, 42, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.panel-logo {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: #fff;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.panel-logo span {
    color: var(--gold);
}

.panel-main {
    position: relative;
    z-index: 1;
}

.panel-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
    background: rgba(201, 149, 42, 0.15);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
}

.panel-heading {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.2rem;
}

.panel-heading em {
    font-style: italic;
    color: var(--gold);
}

.panel-sub {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.65;
    font-weight: 300;
    max-width: 320px;
}

.panel-modules {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.module-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 400;
}

.module-chip-icon {
    font-size: 1rem;
    width: 28px;
    height: 28px;
    background: rgba(201, 149, 42, 0.2);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── RIGHT PANEL ── */
.right-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.login-box {
    width: 100%;
    max-width: 400px;
    animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.9rem;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.login-box .subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 2.2rem;
    font-weight: 300;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}

label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.01em;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(15, 31, 61, 0.08);
}

input::placeholder {
    color: #B0B8CC;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
}

.toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.toggle-pw:hover {
    color: var(--navy);
}

.error-box {
    display: none;
    background: var(--error-bg);
    border: 1px solid rgba(192, 57, 43, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--error);
    margin-bottom: 1.2rem;
    align-items: center;
    gap: 8px;
}

.error-box.show {
    display: flex;
}

.submit-btn {
    width: 100%;
    padding: 13px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.4rem;
}

.submit-btn:hover {
    background: var(--navy-mid);
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.8rem 0 1.4rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.info-note {
    background: var(--navy-light);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.82rem;
    color: var(--navy-mid);
    line-height: 1.5;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.info-note svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 1.8rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--navy);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
    }

    .left-panel {
        display: none;
    }

    .right-panel {
        padding: 2rem 1.5rem;
        align-items: flex-start;
        padding-top: 3rem;
    }
}