* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --midnight: #020712;
    --navy: #06152d;
    --royal: #082d72;
    --azure: #0877d9;
    --azure-light: #28a8ff;
    --gold: #d7a93e;
    --gold-light: #ffd36a;
    --amber: #e6a62e;
    --white: #ffffff;
    --muted: #aebbd0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;

    background:
        radial-gradient(
            circle at 50% 115%,
            rgba(10, 86, 180, 0.34),
            transparent 42%
        ),
        radial-gradient(
            circle at 78% 35%,
            rgba(0, 105, 255, 0.12),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #01030a 0%,
            #031026 45%,
            #061c42 100%
        );

    color: var(--white);

    overflow-x: hidden;
}


/* =========================================================
   PAGE
   ========================================================= */

.auth-page {
    position: relative;

    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 60px 30px;

    overflow: hidden;
}

.auth-page::before {
    content: "";

    position: absolute;

    width: 900px;
    height: 900px;

    left: -470px;
    bottom: -600px;

    border-radius: 50%;

    border: 2px solid rgba(18, 122, 255, 0.5);

    box-shadow:
        0 0 45px rgba(0, 113, 255, 0.65),
        inset 0 0 50px rgba(0, 113, 255, 0.22);

    pointer-events: none;
}

.auth-page::after {
    content: "";

    position: absolute;

    width: 650px;
    height: 650px;

    right: -390px;
    top: -430px;

    border-radius: 50%;

    border: 1px solid rgba(217, 169, 62, 0.34);

    box-shadow:
        0 0 50px rgba(217, 169, 62, 0.16);

    pointer-events: none;
}


/* =========================================================
   MAIN AUTH CARD
   ========================================================= */

.auth-card {
    position: relative;

    z-index: 2;

    width: min(1180px, 100%);
    height: 650px;

    overflow: hidden;

    border-radius: 30px;

    background:
        linear-gradient(
            145deg,
            #031027 0%,
            #061d43 52%,
            #04152f 100%
        );

    border: 1px solid rgba(255, 211, 106, 0.7);

    box-shadow:
        0 0 0 1px rgba(0, 112, 255, 0.15),
        0 0 55px rgba(0, 97, 255, 0.32),
        0 35px 90px rgba(0, 0, 0, 0.7);

    isolation: isolate;
}


/* =========================================================
   FORM SIDES
   ========================================================= */

.auth-side {
    position: absolute;

    top: 0;

    width: 50%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 55px 65px;

    background:
        radial-gradient(
            circle at 80% 10%,
            rgba(0, 111, 255, 0.18),
            transparent 34%
        ),
        linear-gradient(
            150deg,
            #031027 0%,
            #061d43 52%,
            #04152f 100%
        );
}

.auth-side::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 3px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(0, 123, 255, 0.9),
            rgba(255, 193, 55, 0.9),
            transparent
        );

    box-shadow:
        0 -3px 20px rgba(0, 105, 255, 0.4);
}

.login-side {
    right: 0;

    z-index: 1;
}

.register-side {
    left: 0;

    z-index: 1;
}

.form-wrapper {
    position: relative;

    z-index: 2;

    width: min(440px, 100%);
}


/* =========================================================
   MOVING BRAND PANEL
   ========================================================= */

.brand-panel {
    position: absolute;

    z-index: 10;

    top: 0;
    left: 0;

    width: 50%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 55px;

    overflow: hidden;

    background:
        radial-gradient(
            ellipse at 52% 34%,
            rgba(45, 169, 255, 0.30) 0%,
            rgba(8, 92, 205, 0.16) 24%,
            transparent 52%
        ),
        radial-gradient(
            ellipse at 14% 82%,
            rgba(0, 126, 255, 0.34) 0%,
            transparent 48%
        ),
        radial-gradient(
            ellipse at 88% 72%,
            rgba(230, 166, 46, 0.16) 0%,
            transparent 38%
        ),
        linear-gradient(
            118deg,
            transparent 0%,
            rgba(40, 168, 255, 0.06) 36%,
            rgba(255, 211, 106, 0.08) 51%,
            transparent 67%
        ),
        linear-gradient(
            145deg,
            #010611 0%,
            #03132f 30%,
            #05265c 66%,
            #073c82 100%
        );

    border-right: 2px solid rgba(231, 177, 56, 0.88);

    box-shadow:
        18px 0 42px rgba(0, 0, 0, 0.32),
        10px 0 35px rgba(0, 102, 255, 0.12);

    transform: translateX(0);

    transition:
        transform 0.95s cubic-bezier(0.77, 0, 0.175, 1),
        border-color 0.55s ease,
        box-shadow 0.75s ease;
}


