:root {
    --sidebar-bg:          #0f1623;
    --sidebar-accent:      #3b82f6;
    --page-bg:             #f4f6fb;
    --card-bg:             #ffffff;
    --border-color:        #e9ecef;
    --text-primary:        #111827;
    --text-secondary:      #6b7280;
    --font:                'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--page-bg);
    color: var(--text-primary);
    min-height: 100vh;
}

/* SHELL */
.login-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ================= LEFT BRAND PANEL ================= */
.login-brand-panel {
    background: var(--sidebar-bg);
    color: #fff;
    padding: 40px 48px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* decorative background glow */
.login-brand-panel::before,
.login-brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .35;
    pointer-events: none;
}
.login-brand-panel::before {
    width: 360px; height: 360px;
    background: #3b82f6;
    top: -120px; right: -120px;
}
.login-brand-panel::after {
    width: 300px; height: 300px;
    background: #1e40af;
    bottom: -100px; left: -80px;
    opacity: .4;
}

.brand-top {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}
.sidebar-brand-icon {
    width: 34px; height: 34px;
    background: var(--sidebar-accent);
    border-radius: 8px;
    display: grid; place-items: center;
    color: #fff; font-size: 16px;
}
.sidebar-brand-name {
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    letter-spacing: .01em;
}

.brand-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 440px;
    position: relative;
    z-index: 1;
}
.brand-hero h1 {
    font-size: 34px;
    line-height: 1.2;
    font-weight: 600;
    margin: 0 0 16px;
    color: #fff;
    letter-spacing: -.01em;
}
.brand-hero p {
    font-size: 15px;
    line-height: 1.6;
    color: #8a93a8;
    margin: 0 0 28px;
}

.brand-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.brand-feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #c8ccd6;
    font-weight: 500;
}
.brand-feature-list li i {
    width: 32px; height: 32px;
    background: rgba(59,130,246,.15);
    color: var(--sidebar-accent);
    border-radius: 8px;
    display: grid; place-items: center;
    font-size: 15px;
}

.brand-footer {
    font-size: 12.5px;
    color: #5c6478;
    position: relative;
    z-index: 1;
}

/* ================= RIGHT FORM PANEL ================= */
.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.login-form-wrap {
    width: 100%;
    max-width: 420px;
}

.login-heading {
    margin-bottom: 32px;
}
.login-eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sidebar-accent);
    margin: 0 0 8px;
}
.login-heading h2 {
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 8px;
    letter-spacing: -.01em;
    color: var(--text-primary);
}
.login-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.55;
}

/* FORM */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 7px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}
.label-row label { margin: 0; }

.forgot-link {
    font-size: 12.5px;
    color: var(--sidebar-accent);
    text-decoration: none;
    font-weight: 500;
}
.forgot-link:hover { text-decoration: underline; }

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon > i {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    font-size: 15px;
    pointer-events: none;
}
.input-with-icon input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 14px 0 40px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-primary);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.input-with-icon input::placeholder { color: #9ca3af; }
.input-with-icon input:focus {
    border-color: var(--sidebar-accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.toggle-password {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    color: #9ca3af;
    cursor: pointer;
    display: grid;
    place-items: center;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.toggle-password:hover { color: var(--text-primary); background: #f4f6fb; }

/* REMEMBER ROW */
.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}
.remember-row input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: var(--sidebar-accent);
    cursor: pointer;
}

/* SUBMIT */
.login-submit {
    height: 46px;
    background: var(--sidebar-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    transition: background .15s, transform .05s;
}
.login-submit:hover { background: #2563eb; }
.login-submit:active { transform: translateY(1px); }
.login-submit i { font-size: 16px; }

.signup-hint {
    margin-top: 26px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}
.signup-hint a {
    color: var(--sidebar-accent);
    text-decoration: none;
    font-weight: 500;
}
.signup-hint a:hover { text-decoration: underline; }

/* ================= RESPONSIVE ================= */
@media (max-width: 991px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand-panel {
        padding: 28px 28px 40px;
        min-height: auto;
    }
    .brand-hero {
        max-width: none;
        padding: 28px 0 12px;
    }
    .brand-hero h1 { font-size: 26px; }
    .brand-feature-list { display: none; }
    .brand-footer { display: none; }
}

@media (max-width: 520px) {
    .login-form-panel { padding: 32px 20px; }
    .login-heading h2 { font-size: 22px; }
}
