:root {
    --navy-950: #06111f;
    --navy-900: #08182b;
    --navy-800: #102641;
    --navy-700: #183653;
    --blue: #2b7cff;
    --cyan: #22c4df;
    --lime: #b8ef46;
    --ink: #101828;
    --muted: #667085;
    --line: #dfe5ec;
    --surface: #ffffff;
    --soft: #f6f8fb;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --success: #067647;
    --success-bg: #ecfdf3;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(480px, 1.08fr) minmax(500px, .92fr);
}

.brand-panel {
    position: relative;
    min-height: 100vh;
    padding: 48px clamp(48px, 6vw, 96px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    background:
        radial-gradient(circle at 75% 28%, rgba(43,124,255,.24), transparent 33%),
        radial-gradient(circle at 18% 78%, rgba(34,196,223,.12), transparent 35%),
        linear-gradient(145deg, var(--navy-950), var(--navy-900) 55%, #0c2138);
}

.brand-top,
.brand-content,
.brand-footer {
    position: relative;
    z-index: 3;
}

.brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: #ffffff;
    text-decoration: none;
}

.brand-symbol {
    width: 39px;
    height: 39px;
    display: inline-flex;
    align-items: flex-end;
    gap: 4px;
    transform: skew(-8deg);
}

.brand-symbol span {
    display: block;
    width: 9px;
    border-radius: 2px;
    background: var(--lime);
}

.brand-symbol span:nth-child(1) {
    height: 21px;
}

.brand-symbol span:nth-child(2) {
    height: 32px;
}

.brand-symbol span:nth-child(3) {
    height: 26px;
    background: var(--cyan);
}

.brand-name {
    font-size: 27px;
    font-weight: 750;
    letter-spacing: -.8px;
}

.secure-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #bbc9db;
    font-size: 13px;
    font-weight: 600;
}

.secure-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 5px rgba(184,239,70,.1);
}

.brand-content {
    width: min(620px, 100%);
    margin: 70px 0;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--lime);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.4px;
}

.eyebrow.dark {
    margin-bottom: 12px;
    color: #2875e7;
}

.brand-content h1 {
    margin: 0;
    max-width: 650px;
    font-size: clamp(46px, 5.2vw, 76px);
    line-height: .99;
    letter-spacing: -3.5px;
    font-weight: 720;
}

.brand-content h1 span {
    color: var(--lime);
}

.brand-description {
    max-width: 560px;
    margin: 30px 0 38px;
    color: #aebed1;
    font-size: 17px;
    line-height: 1.75;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.feature-card {
    min-height: 100px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    background: rgba(255,255,255,.055);
    backdrop-filter: blur(12px);
}

.feature-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--lime);
    background: rgba(184,239,70,.1);
}

.feature-icon svg {
    width: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card strong,
.feature-card span {
    display: block;
}

.feature-card strong {
    margin-bottom: 5px;
    font-size: 14px;
}

.feature-card div span {
    color: #91a3b9;
    font-size: 12px;
    line-height: 1.4;
}

.brand-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #71859d;
    font-size: 12px;
}

.footer-line {
    width: 32px;
    height: 1px;
    background: #42566d;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    opacity: .17;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom right, transparent 10%, black, transparent 85%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
}

.orb-one {
    width: 320px;
    height: 320px;
    top: -170px;
    right: -100px;
    border: 1px solid rgba(184,239,70,.16);
}

.orb-two {
    width: 500px;
    height: 500px;
    right: -310px;
    bottom: -170px;
    border: 1px solid rgba(34,196,223,.14);
}

.form-panel {
    position: relative;
    min-height: 100vh;
    padding: 48px clamp(38px, 6vw, 92px);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 80% 5%, rgba(43,124,255,.06), transparent 25%),
        var(--surface);
}

.login-card {
    width: min(470px, 100%);
}

.mobile-brand {
    display: none;
}

.login-heading {
    margin-bottom: 28px;
}

.login-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 38px;
    line-height: 1.12;
    letter-spacing: -1.2px;
}