/* =========================================================
   CURVED SWEEPING GOLD EDGE
   ========================================================= */

.brand-panel::before {
    content: "";

    position: absolute;

    width: 470px;
    height: 790px;

    right: -315px;
    top: -70px;

    border-radius: 50%;

    border-left: 3px solid rgba(255, 199, 66, 0.95);

    box-shadow:
        -10px 0 24px rgba(255, 174, 0, 0.24),
        -20px 0 65px rgba(0, 106, 255, 0.22);

    transform: rotate(-6deg);

    transition:
        right 0.95s cubic-bezier(0.77, 0, 0.175, 1),
        left 0.95s cubic-bezier(0.77, 0, 0.175, 1),
        transform 0.95s cubic-bezier(0.77, 0, 0.175, 1);

    pointer-events: none;
}

.brand-panel::after {
    content: "";

    position: absolute;

    width: 540px;
    height: 540px;

    left: -270px;
    bottom: -375px;

    border-radius: 50%;

    border: 2px solid rgba(0, 125, 255, 0.52);

    box-shadow:
        0 0 38px rgba(0, 118, 255, 0.42);

    pointer-events: none;
}


/* =========================================================
   ENERGY EFFECT INSIDE MOVING PANEL
   ========================================================= */

.brand-energy {
    position: absolute;

    inset: 0;

    z-index: 1;

    background:
        linear-gradient(
            112deg,
            transparent 8%,
            rgba(0, 135, 255, 0.05) 26%,
            rgba(40, 168, 255, 0.16) 40%,
            rgba(255, 211, 106, 0.13) 49%,
            rgba(0, 122, 255, 0.12) 59%,
            transparent 78%
        ),
        radial-gradient(
            ellipse at 50% 45%,
            rgba(31, 144, 255, 0.10),
            transparent 48%
        );

    background-size: 240% 100%, 100% 100%;

    animation: energyDrift 9s linear infinite;

    pointer-events: none;
}

@keyframes energyDrift {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}


/* =========================================================
   BRAND CONTENT
   ========================================================= */

.brand-content {
    position: relative;

    z-index: 3;

    width: 100%;

    text-align: center;

    transition:
        transform 0.75s ease,
        opacity 0.5s ease;
}

.mureh-logo {
    width: 220px;
    height: 220px;

    object-fit: contain;

    margin: 0 auto 24px;

    border-radius: 50%;

    filter:
        drop-shadow(0 0 12px rgba(255, 200, 74, 0.56))
        drop-shadow(0 0 34px rgba(0, 122, 255, 0.46));

    transition:
        filter 0.75s ease,
        transform 0.75s ease;
}

.brand-content h1 {
    font-family: Georgia, "Times New Roman", serif;

    font-size: clamp(34px, 4vw, 54px);

    line-height: 1;

    letter-spacing: 2px;

    color: var(--gold-light);

    text-shadow:
        0 0 8px rgba(255, 205, 94, 0.45),
        0 4px 14px rgba(0, 0, 0, 0.85);
}

.gold-line {
    width: 165px;
    height: 2px;

    margin: 25px auto;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--gold-light),
            transparent
        );

    box-shadow:
        0 0 10px rgba(255, 203, 80, 0.65);
}

.brand-content p {
    font-family: Georgia, "Times New Roman", serif;

    color: #e8edf7;

    font-size: 15px;

    line-height: 1.8;

    letter-spacing: 1.5px;
}


/* =========================================================
   REGISTER MODE — BRAND PANEL SWEEPS RIGHT
   ========================================================= */

.auth-card.register-mode .brand-panel {
    transform: translateX(100%);

    border-right-color: transparent;

    border-left: 2px solid rgba(231, 177, 56, 0.88);

    box-shadow:
        -18px 0 42px rgba(0, 0, 0, 0.32),
        -10px 0 35px rgba(0, 102, 255, 0.12);
}

.auth-card.register-mode .brand-panel::before {
    right: auto;
    left: -315px;

    border-left: 0;
    border-right: 3px solid rgba(255, 199, 66, 0.95);

    box-shadow:
        10px 0 24px rgba(255, 174, 0, 0.24),
        20px 0 65px rgba(0, 106, 255, 0.22);

    transform: rotate(6deg);
}

.auth-card.register-mode .brand-content {
    transform: translateX(0);
}

.auth-card.register-mode .mureh-logo {
    filter:
        drop-shadow(0 0 13px rgba(255, 200, 74, 0.62))
        drop-shadow(0 0 36px rgba(0, 110, 255, 0.48));
}


/* =========================================================
   TABS
   ========================================================= */

