:root {
    --gold: #d4af37;
    --gold-dark: #b89016;
    --gold-soft: #fff8df;
    --black: #111111;
    --ink: #202124;
    --muted: #73767d;
    --line: #e8e8e8;
    --surface: #ffffff;
    --background: #f5f6f7;
    --danger: #cf3d3d;
    --radius-xl: 30px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --shadow: 0 28px 80px rgba(17, 17, 17, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Montserrat", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 13% 18%, rgba(212, 175, 55, 0.16), transparent 30%),
        radial-gradient(circle at 88% 82%, rgba(17, 17, 17, 0.08), transparent 28%),
        linear-gradient(135deg, #fafafa 0%, #f1f2f3 100%);
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(20px, 4vw, 54px);
}

.login-shell {
    width: min(1040px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
    background: var(--surface);
    border: 1px solid rgba(17, 17, 17, 0.06);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.brand-panel {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(38px, 5vw, 68px);
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 46%),
        linear-gradient(155deg, #191919 0%, #090909 100%);
    overflow: hidden;
}

.brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

.brand-panel::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.brand-glow {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(1px);
    pointer-events: none;
}

.brand-glow-one {
    width: 360px;
    height: 360px;
    top: -190px;
    right: -150px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.34), transparent 68%);
}

.brand-glow-two {
    width: 300px;
    height: 300px;
    bottom: -170px;
    left: -120px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.2), transparent 70%);
}

.brand-content {
    position: relative;
    z-index: 1;
}

.brand-mark {
    width: 104px;
    height: 104px;
    display: grid;
    place-items: center;
    margin-bottom: 58px;
    border: 1px solid rgba(212, 175, 55, 0.38);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.brand-mark img {
    width: 86px;
    height: 86px;
    object-fit: contain;
}

.brand-kicker,
.eyebrow {
    display: inline-block;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.brand-copy h1 {
    margin-top: 13px;
    font-size: clamp(2.15rem, 4vw, 3.45rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.brand-copy p {
    max-width: 430px;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.69);
    font-size: 0.98rem;
    line-height: 1.8;
}

.brand-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.brand-footer span:first-child {
    color: rgba(255, 255, 255, 0.7);
}

.brand-footer i {
    margin-right: 7px;
    color: var(--gold);
}

.form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(42px, 6vw, 78px);
    background: #ffffff;
}

.mobile-brand {
    display: none;
}

.form-heading {
    margin-bottom: 38px;
}

.form-heading h2 {
    margin-top: 10px;
    color: var(--black);
    font-size: clamp(2rem, 3vw, 2.55rem);
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.form-heading p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.field-group {
    margin-bottom: 22px;
}

.field-group label {
    display: block;
    margin: 0 0 9px 3px;
    color: #34363a;
    font-size: 0.78rem;
    font-weight: 700;
}

.field-control {
    position: relative;
    min-height: 58px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fbfbfb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field-control:focus-within {
    border-color: var(--gold);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.13);
}

.field-control.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(207, 61, 61, 0.08);
}

.field-icon {
    position: absolute;
    left: 19px;
    color: #9a9ca1;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.field-control:focus-within .field-icon {
    color: var(--gold-dark);
}

.field-control input {
    width: 100%;
    min-width: 0;
    height: 58px;
    padding: 0 54px 0 50px;
    color: var(--black);
    font-size: 0.94rem;
    font-weight: 500;
    border: 0;
    outline: 0;
    background: transparent;
}

.field-control input::placeholder {
    color: #a7a9ae;
    font-weight: 400;
}

.field-control input:-webkit-autofill,
.field-control input:-webkit-autofill:hover,
.field-control input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--black);
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    transition: background-color 9999s ease-out;
}

.password-toggle {
    position: absolute;
    right: 9px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #888b91;
    border: 0;
    border-radius: 11px;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--black);
    background: var(--gold-soft);
    outline: none;
}

.field-error {
    display: block;
    min-height: 18px;
    margin: 6px 0 0 3px;
    color: var(--danger);
    font-size: 0.7rem;
    font-weight: 600;
}

.login-button {
    position: relative;
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 5px;
    color: #111111;
    border: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #e0bd45, var(--gold));
    box-shadow: 0 14px 30px rgba(212, 175, 55, 0.28);
    font-size: 0.91rem;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.login-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    transition: left 0.55s ease;
}

.login-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(212, 175, 55, 0.36);
}

.login-button:not(:disabled):hover::before {
    left: 140%;
}

.login-button:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.35);
    outline-offset: 3px;
}

.login-button:disabled {
    color: #909297;
    background: #e8e8e8;
    box-shadow: none;
    cursor: not-allowed;
    filter: none;
}

.button-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(17, 17, 17, 0.25);
    border-top-color: #111111;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.login-button.is-loading .button-label,
.login-button.is-loading > i {
    display: none;
}

.login-button.is-loading .button-spinner {
    display: block;
}

.form-note {
    margin-top: 28px;
    color: #999ba0;
    font-size: 0.71rem;
    line-height: 1.6;
    text-align: center;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-clear-button,
input[type="password"]::-webkit-textfield-decoration-container {
    display: none !important;
    appearance: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 860px) {
    .login-page {
        align-items: start;
        padding: 18px;
    }

    .login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: auto 0;
        border-radius: 24px;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        min-height: min(680px, calc(100dvh - 36px));
        padding: 42px clamp(24px, 7vw, 52px);
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 13px;
        margin-bottom: 48px;
        color: var(--black);
        font-size: 0.98rem;
        font-weight: 800;
        letter-spacing: 0.02em;
    }

    .mobile-brand img {
        width: 58px;
        height: 58px;
        object-fit: contain;
    }
}

@media (max-width: 520px) {
    body {
        background: #ffffff;
    }

    .login-page {
        display: block;
        min-height: 100dvh;
        padding: 0;
    }

    .login-shell {
        min-height: 100dvh;
        width: 100%;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .form-panel {
        min-height: 100dvh;
        justify-content: flex-start;
        padding: max(28px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom));
    }

    .mobile-brand {
        margin-bottom: clamp(48px, 12vh, 86px);
    }

    .form-heading {
        margin-bottom: 32px;
    }

    .form-heading h2 {
        font-size: 2.15rem;
    }

    .field-control,
    .field-control input,
    .login-button {
        min-height: 56px;
    }

    .field-control input {
        height: 56px;
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
