:root {
    --font-sans: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --panel-bg: rgba(15, 23, 42, 0.82);
    --panel-border: rgba(201, 169, 110, 0.24);
    --card-bg: rgba(15, 23, 42, 0.72);
    --card-border: rgba(201, 169, 110, 0.3);
    --text-color: #ffffff;
    --muted-text: rgba(255, 255, 255, 0.7);
    --accent: #c9a96e;
    --accent-strong: #a88548;
    --input-bg: rgba(255, 255, 255, 0.04);
    --input-border: rgba(201, 169, 110, 0.18);
    --panel-shadow: rgba(0, 0, 0, 0.45);
    --text-sm: clamp(0.82rem, 0.78rem + 0.18vw, 0.95rem);
    --text-base: clamp(0.95rem, 0.9rem + 0.3vw, 1.08rem);
    --text-md: clamp(1rem, 0.94rem + 0.45vw, 1.2rem);
    --text-lg: clamp(1.15rem, 1rem + 0.9vw, 1.55rem);
    --text-xl: clamp(1.8rem, 1.35rem + 2vw, 3rem);
    --field-height: clamp(3.6rem, 3.25rem + 0.9vw, 4.2rem);
    --button-height: clamp(3.4rem, 3.1rem + 0.8vw, 4rem);
}

body {
    padding: 0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    color: var(--text-color);
    overflow-x: hidden;
    background: #020617;
    /* Error variant: red background for error toasts */
    .login-toast--error {
        background: linear-gradient(
            180deg,
            rgba(127, 29, 29, 0.96),
            rgba(69, 10, 10, 0.92)
        );
        border: 1px solid rgba(255, 99, 99, 0.12);
        box-shadow: 0 18px 46px rgba(127, 29, 29, 0.28);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.background {
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.72)),
        url("../images/bg.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: -1;
    transform: scale(1.06);
    filter: blur(1px);
}

.background::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at top left,
            rgba(201, 169, 110, 0.18),
            transparent 32%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(15, 23, 42, 0.24),
            transparent 30%
        );
}

.shell {
    opacity: 1;
    transform: translateY(0) scale(1);
}

body.login-splash-mode .shell {
    opacity: 0;
    transform: translateY(16px) scale(0.992);
    pointer-events: none;
}

.login-splash {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-splash__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at top left,
            rgba(201, 169, 110, 0.18),
            transparent 24%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(201, 169, 110, 0.12),
            transparent 26%
        ),
        linear-gradient(
            160deg,
            rgba(2, 6, 23, 0.98),
            rgba(10, 17, 35, 0.96) 48%,
            rgba(15, 23, 42, 0.92)
        );
}

.login-splash__backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            115deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 28%,
            transparent 56%
        ),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42%);
    opacity: 0.95;
}

.login-splash__orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(16px);
    opacity: 0.7;
    pointer-events: none;
}

.login-splash__orb--one {
    top: 12%;
    left: 10%;
    width: 240px;
    height: 240px;
    background: radial-gradient(
        circle,
        rgba(201, 169, 110, 0.34),
        transparent 70%
    );
    animation: splashOrbFloatOne 7s ease-in-out infinite;
}

.login-splash__orb--two {
    right: 8%;
    bottom: 14%;
    width: 320px;
    height: 320px;
    background: radial-gradient(
        circle,
        rgba(130, 98, 45, 0.28),
        transparent 68%
    );
    animation: splashOrbFloatTwo 8s ease-in-out infinite;
}

.login-splash__content {
    position: relative;
    z-index: 1;
    width: min(760px, calc(100% - 40px));
    padding: 20px 20px 72px;
}

.login-splash__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    text-align: center;
    min-height: min(78vh, 720px);
}

.login-splash__logo-system {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(220px, 26vw, 360px);
    aspect-ratio: 1;
    animation: splashLogoSystemIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-splash__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(201, 169, 110, 0.22);
    pointer-events: none;
}

.login-splash__ring--outer {
    inset: -12%;
    border-width: 1px;
    opacity: 0.5;
    animation: splashRingRotate 16s linear infinite;
}

.login-splash__ring--middle {
    inset: -4%;
    border-style: dashed;
    border-width: 1.5px;
    opacity: 0.72;
    animation: splashRingRotateReverse 12s linear infinite;
}

.login-splash__ring--inner {
    inset: 8%;
    border-width: 1px;
    opacity: 0.65;
    animation: splashRingPulse 3.6s ease-in-out infinite;
}

