:root {
    --ml-bg-deep: #07060b;
    --ml-bg-mid: #12101c;
    --ml-gold: #c9a962;
    --ml-gold-bright: #e8d5a3;
    --ml-gold-dim: rgba(201, 169, 98, 0.35);
    --ml-glass: rgba(255, 255, 255, 0.04);
    --ml-border: rgba(255, 255, 255, 0.08);
    --ml-text: #f4f2ef;
    --ml-muted: rgba(244, 242, 239, 0.55);
}

html {
    height: 100%;
}

.auth-shell {
    margin: 0;
    min-height: 100%;
    height: 100%;
    font-family: "DM Sans", system-ui, sans-serif;
    background: var(--ml-bg-deep);
    color: var(--ml-text);
    overflow: hidden;
}

.login-root {
    position: relative;
    height: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    display: flex;
    align-items: stretch;
    isolation: isolate;
    overflow: hidden;
}

/* Ambient gradient */
.login-root::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 120% 80% at 10% 20%, rgba(201, 169, 98, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 100% 60% at 90% 80%, rgba(80, 60, 120, 0.15) 0%, transparent 45%),
        linear-gradient(165deg, var(--ml-bg-deep) 0%, var(--ml-bg-mid) 45%, #0a0812 100%);
    z-index: 0;
    pointer-events: none;
}

.login-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    z-index: 0;
    pointer-events: none;
}

.login-orb--1 {
    width: min(45vw, 420px);
    height: min(45vw, 420px);
    background: radial-gradient(circle, rgba(201, 169, 98, 0.35) 0%, transparent 70%);
    top: max(-5%, -40px);
    left: max(-8%, -48px);
}

.login-orb--2 {
    width: min(50vw, 480px);
    height: min(50vw, 480px);
    background: radial-gradient(circle, rgba(100, 80, 160, 0.25) 0%, transparent 70%);
    bottom: max(-8%, -48px);
    right: max(-5%, -40px);
}

/* Left: brand + logo showcase */
.login-hero {
    position: relative;
    z-index: 1;
    flex: 1.15;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    min-height: 0;
    overflow: hidden;
}

.login-hero-glow {
    position: absolute;
    width: min(90vw, 520px);
    height: min(90vw, 520px);
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle closest-side,
        rgba(201, 169, 98, 0.18) 0%,
        rgba(201, 169, 98, 0.05) 45%,
        transparent 70%
    );
    pointer-events: none;
}

.login-hero-ring {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    border: 1px solid rgba(201, 169, 98, 0.12);
}

.login-hero-ring--outer {
    width: min(72vw, 380px);
    height: min(72vw, 380px);
    opacity: 0.6;
}

.login-hero-ring--inner {
    width: min(58vw, 300px);
    height: min(58vw, 300px);
    border-color: rgba(255, 255, 255, 0.06);
    opacity: 0.9;
}

.login-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 480px;
}

.login-hero-logo-wrap {
    position: relative;
    width: 100%;
    max-width: min(92vw, 440px);
    margin-bottom: 0.5rem;
}

.login-hero-logo {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
    filter:
        drop-shadow(0 0 40px rgba(201, 169, 98, 0.25))
        drop-shadow(0 12px 48px rgba(0, 0, 0, 0.55));
}

.login-hero-logo-shine {
    position: absolute;
    inset: -8% -12%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        115deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.07) 48%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.07) 52%,
        transparent 58%,
        transparent 100%
    );
    mix-blend-mode: overlay;
    border-radius: 4px;
}

.login-hero-reflection {
    width: 100%;
    max-width: min(92vw, 440px);
    margin: -0.25rem auto 1rem;
    line-height: 0;
    opacity: 0.22;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, transparent 78%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, transparent 78%);
}

.login-hero-reflection img {
    width: 100%;
    height: auto;
    transform: scaleY(-1);
    filter: blur(0.3px);
}

.login-hero-tagline {
    margin: 0 0 0.65rem;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    font-weight: 600;
    color: var(--ml-text);
    letter-spacing: 0.02em;
}

.login-hero-note {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ml-muted);
    max-width: 22rem;
}