.login-heading > p:last-child {
    margin: 11px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.alert {
    margin-bottom: 20px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.alert-error,
.alert-warning {
    color: var(--danger);
    border-color: #fecdca;
    background: var(--danger-bg);
}

.alert-success {
    color: var(--success);
    border-color: #abefc6;
    background: var(--success-bg);
}

.role-fieldset {
    min-width: 0;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
}

.role-fieldset legend,
.field label {
    margin-bottom: 9px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.role-fieldset legend {
    display: block;
}

.role-switch {
    padding: 5px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--soft);
}

.role-option {
    min-width: 0;
    min-height: 72px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--muted);
    text-align: left;
    background: transparent;
    transition: .2s ease;
}

.role-option.active {
    color: var(--ink);
    border-color: #e2e7ee;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(16,24,40,.07);
}

.role-icon {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #667085;
    background: #edf1f6;
}

.role-option.active .role-icon {
    color: #226fdc;
    background: #eaf2ff;
}

.role-icon svg {
    width: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.role-option strong,
.role-option small {
    display: block;
}

.role-option strong {
    font-size: 14px;
}

.role-option small {
    margin-top: 3px;
    color: #98a2b3;
    font-size: 11px;
}

.field {
    margin-top: 18px;
}

.field > label {
    display: inline-block;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.text-button {
    padding: 0;
    border: 0;
    color: #2673df;
    font-size: 12px;
    font-weight: 700;
    background: transparent;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 47px;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    color: var(--ink);
    font-size: 14px;
    background: #ffffff;
    transition: border-color .2s, box-shadow .2s;
}

.input-wrap input::placeholder {
    color: #98a2b3;
}

.input-wrap input:focus {
    border-color: #4d8eea;
    box-shadow: 0 0 0 4px rgba(43,124,255,.11);
}

.input-icon,
.password-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #98a2b3;
}

.input-icon {
    left: 16px;
    pointer-events: none;
}

.input-icon svg,
.password-toggle svg {
    width: 19px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle {
    right: 10px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
}

.remember {
    margin: 18px 0 23px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #475467;
    font-size: 13px;
    cursor: pointer;
}

.remember input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-check {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 1px solid #cfd6df;
    border-radius: 5px;
    background: #ffffff;
}

.custom-check svg {
    width: 13px;
    fill: none;
    stroke: transparent;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.remember input:checked + .custom-check {
    border-color: #2673df;
    background: #2673df;
}

.remember input:checked + .custom-check svg {
    stroke: #ffffff;
}

.submit-button {
    width: 100%;
    height: 54px;
    padding: 0 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 750;
    background: linear-gradient(100deg, #1265d8, #2586e8);
    box-shadow: 0 12px 24px rgba(25,112,219,.2);
    transition: transform .2s, box-shadow .2s;
}

.submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(25,112,219,.28);
}

.submit-button svg {
    width: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-footer {
    margin-top: 25px;
    padding-top: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid #edf0f4;
    color: #98a2b3;
    font-size: 11px;
}

.shield-icon svg {
    width: 16px;
    display: block;
    fill: none;
    stroke: #667085;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.copyright {
    position: absolute;
    right: 0;
    bottom: 22px;
    left: 0;
    margin: 0;
    color: #a2aab7;
    text-align: center;
    font-size: 11px;
}

@media (max-width: 1050px) {
    .auth-shell {
        grid-template-columns: minmax(390px, .88fr) minmax(480px, 1.12fr);
    }

    .brand-panel {
        padding: 42px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-card:nth-child(2) {
        display: none;
    }
}

@media (max-width: 820px) {
    .auth-shell {
        display: block;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        padding: 40px 24px 70px;
        align-items: flex-start;
    }

    .mobile-brand {
        width: 100%;
        margin-bottom: 48px;
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--navy-900);
    }

    .mobile-brand .brand-symbol {
        width: 34px;
        height: 34px;
    }

    .mobile-brand .brand-name {
        font-size: 25px;
    }

    .login-heading h2 {
        font-size: 34px;
    }
}

@media (max-width: 480px) {
    .form-panel {
        padding: 28px 18px 65px;
    }

    .mobile-brand {
        margin-bottom: 38px;
    }

    .role-option {
        min-height: 66px;
        padding: 9px;
    }

    .role-icon {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
    }

    .role-option small {
        display: none;
    }

    .login-footer {
        align-items: flex-start;
        text-align: center;
    }
}

/* Performance optimization */
.brand-panel {
    background: linear-gradient(145deg, #06111f 0%, #08182b 55%, #0c2138 100%);
}

.feature-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.07);
}

.grid-pattern {
    opacity: 0.08;
    -webkit-mask-image: none;
    mask-image: none;
    background-size: 72px 72px;
}

.orb {
    filter: none;
}

.form-panel {
    background: #ffffff;
}

.submit-button {
    box-shadow: 0 8px 18px rgba(25, 112, 219, 0.16);
}

.submit-button:hover {
    box-shadow: 0 10px 22px rgba(25, 112, 219, 0.22);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

/* LOGIN LEGAL FOOTER */
.login-legal-footer {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 14px;
    width: 50%;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #8a97aa;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.login-legal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.login-legal-footer a {
    color: #6f7f95;
    text-decoration: none;
    transition: color .2s ease;
}

.login-legal-footer a:hover,
.login-legal-footer a:focus-visible {
    color: #1677e8;
    text-decoration: underline;
}

.legal-business {
    color: #536176;
    font-weight: 700;
}

@media (max-width: 900px) {
    .login-legal-footer {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        padding: 20px 18px;
        flex-direction: column;
        gap: 5px;
        background: #ffffff;
    }
}

/* TOOREAL GLOBAL BRAND LINK */
a.brand,
a.sidebar-brand {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

a.brand:hover,
a.sidebar-brand:hover {
    text-decoration: none;
}