.login-splash__ring--outer::before,
.login-splash__ring--middle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(235, 209, 162, 0.95),
        rgba(201, 169, 110, 0.2)
    );
    box-shadow: 0 0 18px rgba(201, 169, 110, 0.38);
    transform: translate(-50%, -50%);
}

.login-splash__ring--outer::before {
    margin-top: calc(-1 * clamp(118px, 14vw, 164px));
}

.login-splash__ring--middle::before {
    margin-left: clamp(104px, 12vw, 146px);
}

.login-splash__logo-glow {
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(201, 169, 110, 0.22),
        rgba(201, 169, 110, 0.05) 46%,
        transparent 70%
    );
    filter: blur(20px);
    opacity: 0.95;
    animation: splashGlowPulse 4.5s ease-in-out infinite;
}

.login-splash__logo {
    position: relative;
    z-index: 1;
    width: clamp(132px, 16vw, 210px);
    height: auto;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.3));
    animation: splashLogoFloat 6.4s ease-in-out 1s infinite;
}

.login-splash__copy {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.login-splash__eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: rgba(201, 169, 110, 0.9);
    font-size: clamp(0.72rem, 0.66rem + 0.28vw, 0.9rem);
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0;
    animation: splashTextRise 0.65s ease 0.18s forwards;
}

.login-splash__title {
    margin: 0;
    font-family: var(--font-sans);
    font-size: clamp(1.75rem, 1.38rem + 1.55vw, 2.85rem);
    line-height: 1.02;
    letter-spacing: 0.02em;
    color: #f8f3e8;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
    opacity: 0;
    animation: splashTitleReveal 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.28s
        forwards;
}

.login-splash__subtitle {
    max-width: 340px;
    margin: 14px 0 0;
    color: rgba(248, 250, 252, 0.72);
    font-size: clamp(0.9rem, 0.84rem + 0.18vw, 1rem);
    line-height: 1.65;
    opacity: 0;
    animation: splashTextRise 0.75s ease 0.52s forwards;
}

body.splash-complete .login-splash {
    display: none;
}

.login-splash__footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    height: 88px;
    overflow: hidden;
    pointer-events: none;
}

.login-splash__footer::before {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(201, 169, 110, 0.36),
        transparent
    );
    opacity: 0.75;
}

.login-splash__shimmer {
    position: absolute;
    left: -28%;
    right: -28%;
    bottom: 10px;
    height: 52px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 169, 110, 0.06) 18%,
        rgba(248, 243, 232, 0.22) 50%,
        rgba(201, 169, 110, 0.06) 82%,
        transparent 100%
    );
    filter: blur(12px);
    transform: skewX(-18deg);
    animation: splashFooterShimmer 4.8s ease-in-out infinite;
}

.shell {
    display: flex;
    width: min(1120px, calc(100% - 48px));
    min-height: min(660px, calc(100vh - 56px));
    margin: 24px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    box-shadow: 0 24px 70px var(--panel-shadow);
    border-radius: 32px;
    overflow: hidden;
}

.brand-panel,
.login-panel {
    flex: 1 1 50%;
    position: relative;
    min-width: 0;
}

.brand-panel {
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.45)),
        linear-gradient(135deg, rgba(201, 169, 110, 0.08), transparent 55%);
}

.brand-copy {
    max-width: 440px;
}

.brand-kicker {
    margin: 0 0 16px;
    color: var(--accent);
    font-size: var(--text-sm);
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.brand-title {
    margin-top: 8px;
    font-family: var(--font-sans);
    font-size: clamp(2rem, 1.4rem + 3vw, 4.25rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
}

.brand-description {
    margin: 22px 0 0;
    max-width: 400px;
    color: var(--muted-text);
    font-size: var(--text-base);
    line-height: 1.7;
}

.brand-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 28px;
    border-top: 1px solid rgba(201, 169, 110, 0.18);
}

.brand-stat {
    flex: 1 1 100px;
}

.brand-stat strong {
    display: block;
    color: var(--accent);
    font-size: var(--text-lg);
    font-weight: 600;
}

.brand-stat span {
    display: block;
    margin: 6px 0 0;
    color: var(--muted-text);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.brand-logo {
    width: min(400px, 100%);
    max-width: 100%;
    height: auto;
    /* margin-bottom: 28px; */
    filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.28));
}