/* Right: form column */
.login-form-column {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: clamp(1.5rem, 4vw, 3rem);
    min-width: 0;
    max-width: 640px;
}

.login-panel-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    min-height: 0;
}

.login-panel-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ml-gold-bright);
}

.login-panel {
    width: 100%;
    max-width: 560px;
    position: relative;
    padding: 2px;
    border-radius: 1.35rem;
    background: linear-gradient(
        135deg,
        rgba(201, 169, 98, 0.45) 0%,
        rgba(255, 255, 255, 0.08) 40%,
        rgba(201, 169, 98, 0.2) 100%
    );
    background-size: 200% 200%;
    animation: border-shine 8s ease infinite;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 24px 80px -20px rgba(0, 0, 0, 0.65);
}

@keyframes border-shine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-panel-inner {
    border-radius: calc(1.35rem - 2px);
    background: linear-gradient(160deg, rgba(22, 20, 32, 0.92) 0%, rgba(12, 10, 18, 0.95) 100%);
    backdrop-filter: blur(20px);
    padding: 2.5rem 2.75rem 2.6rem;
    border: 1px solid var(--ml-border);
}

.login-panel-header {
    margin-bottom: 1.85rem;
}

.login-panel-header h2 {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.65rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.login-panel-header p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ml-muted);
}

.login-field {
    margin-bottom: 1.35rem;
}

.login-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ml-muted);
    margin-bottom: 0.5rem;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.2s, color 0.2s;
}

.login-input-wrap input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.95rem 1rem 0.95rem 2.85rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--ml-text);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--ml-border);
    border-radius: 0.65rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-input-wrap input::placeholder {
    color: rgba(244, 242, 239, 0.28);
}

.login-input-wrap input:hover {
    border-color: rgba(201, 169, 98, 0.25);
}

.login-input-wrap input:focus {
    border-color: var(--ml-gold-dim);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.12);
    background: rgba(0, 0, 0, 0.35);
}

.login-input-wrap:focus-within svg {
    opacity: 0.85;
    color: var(--ml-gold);
}

.login-input-wrap input.is-invalid {
    border-color: rgba(220, 80, 80, 0.6);
}

.invalid-feedback {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.8rem;
    color: #f0a8a8;
}

.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.6rem;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: var(--ml-muted);
}

.login-remember input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--ml-gold);
    cursor: pointer;
}

.login-submit {
    width: 100%;
    position: relative;
    padding: 1.05rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #0a0806;
    background: linear-gradient(135deg, var(--ml-gold-bright) 0%, var(--ml-gold) 50%, #a88b4a 100%);
    border: none;
    border-radius: 0.65rem;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 24px rgba(201, 169, 98, 0.35);
}

.login-submit::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.45) 45%,
        transparent 70%
    );
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(201, 169, 98, 0.45);
}

.login-submit:hover::after {
    transform: translateX(120%);
}

.login-submit:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 1.85rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--ml-border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--ml-muted);
}

.login-footer a {
    color: var(--ml-gold-bright);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

@media (min-width: 992px) {
    .login-form-column {
        align-items: flex-end;

        /* 🔥 NEW: shift login container slightly to the left */
        transform: translateX(-90px); /* tweak: -20px to -60px */
    }
}


@media (max-width: 991px) {
    .auth-shell {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .login-root {
        max-height: none;
        min-height: min(100dvh, 100%);
        height: auto;
    }

    .login-root {
        flex-direction: column;
    }

    .login-hero {
        flex: 0 0 auto;
        padding-bottom: 0.5rem;
    }

    .login-hero-glow,
    .login-hero-ring {
        top: 38%;
    }

    .login-hero-logo-wrap {
        max-width: min(88vw, 320px);
    }

    .login-hero-reflection {
        max-width: min(88vw, 320px);
        margin-bottom: 0.75rem;
    }

    .login-hero-tagline {
        font-size: 1rem;
    }

    .login-hero-note {
        font-size: 0.82rem;
    }

    .login-form-column {
        max-width: none;
        align-items: stretch;
        padding-top: 0.5rem;
    }

    .login-panel-wrap {
        justify-content: center;
        width: 100%;
    }

    .login-panel {
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }
}