.form-tabs {
    display: flex;

    gap: 32px;

    margin-bottom: 44px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
    position: relative;

    padding: 0 2px 15px;

    border: 0;

    background: transparent;

    color: #8595af;

    font-size: 18px;
    font-weight: 700;

    cursor: pointer;

    transition:
        color 0.3s ease,
        text-shadow 0.3s ease;
}

.tab:hover {
    color: #d8e3f4;
}

.tab.active {
    color: var(--white);

    text-shadow:
        0 0 12px rgba(255, 255, 255, 0.22);
}

.tab.active::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: -2px;

    height: 3px;

    border-radius: 20px;

    background:
        linear-gradient(
            90deg,
            var(--azure-light),
            var(--gold-light)
        );

    box-shadow:
        0 0 12px rgba(0, 131, 255, 0.7);
}


/* =========================================================
   FORM VIEWS
   ========================================================= */

.form-view {
    opacity: 1;

    transform: translateX(0);
}

.form-view h2 {
    font-family: Georgia, "Times New Roman", serif;

    font-size: 36px;

    color: var(--white);

    margin-bottom: 8px;

    text-shadow:
        0 3px 14px rgba(0, 0, 0, 0.55);
}

.form-subtitle {
    color: var(--muted);

    font-size: 14px;

    margin-bottom: 32px;
}


/* =========================================================
   FORM ENTRANCE MOTION
   ========================================================= */

.login-side .form-wrapper {
    transition:
        opacity 0.55s ease,
        transform 0.75s cubic-bezier(0.77, 0, 0.175, 1);

    opacity: 1;

    transform: translateX(0);
}

.register-side .form-wrapper {
    transition:
        opacity 0.55s ease,
        transform 0.75s cubic-bezier(0.77, 0, 0.175, 1);

    opacity: 0;

    transform: translateX(-35px);

    pointer-events: none;
}

.auth-card.register-mode .login-side .form-wrapper {
    opacity: 0;

    transform: translateX(35px);

    pointer-events: none;
}

.auth-card.register-mode .register-side .form-wrapper {
    opacity: 1;

    transform: translateX(0);

    pointer-events: auto;
}


/* =========================================================
   FORM
   ========================================================= */

form {
    display: grid;

    gap: 12px;
}

form label {
    color: #dce5f4;

    font-size: 13px;

    font-weight: 600;

    margin-top: 3px;
}

form input[type="text"],
form input[type="email"],
form input[type="password"] {
    width: 100%;

    height: 50px;

    padding: 0 16px;

    color: var(--white);

    font-size: 15px;

    outline: none;

    border-radius: 8px;

    border: 1px solid rgba(113, 154, 213, 0.46);

    background:
        linear-gradient(
            180deg,
            rgba(4, 21, 49, 0.95),
            rgba(3, 15, 36, 0.95)
        );

    box-shadow:
        inset 0 0 14px rgba(0, 0, 0, 0.25);

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

form input:focus {
    border-color: var(--azure-light);

    box-shadow:
        0 0 0 2px rgba(0, 132, 255, 0.1),
        0 0 18px rgba(0, 115, 255, 0.22);
}


/* =========================================================
   PASSWORD FIELD + SHOW/HIDE EYE
   ========================================================= */

.password-field {
    position: relative;

    width: 100%;
}

.password-field input {
    width: 100%;

    padding-right: 52px !important;
}

.password-toggle {
    position: absolute;

    top: 50%;
    right: 15px;

    transform: translateY(-50%);

    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;

    padding: 0;

    background: transparent;

    color: #91a5c4;

    cursor: pointer;

    border-radius: 50%;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        filter 0.2s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--gold-light);

    background: rgba(255, 211, 106, 0.08);

    outline: none;

    filter:
        drop-shadow(0 0 6px rgba(255, 211, 106, 0.4));
}