.brand-visual-card {
    display: none;
}

.desktop-login-logo {
    display: none;
}

.login-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 32px;
    background:
        radial-gradient(
            circle at top right,
            rgba(255, 255, 255, 0.12),
            transparent 34%
        ),
        linear-gradient(
            150deg,
            rgba(201, 169, 110, 0.12),
            rgba(255, 255, 255, 0.04) 34%,
            rgba(15, 23, 42, 0.78) 78%
        ),
        linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.8));
}

.login-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06),
        transparent 28%
    );
    pointer-events: none;
}

.login-card {
    width: min(100%, 390px);
    max-width: 100%;
    padding: 30px 28px 28px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

/* Make the login card scrollable when its content exceeds available viewport height */
.login-card {
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Reduce max-height on smaller screens to leave breathing room */
@media (max-width: 520px) {
    .login-card {
        max-height: calc(100vh - 100px);
        padding: 22px 18px;
    }
}

/* Thin custom scrollbar for desktop */
.login-card::-webkit-scrollbar {
    width: 10px;
}
.login-card::-webkit-scrollbar-track {
    background: transparent;
}
.login-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.login-card::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.12);
}

.login-kicker {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: var(--text-sm);
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.login-title {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--text-xl);
}

.login-text {
    margin: 10px 0 22px;
    color: var(--muted-text);
    font-size: var(--text-base);
    line-height: 1.7;
}

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    color: rgba(255, 248, 235, 0.82);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-item {
    display: flex;
    position: relative;
    width: 100%;
    min-height: var(--field-height);
    background: var(--input-bg);
    border-radius: 16px;
    align-items: center;
    border: 1px solid var(--input-border);
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}

.form-item:hover {
    border-color: rgba(201, 169, 110, 0.46);
    background: rgba(255, 255, 255, 0.08);
}

.form-item:focus-within {
    border-color: rgba(201, 169, 110, 0.7);
    background: rgba(255, 255, 255, 0.08);
}

input {
    background: transparent;
    width: 100%;
    min-width: 0;
    height: 24px;
    outline: none;
    border: none;
    margin: 0;
    padding: 18px 18px 18px 0;
    color: var(--text-color);
    font-size: var(--text-base);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-color);
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    box-shadow: 0 0 0 1000px transparent inset;
    transition: background-color 9999s ease-in-out 0s;
    caret-color: var(--text-color);
}

input::placeholder {
    color: rgba(255, 248, 235, 0.38);
}

.field-icon {
    user-select: none;
    margin: 0 14px 0 16px;
    color: var(--accent);
}

button[type="submit"] {
    width: 100%;
    min-height: var(--button-height);
    font-size: var(--text-md);
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 12px auto 0;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border: none;
    color: #0f172a;
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(201, 169, 110, 0.26);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(201, 169, 110, 0.34);
    filter: brightness(1.03);
}

.status-message,
.flash-message,
.validation-wrapper {
    margin-bottom: 18px;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(248, 113, 113, 0.32);
    background: linear-gradient(
        135deg,
        rgba(127, 29, 29, 0.35),
        rgba(69, 10, 10, 0.52)
    );
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.login-alert__icon {
    flex: 0 0 auto;
    color: #fda4af;
    font-size: 1.3rem;
    line-height: 1;
    margin-top: 2px;
}

.login-alert__content {
    min-width: 0;
}

.login-alert__content strong {
    display: block;
    margin-bottom: 4px;
    color: #ffe4e6;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.login-alert__content p {
    color: rgba(255, 228, 230, 0.88);
    font-size: 0.88rem;
    line-height: 1.5;
}

.status-message {
    color: #d1fae5;
}

.validation-errors-offset {
    margin-top: 3px;
}

.credit {
    position: absolute;
    right: 24px;
    bottom: 20px;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    letter-spacing: 0.04em;
    text-align: right;
    /* animation: creditFade 3.2s ease-in-out infinite; */
}

.credit strong {
    color: var(--accent);
    font-weight: 600;
}

@keyframes creditFade {
    0%,
    100% {
        opacity: 0.45;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

@keyframes splashLogoSystemIn {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes splashLogoFloat {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-6px) scale(1.01);
    }
}

@keyframes splashRingRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes splashRingRotateReverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@keyframes splashRingPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.62;
    }

    50% {
        transform: scale(1.03);
        opacity: 0.9;
    }
}

