@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@600;700&display=swap');

:root {
    --dark: #333333;
    --dark-soft: #4a4a4a;
    --cream: #f5f5f5;
    --cream-deep: #ebebeb;
    --white: #ffffff;
    --muted: #666666;
    --border: #e0e0e0;
    --danger: #B42318;
    --danger-bg: #FEE4E2;
    --shadow: rgba(0, 0, 0, 0.08);
    --accent: #F5B400;
    --accent-dark: #C98E00;
    --mono: 'JetBrains Mono', 'Courier New', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background-color: var(--cream);
    color: var(--dark);
    min-height: 100vh;
}



.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: var(--cream);
    position: relative;
    overflow: hidden;
}

.login-left-glow {
    position: absolute; top: -160px; right: -120px;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(245,180,0,0.16) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.login-page::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    top: -120px;
    right: -120px;
    pointer-events: none;
    z-index: 0;
}

.login-page::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    bottom: -90px;
    left: -90px;
    pointer-events: none;
    z-index: 0;
}

.login-left-hazard {
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 6px;
    background: repeating-linear-gradient(
        135deg,
        var(--accent) 0 14px,
        rgba(0,0,0,0.55) 14px 28px
    );
    z-index: 1;
}

/* Optional background photo support: when present, the photo covers the
   entire login page (both columns), with the card floating on top. */
.login-page.has-bg-photo {
    background-image:
        linear-gradient(180deg, rgba(26,26,26,0.55) 0%, rgba(26,26,26,0.78) 100%),
        var(--login-bg-photo);
    background-size: cover;
    background-position: center;
}

.login-page.has-bg-photo .login-left {
    background: transparent;
}

/* ================= LEFT SIDE ================= */

.login-left {
    padding: 60px;
    background: linear-gradient(180deg, #333333 0%, #1a1a1a 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.brand-box {
    position: relative;
    z-index: 1;
}

.brand-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.85);
    font-size: 11px; font-weight: 800;
    padding: 6px 16px; border-radius: 999px;
    margin-bottom: 22px;
    letter-spacing: 0.12em; text-transform: uppercase;
}

.brand-badge svg {
    width: 13px;
    height: 13px;
    color: var(--accent);
}

.brand-box h1 {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.brand-box p {
    max-width: 560px;
    font-size: 16px;
    line-height: 1.7;
    color: #d0d0d0;
}

/* ================= RIGHT SIDE ================= */

.login-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px;
    position: relative;
    z-index: 1;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 24px 60px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.login-header {
    margin-bottom: 26px;
    text-align: center;
}

.login-header h2 {
    font-size: 30px;
    font-weight: 900;
    color: var(--dark);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.login-header p {
    color: var(--muted);
    font-size: 15px;
}

/* ================= FORM ================= */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 800;
}

.input-wrapper {
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
    transition: 0.22s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.input-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.6);
}

.input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--dark);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

.input-wrapper svg {
    width: 18px;
    height: 18px;
    color: var(--muted);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.input-wrapper:focus-within svg {
    color: var(--dark);
}

.input-wrapper input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--dark);
    font-size: 14px;
    font-weight: 600;
}

.input-wrapper input::placeholder {
    color: #999999;
}

/* ================= PASSWORD TOGGLE & LINKS ================= */

.pw-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: var(--muted);
    flex-shrink: 0;
}

.pw-toggle-btn:hover svg {
    color: var(--dark);
}

.form-extra {
    text-align: right;
    margin-top: 8px;
}

.forgot-link {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--dark);
}

/* ================= BUTTON ================= */

.login-btn {
    width: 100%;
    height: 54px;
    border: none;
    background-color: var(--dark);
    color: var(--white);
    border-radius: 16px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.22s ease;
    margin-top: 8px;
}

.login-btn:hover {
    background-color: var(--dark-soft);
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
}

.login-btn svg {
    width: 18px;
    height: 18px;
}

/* ================= ERROR ================= */

.error-message {
    background-color: var(--danger-bg);
    color: var(--danger);
    padding: 13px 14px;
    border-radius: 16px;
    font-size: 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    animation: errorShake 0.4s ease;
}

.error-message svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ================= SUCCESS ================= */

.success-message {
    background-color: #d1fae5;
    color: #16a34a;
    padding: 13px 14px;
    border-radius: 16px;
    font-size: 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
}

.success-message svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* ================= FOOTER ================= */

.login-footer {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-align: center;
}

.login-footer svg {
    width: 13px;
    height: 13px;
    margin-top: 2px;
    color: var(--accent-dark);
    flex-shrink: 0;
}

/* ================= DEMO ACCOUNTS ================= */

.demo-accounts {
    margin-top: 22px;
    padding: 16px;
    background-color: var(--cream);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.demo-title {
    font-size: 13px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
    padding: 8px 0;
}

.demo-row + .demo-row {
    border-top: 1px solid var(--border);
}

.demo-row strong {
    color: var(--dark);
    font-weight: 900;
}

/* ================= PAGE ENTRANCE ANIMATIONS ================= */

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-32px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-left {
    animation: slideInLeft 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-card {
    animation: slideUpFade 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

/* ================= BUTTON LOADING STATE ================= */

.login-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-left {
        padding: 42px 28px;
        min-height: 360px;
    }

    .brand-box h1 {
        font-size: 34px;
    }

    .login-right {
        padding: 28px;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 34px 22px;
    }

    .login-right {
        padding: 22px;
    }

    .login-card {
        padding: 26px;
        border-radius: 24px;
    }

    .brand-box h1 {
        font-size: 30px;
    }

    .login-header h2 {
        font-size: 26px;
    }

    .login-footer {
        flex-direction: column;
        gap: 4px;
    }

    .demo-row {
        flex-direction: column;
        align-items: flex-start;
    }
}