.password-toggle svg {
    position: absolute;

    width: 21px;
    height: 21px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.password-toggle .eye-open {
    opacity: 1;

    transform: scale(1);
}

.password-toggle .eye-closed {
    opacity: 0;

    transform: scale(0.82);
}

.password-toggle.is-visible .eye-open {
    opacity: 0;

    transform: scale(0.82);
}

.password-toggle.is-visible .eye-closed {
    opacity: 1;

    transform: scale(1);
}


/* =========================================================
   FORM OPTIONS
   ========================================================= */

.form-options {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin: 6px 0 10px;
}

.remember {
    display: flex;

    align-items: center;

    gap: 8px;

    color: #cbd5e5;
}

.remember input {
    accent-color: var(--azure);
}

.form-options a {
    color: var(--gold-light);

    font-size: 13px;

    text-decoration: none;
}

.form-options a:hover {
    text-decoration: underline;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.primary-button {
    width: 100%;

    min-height: 52px;

    margin-top: 4px;

    border: 0;

    border-radius: 8px;

    cursor: pointer;

    color: #07101f;

    font-size: 15px;

    font-weight: 900;

    letter-spacing: 0.3px;

    background:
        linear-gradient(
            90deg,
            #c9972d 0%,
            #f3cf70 48%,
            #c79225 100%
        );

    box-shadow:
        0 8px 26px rgba(215, 169, 62, 0.25);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.primary-button:hover {
    transform: translateY(-2px);

    filter: brightness(1.08);

    box-shadow:
        0 11px 32px rgba(215, 169, 62, 0.38);
}

.switch-message {
    margin-top: 24px;

    text-align: center;

    color: #9cabc1;

    font-size: 13px;
}

.switch-message button {
    border: 0;

    background: transparent;

    color: var(--gold-light);

    cursor: pointer;

    font-weight: 800;
}

.switch-message button:hover {
    text-decoration: underline;
}


/* =========================================================
   MOBILE / TABLET
   ========================================================= */

@media (max-width: 900px) {

    .auth-page {
        padding: 30px 18px;
    }

    .auth-card {
        width: min(620px, 100%);

        height: auto;
        min-height: 900px;

        display: flex;
        flex-direction: column;

        overflow: hidden;
    }

    .brand-panel {
        position: relative;

        top: auto;
        left: auto;

        width: 100%;
        height: 390px;

        flex: 0 0 390px;

        padding: 40px 25px;

        transform: none !important;

        border-left: 0 !important;
        border-right: 0;

        border-bottom: 2px solid rgba(231, 177, 56, 0.82);

        box-shadow:
            0 15px 35px rgba(0, 0, 0, 0.28);

        order: 1;
    }

    .brand-panel::before {
        width: 700px;
        height: 330px;

        left: 50% !important;
        right: auto !important;

        top: auto;
        bottom: -260px;

        transform: translateX(-50%) rotate(-3deg) !important;

        border-left: 0 !important;
        border-right: 0 !important;
        border-top: 3px solid rgba(255, 199, 66, 0.82);

        box-shadow:
            0 -12px 35px rgba(255, 174, 0, 0.18);
    }

    .auth-side {
        position: relative;

        top: auto;
        left: auto;
        right: auto;

        width: 100%;
        height: auto;
        min-height: 510px;

        padding: 50px 35px 55px;

        order: 2;
    }

    .login-side {
        display: flex;
    }

    .register-side {
        display: none;
    }

    .auth-card.register-mode .login-side {
        display: none;
    }

    .auth-card.register-mode .register-side {
        display: flex;
    }

    .login-side .form-wrapper,
    .register-side .form-wrapper,
    .auth-card.register-mode .login-side .form-wrapper,
    .auth-card.register-mode .register-side .form-wrapper {
        opacity: 1;

        transform: none;

        pointer-events: auto;
    }

    .mureh-logo {
        width: 165px;
        height: 165px;

        margin-bottom: 18px;
    }

    .brand-content h1 {
        font-size: 38px;
    }

    .gold-line {
        margin: 18px auto;
    }

    .brand-content p {
        font-size: 13px;

        line-height: 1.6;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 520px) {

    .auth-page {
        padding: 16px;
    }

    .auth-card {
        border-radius: 22px;

        min-height: 820px;
    }

    .brand-panel {
        height: 330px;

        flex-basis: 330px;

        padding: 30px 20px;
    }

    .mureh-logo {
        width: 135px;
        height: 135px;

        margin-bottom: 15px;
    }

    .brand-content h1 {
        font-size: 30px;

        letter-spacing: 1px;
    }

    .gold-line {
        width: 135px;

        margin: 15px auto;
    }

    .brand-content p {
        font-size: 11px;

        letter-spacing: 1px;
    }

    .auth-side {
        min-height: 490px;

        padding: 40px 24px 45px;
    }

    .form-tabs {
        gap: 22px;

        margin-bottom: 34px;
    }

    .tab {
        font-size: 15px;
    }

    .form-view h2 {
        font-size: 30px;
    }

    .form-options {
        align-items: flex-start;

        flex-direction: column;

        gap: 10px;
    }
}


/* =========================================================
   REDUCED MOTION ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .brand-panel,
    .brand-panel::before,
    .brand-content,
    .mureh-logo,
    .login-side .form-wrapper,
    .register-side .form-wrapper {
        transition-duration: 0.01ms !important;
    }

    .brand-energy {
        animation: none;
    }
}