@keyframes splashGlowPulse {
    0%,
    100% {
        transform: scale(0.98);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.04);
        opacity: 1;
    }
}

@keyframes splashImageFrameIn {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Login toast styles (created dynamically by login.blade.php) */
#login-toast-container {
    position: fixed;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2147483647;
    pointer-events: none;
    width: min(680px, calc(100% - 44px));
    display: flex;
    justify-content: center;
}

.login-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 680px;
    background: linear-gradient(
        180deg,
        rgba(17, 24, 39, 0.96),
        rgba(9, 10, 14, 0.92)
    );
    color: var(--text-color);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transform: translateY(-8px) scale(0.995);
    opacity: 0;
    transition:
        transform 250ms cubic-bezier(0.2, 0.9, 0.3, 1),
        opacity 240ms ease;
}

.login-toast--show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.login-toast__icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(220, 38, 38, 0.14);
    color: #fecaca;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.login-toast__body {
    min-width: 0;
    flex: 1 1 auto;
}

.login-toast__title {
    font-weight: 700;
    font-size: 0.98rem;
    margin-bottom: 2px;
}

.login-toast__message {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    line-height: 1.25;
}

.login-toast__close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    flex: 0 0 auto;
}

.login-toast__close:hover {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.95);
}

@keyframes splashTextRise {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes splashTitleReveal {
    0% {
        opacity: 0;
        transform: translateY(18px);
        filter: blur(6px);
        letter-spacing: 0.09em;
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
        letter-spacing: 0.02em;
    }
}

@keyframes splashOrbFloatOne {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(18px, -18px, 0);
    }
}

@keyframes splashOrbFloatTwo {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(-22px, 16px, 0);
    }
}

@keyframes splashFooterShimmer {
    0%,
    100% {
        transform: translateX(-12%) skewX(-18deg);
        opacity: 0.35;
    }

    50% {
        transform: translateX(12%) skewX(-18deg);
        opacity: 0.95;
    }
}

p:first-of-type {
    margin: 12px;
}

.options {
    display: flex;
    margin: 10px auto;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    font-size: 18px;
    padding: 5px 16px;
    margin: 5px 15px;
    width: 180px;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.7s ease;
}

.fb:hover {
    background: rgba(55, 53, 207, 0.637);
    border: none;
}

.gl:hover {
    background: rgba(207, 53, 53, 0.671);
    border: none;
}

p {
    font-size: var(--text-base);
    margin: 5px;
}

a {
    color: var(--accent);
}

a:hover {
    color: #f6e7c8;
}

