:root {
    --text: #e7eaf3;
    --muted: #9ca3af;
    --line: rgba(148,163,184,.20);
    --pri: #A78BFA;
    --acc: #22D3EE;
    --ease-out: cubic-bezier(.16,1,.3,1);
    --shadow: 0 26px 80px rgba(0,0,0,.55);
    --ring: 0 0 0 3px rgba(34,211,238,.22);
    --base: #191c28;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

    body.theme-dark {
        margin: 0;
        font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
        color: var(--text);
        background: var(--base);
        overflow-x: hidden;
        opacity: 0;
        transition: opacity .5s var(--ease-out);
    }

        body.theme-dark.is-ready {
            opacity: 1;
        }

a {
    color: inherit;
    text-decoration: none;
}

.d-none {
    display: none !important;
}

:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.auth-canvas {
    position: relative;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 18px 16px 28px;
    isolation: isolate;
    overflow: hidden;
}

/* Background split 60/40 */
.split-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: grid;
    grid-template-columns: 60% 40%;
}

.split-bg__left {
    background: url("/Images/login-background.jpg") center/cover no-repeat;
    background-position: 100% center;
}

.split-bg__right {
    background: var(--base);
}

/* Center panel */
.auth-center {
    position: relative;
    z-index: 2;
    width: 100%;
    display: grid;
    place-items: center;
}

/* Panel: solid base color, no glass, no glow */
.auth-panel {
    width: 100%;
    max-width: 980px;
    min-height: 560px;
    border-radius: 26px;
    border: 1px solid rgba(148,163,184,.18);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: var(--base);
    opacity: 0;
    transform: translateY(14px) perspective(1200px) rotateX(10deg) rotateY(-10deg) scale(.985);
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}

body.is-ready .auth-panel {
    opacity: 1;
    transform: translateY(0) perspective(1200px) rotateX(0) rotateY(0) scale(1);
}

/* Panel left */
.panel-art {
    position: relative;
    padding: 22px; /* proper padding requested */
    background: var(--base);
}

.panel-art__frame {
    position: relative;
    height: 100%;
    min-height: 520px;
    border-radius: 22px;
    overflow: hidden;
    border: none;
    background: var(--base);
}

/* Image in panel left */
.panel-art__img {
    position: absolute;
    inset: 0;
    background: url("/Images/login-panel.jpg") center/cover no-repeat;
    background-position:center -52px;
}

/* arrows */
.art-nav {
    position: absolute;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,.20);
    background: rgba(255,255,255,.06);
    color: rgba(231,234,243,.92);
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 3;
    transition: transform .16s var(--ease-out), border-color .16s var(--ease-out), background .16s var(--ease-out);
}

    .art-nav:hover {
        transform: translateY(-1px);
        border-color: rgba(148,163,184,.35);
        background: rgba(255,255,255,.10);
    }

.art-nav--prev {
    left: 14px;
}

.art-nav--next {
    left: 62px;
}

/* Panel right */
.panel-form {
    padding: 34px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--base);
}

/* Logo */
.panel-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.panel-logo__mark {
    width: 34px;
    height: 34px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148,163,184,.18);
    background: rgba(255,255,255,.04);
}

.panel-logo__text {
    font-weight: 950;
    letter-spacing: .2px;
    color: rgba(231,234,243,.95);
}

.form-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 950;
    letter-spacing: .2px;
}

.subtitle {
    margin: 6px 0 0;
    color: rgba(214,224,244,.86);
    font-size: .94rem;
    line-height: 1.35;
}

/* Alerts */
.alert {
    padding: 10px 12px;
    border-radius: 14px;
    font-size: .95rem;
    margin: 8px 0 12px;
    border: 1px solid transparent;
}

    .alert.danger {
        background: rgba(220,38,38,.12);
        color: #fca5a5;
        border-color: rgba(220,38,38,.22);
    }

    .alert.success {
        background: rgba(22,163,74,.10);
        color: #86efac;
        border-color: rgba(22,163,74,.22);
    }

/* Inputs */
.field {
    margin-bottom: 12px;
}

    .field label {
        display: inline-block;
        margin: 4px 0 7px;
        font-size: .84rem;
        color: rgba(214,224,244,.78);
    }

