*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --orange: #E36209;
    --orange-light: #F07C2A;
    --orange-glow: rgba(227, 98, 9, 0.18);
    --navy: #1e3a5f;
    --navy-deep: #142b48;
    --navy-mid: #2d5282;
    --white: #ffffff;
    --off-white: #f8f9fb;
    --muted: #6b7280;
    --border: #e5e7eb;
    --input-bg: #f9fafb;
    --error: #dc2626;
}

html,
body {
    height: 100%;
    font-family: 'DM Sans', sans-serif;
    background: var(--off-white);
    overflow: hidden;
}

/* -- Layout -------------------------------------- */
.login-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* -- LEFT PANEL ----------------------------------- */
.panel-left {
    flex: 0 0 44%;
    background: var(--navy-deep);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 56px;
    overflow: hidden;
}

/* Geometric circuit-board background */
.panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(227, 98, 9, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(227, 98, 9, .06) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: grid-drift 20s linear infinite;
}

@keyframes grid-drift {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 40px 40px;
    }
}

/* Glowing orb */
.panel-left::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(227, 98, 9, .22) 0%, transparent 65%);
    bottom: -120px;
    right: -80px;
    pointer-events: none;
}

.brand-lockup {
    position: relative;
    z-index: 2;
    animation: fadeUp .7s ease both;
}

.brand-icon {
    width: 56px;
    height: 56px;
    background: var(--orange);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(227, 98, 9, .45);
}

.brand-icon i {
    color: white;
    font-size: 24px;
}

.brand-name {
    font-family: 'Sora', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 12px;
}

.brand-name span {
    color: var(--orange);
}

.brand-tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, .45);
    line-height: 1.6;
    max-width: 280px;
}

/* Feature bullets */
.feature-list {
    position: relative;
    z-index: 2;
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeUp .7s .15s ease both;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-dot {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(227, 98, 9, .15);
    border: 1px solid rgba(227, 98, 9, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-dot i {
    color: var(--orange);
    font-size: 13px;
}

.feature-text {
    font-size: 13px;
    color: rgba(255, 255, 255, .6);
    font-weight: 400;
}

/* Bottom version tag */
.panel-version {
    position: absolute;
    bottom: 28px;
    left: 56px;
    font-size: 11px;
    color: rgba(255, 255, 255, .2);
    letter-spacing: .5px;
    z-index: 2;
}

/* Orange accent bar on right edge */
.panel-accent {
    position: absolute;
    top: 15%;
    right: 0;
    width: 3px;
    height: 35%;
    background: linear-gradient(to bottom, transparent, var(--orange), transparent);
    border-radius: 2px;
}

/* -- RIGHT PANEL ----------------------------------- */
.panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    background: var(--white);
    position: relative;
}

/* Subtle top-right decoration */
.panel-right::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle at top right, rgba(227, 98, 9, .06), transparent 65%);
    pointer-events: none;
}

.form-box {
    width: 100%;
    max-width: 380px;
    animation: fadeUp .6s .1s ease both;
}

.form-heading {
    font-family: 'Sora', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.form-subheading {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 36px;
}

/* Error banner */
.error-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--error);
    animation: shake .4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* Input group */
.field-group {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 7px;
    letter-spacing: .2px;
}

.input-wrap {
    position: relative;
}

.input-wrap i.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
    transition: color .2s;
}

.field-control {
    width: 100%;
    padding: 11px 42px 11px 40px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--navy);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none;
}

.field-control::placeholder {
    color: #c0c8d2;
}

.field-control:focus {
    border-color: var(--orange);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--orange-glow);
}

.field-control:focus+.field-icon,
.input-wrap:focus-within .field-icon {
    color: var(--orange);
}

/* Password toggle */
.toggle-pw {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 14px;
    padding: 4px;
    transition: color .2s;
}

.toggle-pw:hover {
    color: var(--navy);
}

/* Remember row */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--border);
    cursor: pointer;
    accent-color: var(--orange);
}

/* Submit button */
.btn-login {
    width: 100%;
    padding: 13px;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background .2s, transform .15s, box-shadow .2s;
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, .08));
}

/* Orange sweep on hover */
.btn-login::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(227, 98, 9, .25), transparent);
    transition: left .4s ease;
}

.btn-login:hover {
    background: var(--navy-mid);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(30, 58, 95, .28);
}

.btn-login:hover::after {
    left: 100%;
}

.btn-login:active {
    transform: translateY(0);
}

/* Loading spinner state */
.btn-login.loading {
    pointer-events: none;
    opacity: .8;
}

.btn-login .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Fade-up animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive — stack on small screens */
@media (max-width: 768px) {

    html,
    body {
        overflow: auto;
    }

    .login-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .panel-left {
        flex: none;
        padding: 36px 28px;
        min-height: auto;
    }

    .feature-list {
        display: none;
    }

    .panel-right {
        padding: 40px 24px;
    }

    .form-box {
        max-width: 100%;
    }
}