@media screen and (max-width: 550px) {
    .login-splash__content {
        width: min(100%, calc(100% - 20px));
        padding: 8px;
    }

    .login-splash__brand {
        gap: 20px;
        min-height: min(72vh, 560px);
    }

    .login-splash__logo-system {
        width: min(68vw, 248px);
    }

    .login-splash__eyebrow {
        margin-bottom: 10px;
        letter-spacing: 0.2em;
    }

    .login-splash__title {
        font-size: clamp(1.55rem, 1.3rem + 1.2vw, 2rem);
        line-height: 1.08;
    }

    .login-splash__subtitle {
        max-width: 290px;
        margin: 12px auto 0;
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .login-splash__footer {
        height: 72px;
    }

    .shell {
        width: calc(100% - 24px);
        min-height: auto;
        margin: 12px;
        border-radius: 24px;
    }
}

@media screen and (min-width: 1024px) {
    body {
        overflow: hidden;
    }

    .login-splash__content {
        width: min(900px, calc(100% - 56px));
    }

    .login-splash__brand {
        min-height: min(76vh, 700px);
    }

    .login-splash__title {
        font-size: clamp(2rem, 1.45rem + 1.6vw, 3rem);
    }

    .login-splash__subtitle {
        max-width: 320px;
    }

    .shell {
        width: min(1120px, calc(100vw - 32px));
        min-height: 0;
        height: min(660px, calc(100vh - 32px));
        margin: 16px;
    }

    .brand-panel {
        padding: clamp(32px, 3vw, 44px) clamp(28px, 3vw, 40px);
        justify-content: center;
        align-items: center;
    }

    .brand-copy {
        width: 100%;
        max-width: none;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .brand-logo-main {
        display: none;
    }

    .brand-visual-card {
        position: relative;
        display: block;
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 18px;
        border-radius: 30px;
        background:
            linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.08),
                rgba(255, 255, 255, 0.02)
            ),
            rgba(8, 15, 31, 0.72);
        border: 1px solid rgba(201, 169, 110, 0.24);
        box-shadow:
            0 0 0 1px rgba(201, 169, 110, 0.08),
            0 0 30px rgba(201, 169, 110, 0.18),
            0 0 65px rgba(201, 169, 110, 0.12),
            0 22px 55px rgba(0, 0, 0, 0.34),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
        overflow: hidden;
    }

    .brand-visual-card::before {
        content: "";
        position: absolute;
        inset: 12px;
        border-radius: 22px;
        border: 1px solid rgba(201, 169, 110, 0.18);
        pointer-events: none;
    }

    .brand-visual-card::after {
        content: "";
        position: absolute;
        width: 180px;
        height: 180px;
        top: -60px;
        right: -40px;
        background: radial-gradient(
            circle,
            rgba(201, 169, 110, 0.24),
            transparent 68%
        );
        pointer-events: none;
    }

    .brand-visual-card .brand-visual-glow {
        position: absolute;
        inset: auto;
        left: 50%;
        bottom: -80px;
        width: 78%;
        height: 140px;
        transform: translateX(-50%);
        background: radial-gradient(
            circle,
            rgba(201, 169, 110, 0.34),
            rgba(201, 169, 110, 0.08) 45%,
            transparent 75%
        );
        filter: blur(22px);
        opacity: 0.95;
        pointer-events: none;
    }

    .brand-visual-image {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: 20px;
        box-shadow: 0 18px 35px rgba(0, 0, 0, 0.28);
        transform: scale(1.01);
        transition:
            transform 0.25s ease,
            filter 0.25s ease;
    }

    .brand-visual-card:hover .brand-visual-image {
        transform: scale(1.035);
        filter: saturate(1.05);
    }

    .login-panel {
        justify-content: flex-start;
        /* gap: 18px; */
        padding: 28px 32px 24px;
    }

    .login-card {
        margin-bottom: 0.4rem;
        width: min(100%, 420px);
        padding: 30px 28px 28px;
        border-radius: 30px;
        background:
            linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.07),
                rgba(255, 255, 255, 0.02)
            ),
            rgba(12, 19, 37, 0.82);
        border: 1px solid rgba(201, 169, 110, 0.28);
        box-shadow:
            0 18px 45px rgba(0, 0, 0, 0.32),
            0 0 0 1px rgba(201, 169, 110, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .desktop-login-logo {
        display: block;
        width: min(280px, 72%);
        max-width: 280px;
        height: auto;
        margin: 0 auto;
        padding: 10px 18px;
        /* border-radius: 24px;
                background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
                border: 1px solid rgba(201, 169, 110, 0.2);
                box-shadow:
                    0 16px 32px rgba(0, 0, 0, 0.26),
                    0 0 30px rgba(201, 169, 110, 0.14),
                    inset 0 1px 0 rgba(255, 255, 255, 0.08); */
        filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.34));
    }

    .login-title {
        text-align: center;
        font-size: clamp(1.9rem, 1.4rem + 1vw, 2.5rem);
        letter-spacing: 0.02em;
        font-size: 1.7rem;
    }

    .validation-wrapper,
    .flash-message,
    .status-message,
    .login-alert {
        width: 100%;
    }

    form {
        gap: 15px;
    }

    .status-message,
    .flash-message,
    .validation-wrapper,
    .login-alert {
        margin-bottom: 14px;
    }

    .credit {
        right: 0px;
        bottom: 0px;
        width: 100%;
        text-align: center;
    }
}

@media screen and (min-width: 901px) and (max-width: 1279px) {
    .login-splash__content {
        width: min(720px, calc(100% - 44px));
        padding: 16px;
    }

    .login-splash__brand {
        min-height: min(74vh, 640px);
    }

    .login-splash__title {
        font-size: clamp(1.85rem, 1.4rem + 1.5vw, 2.55rem);
    }

    .login-splash__subtitle {
        max-width: 300px;
    }
}

@media screen and (min-width: 1024px) and (max-height: 820px) {
    .shell {
        height: calc(100vh - 24px);
        margin: 12px;
    }

    .brand-panel {
        padding: 26px 26px 22px;
    }

    .brand-visual-card {
        width: 100%;
        padding: 14px;
    }

    .login-panel {
        /* gap: 14px; */
        padding: 20px 24px;
    }

    .desktop-login-logo {
        width: min(230px, 64%);
    }

    .login-card {
        width: min(100%, 390px);
        padding: 24px 24px 22px;
    }
}

