
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Brand palette */
    --primary: #660033;
    --primary-dark: #430022;
    --primary-deep: #2f0018;
    --primary-light: #8a174f;
    --primary-soft: #f8edf3;

    --gold: #d4af37;
    --gold-dark: #b38f20;
    --gold-deep: #8d6d10;
    --gold-light: #f0d978;
    --gold-soft: #fbf5df;

    /* Text */
    --ink: #1b1016;
    --ink-2: #33212a;
    --ink-3: #5d4652;
    --muted: #806f78;
    --soft: #a4959d;

    /* Surfaces */
    --white: #ffffff;
    --surface: #ffffff;
    --surface-soft: #fcf8fa;
    --background: #f6f1f4;

    /* Borders */
    --border: #eadde4;
    --border-dark: #d9c4cf;

    /* Feedback */
    --danger: #b42318;
    --danger-bg: #fff1f0;
    --danger-border: #f4c7c3;

    --success: #047857;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;

    /* Layout */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 4px 14px rgba(67, 0, 34, 0.07);
    --shadow-md: 0 14px 36px rgba(67, 0, 34, 0.12);
    --shadow-lg: 0 28px 70px rgba(67, 0, 34, 0.2);

    /* Motion */
    --transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr);
    font-family: "Outfit", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    color: var(--white);
    background: var(--primary-dark);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    color: var(--primary-dark);
    background: var(--gold-light);
}

/* ============================================================
   2. LEFT BRAND PANEL
============================================================ */

.left-panel {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(36px, 5vw, 64px);
    background:
        linear-gradient(
            145deg,
            var(--primary-deep) 0%,
            var(--primary-dark) 48%,
            var(--primary) 100%
        );
    overflow: hidden;
}

/* Burgundy and gold glow */
.left-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(
            ellipse 70% 55% at 12% 88%,
            rgba(212, 175, 55, 0.2),
            transparent 68%
        ),
        radial-gradient(
            ellipse 50% 65% at 88% 12%,
            rgba(212, 175, 55, 0.11),
            transparent 62%
        ),
        radial-gradient(
            circle at 52% 42%,
            rgba(138, 23, 79, 0.28),
            transparent 55%
        );
    pointer-events: none;
}

/* Subtle grid pattern */
.left-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(
            rgba(212, 175, 55, 0.045) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(212, 175, 55, 0.045) 1px,
            transparent 1px
        );
    background-size: 48px 48px;
    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.95),
        rgba(0, 0, 0, 0.35)
    );
    pointer-events: none;
}

.lp-top,
.lp-bottom {
    position: relative;
    z-index: 2;
}

/* ============================================================
   3. BRAND / LOGO
============================================================ */

.lp-wordmark {
    display: flex;
    align-items: center;
    margin-bottom: clamp(48px, 8vh, 82px);
}

.lp-logo {
    display: block;
    width: min(270px, 82%);
    max-height: 96px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.18));
}

.lp-logo-fallback {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--white);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.lp-logo-fallback i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    border: 1.5px solid rgba(212, 175, 55, 0.75);
    border-radius: 12px;
    box-shadow:
        0 0 0 4px rgba(212, 175, 55, 0.05),
        0 10px 25px rgba(0, 0, 0, 0.16);
}

/* ============================================================
   4. LEFT PANEL CONTENT
============================================================ */

.lp-headline {
    max-width: 620px;
    margin-bottom: 24px;
    font-family: "Instrument Serif", Georgia, serif;
    font-size: clamp(34px, 4vw, 58px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--white);
    text-wrap: balance;
}

.lp-headline em {
    font-style: italic;
    color: var(--gold);
    text-shadow: 0 6px 24px rgba(212, 175, 55, 0.18);
}

.lp-sub {
    max-width: 470px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.67);
}

/* ============================================================
   5. LEFT PANEL STATISTICS
============================================================ */

.lp-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding-top: 30px;
    margin-top: 44px;
    border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.lp-stat {
    position: relative;
    min-width: 0;
}

.lp-stat:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 4px;
    right: -12px;
    width: 1px;
    height: 42px;
    background: rgba(255, 255, 255, 0.08);
}

.lp-stat-num {
    color: var(--gold);
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.lp-stat-lbl {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ============================================================
   6. RIGHT LOGIN PANEL
============================================================ */

.right-panel {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(32px, 6vw, 72px);
    color: var(--ink);
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(212, 175, 55, 0.09),
            transparent 32%
        ),
        radial-gradient(
            circle at 0% 100%,
            rgba(102, 0, 51, 0.06),
            transparent 34%
        ),
        var(--white);
}

.right-panel::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 180px;
    height: 180px;
    background:
        linear-gradient(
            135deg,
            transparent 49.5%,
            rgba(212, 175, 55, 0.14) 50%
        );
    pointer-events: none;
}

.login-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;
    animation: loginFadeIn 0.55s ease both;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   7. LOGIN HEADER
============================================================ */

.login-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    margin-bottom: 24px;
    color: var(--primary);
    background: var(--gold-soft);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.login-tag i {
    color: var(--gold-dark);
    font-size: 9px;
}

.login-title {
    margin-bottom: 9px;
    color: var(--primary-dark);
    font-size: clamp(28px, 4vw, 34px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.login-subtitle {
    margin-bottom: 32px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

/* ============================================================
   8. FORM ELEMENTS
============================================================ */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 7px;
    color: var(--ink-3);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 12px 15px;
    color: var(--ink);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    font-family: "Outfit", system-ui, sans-serif;
    font-size: 14.5px;
    transition: var(--transition);
}

.form-control::placeholder {
    color: var(--soft);
}

.form-control:hover {
    border-color: var(--border-dark);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px rgba(102, 0, 51, 0.1),
        var(--shadow-sm);
}

.form-control:disabled {
    cursor: not-allowed;
    color: var(--muted);
    background: var(--surface-soft);
    opacity: 0.8;
}

.form-control[aria-invalid="true"],
.form-control.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.09);
}