.input {
    display: grid;
    grid-template-columns: 46px 1fr 52px;
    align-items: stretch;
    border: 1px solid rgba(148,163,184,.20);
    border-radius: 14px;
    background: rgba(255,255,255,.04);
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

    .input i {
        display: grid;
        place-items: center;
        width: 46px;
        height: 50px;
        color: rgba(207,225,255,.92);
    }

.control {
    height: 50px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: .98rem;
    padding: 0 12px;
    min-width: 0;
}

    .control::placeholder {
        color: rgba(148,163,184,.85);
    }

.input:focus-within {
    border-color: transparent;
    box-shadow: var(--ring);
    background: rgba(255,255,255,.06);
}

.eye-btn {
    width: 52px;
    height: 50px;
    border: none;
    background: transparent;
    color: rgba(207,225,255,.92);
    cursor: pointer;
    display: grid;
    place-items: center;
    border-left: 1px solid rgba(148,163,184,.16);
}

    .eye-btn:hover {
        color: var(--pri);
    }

/* Rows */
.row {
    display: flex;
}

.between {
    justify-content: space-between;
}

.v-center {
    align-items: center;
}

.m-b-16 {
    margin-bottom: 14px;
}

/* Switch */
.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

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

.switch-track {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(148,163,184,.18);
    position: relative;
    transition: background .2s ease, border-color .2s ease;
}

    .switch-track::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 3px;
        transform: translateY(-50%);
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #dbeafe;
        box-shadow: 0 2px 6px rgba(0,0,0,.3);
        transition: left .2s ease;
    }

.switch.is-on .switch-track {
    background: linear-gradient(135deg, var(--pri), var(--acc));
    border-color: rgba(167,139,250,.45);
}

    .switch.is-on .switch-track::after {
        left: 23px;
    }

.switch-label {
    font-size: .86rem;
    color: rgba(214,224,244,.88);
}

.link {
    color: rgba(214,224,244,.84);
    font-size: .86rem;
}

    .link:hover {
        color: rgba(231,234,243,.96);
    }

/* Buttons */
.stack {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 46px;
    border-radius: 14px;
    font-weight: 900;
    font-size: .96rem;
    cursor: pointer;
    user-select: none;
    transition: transform .12s ease, filter .12s ease, box-shadow .15s ease, border-color .15s ease;
}

    .btn.primary {
        color: #07111f;
        border: none;
        background: linear-gradient(135deg, var(--pri), var(--acc));
        box-shadow: 0 18px 46px rgba(136,162,255,.18), inset 0 0 0 1px rgba(255,255,255,.12);
    }

        .btn.primary:hover {
            transform: translateY(-1px);
            filter: brightness(1.06);
        }

    .btn.ghost {
        background: rgba(255,255,255,.03);
        border: 1px solid rgba(148,163,184,.18);
        color: rgba(231,234,243,.96);
    }

        .btn.ghost:hover {
            transform: translateY(-1px);
            border-color: rgba(148,163,184,.35);
        }

.foot-note {
    text-align: center;
    margin-top: 10px;
    color: rgba(156,163,175,.92);
    font-size: .86rem;
    line-height: 1.35;
}

/* Loader: kept exactly (no changes) */
.busy.hidden {
    display: none;
}

.busy {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(3,6,14,.55);
    display: grid;
    place-items: center;
    backdrop-filter: blur(10px);
}

.busy__box {
    width: min(420px, calc(100% - 32px));
    background: radial-gradient(700px 260px at 20% 0%, rgba(34,211,238,.14), transparent 60%), radial-gradient(640px 260px at 100% 40%, rgba(167,139,250,.14), transparent 62%), rgba(12,18,36,.92);
    border: 1px solid rgba(148,163,184,.22);
    color: var(--text);
    padding: 16px 18px;
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
}

.busy__title {
    font-weight: 950;
    letter-spacing: .2px;
}

.busy__text {
    color: rgba(214,224,244,.82);
    font-size: .92rem;
    margin-top: 2px;
}

.busy__orb {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,.22);
    background: rgba(255,255,255,.04);
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.orb {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pri), var(--acc));
    filter: drop-shadow(0 10px 18px rgba(34,211,238,.18));
    animation: orb 1.2s var(--ease-out) infinite;
}

    .orb.o1 {
        animation-delay: 0s;
    }

    .orb.o2 {
        animation-delay: .12s;
    }

    .orb.o3 {
        animation-delay: .24s;
    }

@keyframes orb {
    0% {
        transform: translate(-14px, 14px) scale(.85);
        opacity: .55;
    }

    50% {
        transform: translate(0px, 0px) scale(1.05);
        opacity: 1;
    }

    100% {
        transform: translate(14px, -14px) scale(.85);
        opacity: .55;
    }
}

/* Responsive */
@media (max-width: 820px) {
    .split-bg {
        grid-template-columns: 1fr;
    }

    .split-bg__right {
        display: none;
    }

    .auth-panel {
        grid-template-columns: 1fr;
        max-width: 560px;
        min-height: unset;
    }

    .panel-art {
        padding: 14px;
    }

    .panel-art__frame {
        min-height: 180px;
    }

    .panel-form {
        padding: 22px 18px;
    }
}