@media screen and (max-width: 1023px) {
    .form-item {
        min-height: 3.5rem;
    }

    button[type="submit"] {
        min-height: 3.35rem;
    }
}

@media screen and (max-width: 900px) {
    .login-splash__brand {
        min-height: min(72vh, 620px);
        gap: 22px;
    }

    .login-splash__copy {
        max-width: 100%;
    }

    .login-splash__subtitle {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .login-splash__logo-system {
        width: min(54vw, 280px);
    }

    .shell {
        flex-direction: column;
        min-height: auto;
    }

    .brand-panel,
    .login-panel {
        width: 100%;
    }

    .brand-panel {
        padding: 36px 24px 28px;
        align-items: center;
    }

    .login-panel {
        padding: 24px 24px 24px;
    }

    .brand-copy {
        width: 100%;
        text-align: center;
    }

    .brand-description {
        margin-left: auto;
        margin-right: auto;
    }

    .login-card {
        width: 100%;
    }

    .brand-logo {
        width: min(320px, 100%);
        display: block;
        margin: 0 auto 0;
    }

    .brand-footer {
        gap: 18px;
    }

    .credit {
        position: static;
        margin-top: 18px;
        text-align: center;
        width: 100%;
    }
}

/* Slightly scale down key login elements around 1024px and ensure credit is visible */
@media screen and (max-width: 1024px) and (min-width: 901px) {
    .desktop-login-logo,
    .login-splash__logo {
        width: 85%;
        max-width: 220px;
    }

    .login-card {
        position: relative;
        width: min(100%, 360px);
        padding: 22px 20px 20px;
        border-radius: 24px;
        bottom: 30px;
    }

    .form-item {
        min-height: 3.25rem;
    }

    button[type="submit"] {
        min-height: 3.1rem;
        font-size: 0.98rem;
        padding: 12px 16px;
    }

    /* Place credit centered at bottom of the login panel */
    .login-panel {
        position: relative;
        padding-bottom: 48px; /* room for credit */
    }

    .credit {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0px;
        width: 100%;
        text-align: center;
        color: rgba(255, 255, 255, 0.75);
        font-size: var(--text-sm);
    }
}

@media screen and (min-width: 1023px) {
    .shell {
        height: calc(100vh - 24px);
        margin: 12px;
    }

    .brand-panel {
    }

    p:first-of-type {
        margin: 0;
    }

    .brand-title {
    }
}

@media screen and (min-height: 639px) and (max-height: 932px) and (max-width: 900px) {
    .brand-panel {
        justify-content: center;
        padding-bottom: 12px;
    }

    .brand-copy {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .brand-kicker,
    .brand-title,
    .brand-description,
    .brand-footer {
        display: none;
    }

    .brand-logo {
        margin: 0 auto;
    }

    .login-panel {
        padding-top: 12px;
    }
}

@media screen and (max-width: 550px) {
    body {
        display: block;
    }

    .brand-panel {
        padding: 28px 18px 20px;
    }

    .login-panel {
        padding: 16px 16px 0;
    }

    .login-card {
        width: 100%;
        padding: 28px 20px 24px;
        border-radius: 22px;
    }

    .brand-title {
        line-height: 1.08;
    }

    .brand-footer {
        flex-direction: column;
    }

    input {
        font-size: var(--text-base);
    }

    .form-item {
        min-height: 3.35rem;
    }

    button[type="submit"] {
        min-height: 3.2rem;
    }

    .credit {
        margin-top: 14px;
    }
}

@media screen and (max-width: 380px) {
    .login-splash__title {
        font-size: 1.4rem;
    }

    .login-splash__logo-system {
        width: 220px;
    }

    .login-splash__eyebrow {
        font-size: 0.68rem;
    }

    .login-splash__subtitle {
        font-size: 0.84rem;
        line-height: 1.5;
    }

    .shell {
        width: calc(100% - 16px);
        margin: 8px;
        border-radius: 20px;
    }

    .brand-panel {
        padding: 24px 16px 18px;
    }

    .login-panel {
        padding: 12px 12px 12px;
    }

    .login-card {
        padding: 24px 16px 20px;
    }

    .form-item {
        min-height: 3.15rem;
    }

    button[type="submit"] {
        min-height: 3.05rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