/* ============================================================
   9. PASSWORD FIELD
============================================================ */

.password-wrap {
    position: relative;
}

.password-wrap .form-control {
    padding-right: 50px;
}

.pw-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: var(--transition);
}

.pw-toggle:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.pw-toggle:focus-visible {
    color: var(--primary);
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ============================================================
   10. REMEMBER ME / FORGOT PASSWORD
============================================================ */

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 28px;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-3);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.forgot-link:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ============================================================
   11. LOGIN BUTTON
============================================================ */

.btn-login {
    position: relative;
    width: 100%;
    min-height: 50px;
    padding: 14px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    overflow: hidden;
    color: var(--white);
    background:
        linear-gradient(
            135deg,
            var(--primary) 0%,
            var(--primary-dark) 100%
        );
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    box-shadow:
        0 12px 26px rgba(102, 0, 51, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-family: "Outfit", system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.065em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.btn-login::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            120deg,
            transparent 25%,
            rgba(212, 175, 55, 0.2) 50%,
            transparent 75%
        );
    transform: translateX(-120%);
    transition: transform 0.55s ease;
}

.btn-login > * {
    position: relative;
    z-index: 1;
}

.btn-login:hover {
    background:
        linear-gradient(
            135deg,
            var(--primary-light) 0%,
            var(--primary) 100%
        );
    border-color: var(--gold-dark);
    box-shadow:
        0 16px 32px rgba(102, 0, 51, 0.28),
        0 0 0 1px rgba(212, 175, 55, 0.35);
    transform: translateY(-2px);
}

.btn-login:hover::before {
    transform: translateX(120%);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(102, 0, 51, 0.2);
}

.btn-login:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.65);
    outline-offset: 3px;
}

.btn-login:disabled {
    cursor: not-allowed;
    opacity: 0.68;
    transform: none;
    box-shadow: none;
}

.btn-login .spinner {
    display: none;
    color: var(--gold-light);
    animation: spin 0.65s linear infinite;
}

.btn-login.loading .spinner {
    display: inline-block;
}

.btn-login.loading .btn-text,
.btn-login.loading .btn-arrow {
    opacity: 0.55;
}

.btn-arrow {
    margin-left: 3px;
    color: var(--gold-light);
    font-size: 12px;
    transition: transform 0.2s ease;
}

.btn-login:hover .btn-arrow {
    transform: translateX(3px);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   12. ALERT MESSAGES
============================================================ */

.error-box,
.success-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    margin-bottom: 22px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.55;
    animation: alertSlideIn 0.3s ease both;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-box i,
.success-box i {
    flex: 0 0 auto;
    margin-top: 3px;
}

.error-box {
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
}

.success-box {
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
}

/* ============================================================
   13. DIVIDER
============================================================ */

.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background:
        linear-gradient(
            to right,
            transparent,
            var(--border-dark)
        );
}

.login-divider::after {
    background:
        linear-gradient(
            to left,
            transparent,
            var(--border-dark)
        );
}

/* ============================================================
   14. LOGIN HELP
============================================================ */

.login-help {
    margin-top: 28px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.login-help a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.login-help a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.login-help a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ============================================================
   15. ACCESSIBILITY
============================================================ */

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    scroll-margin-top: 20px;
}

@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;
    }
}

/* ============================================================
   16. TABLET
============================================================ */

@media (max-width: 1080px) {
    body {
        grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
    }

    .left-panel {
        padding: 42px;
    }

    .lp-stats {
        gap: 18px;
    }

    .right-panel {
        padding: 42px 34px;
    }
}

/* ============================================================
   17. MOBILE
============================================================ */

@media (max-width: 860px) {
    body {
        display: block;
        min-height: 100vh;
        background:
            radial-gradient(
                circle at 100% 0%,
                rgba(212, 175, 55, 0.15),
                transparent 35%
            ),
            linear-gradient(
                145deg,
                var(--primary-deep),
                var(--primary-dark) 55%,
                var(--primary)
            );
    }

    .left-panel {
        display: none;
    }

    .right-panel {
        min-height: 100vh;
        padding: 28px 20px;
        background: transparent;
    }

    .right-panel::before {
        display: none;
    }

    .login-box {
        max-width: 470px;
        padding: 36px 30px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(212, 175, 55, 0.3);
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-lg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .login-tag {
        margin-bottom: 20px;
    }

    .login-subtitle {
        margin-bottom: 28px;
    }
}

/* ============================================================
   18. SMALL MOBILE
============================================================ */

@media (max-width: 520px) {
    .right-panel {
        align-items: flex-start;
        padding: 18px 14px;
    }

    .login-box {
        margin: auto 0;
        padding: 30px 22px;
        border-radius: 20px;
    }

    .login-title {
        font-size: 27px;
    }

    .login-subtitle {
        font-size: 13.5px;
    }

    .form-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .btn-login {
        min-height: 52px;
    }
}

/* ============================================================
   19. VERY SMALL MOBILE
============================================================ */

@media (max-width: 360px) {
    .right-panel {
        padding: 12px;
    }

    .login-box {
        padding: 26px 18px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-tag {
        font-size: 9.5px;
    }
}