:root {
    --primary: #3c50e0;
    --primary-dark: #3044c5;
    --text: #1c2434;
    --text-light: #64748b;
    --border: #e2e8f0;
    --background: #f8fafc;
    --white: #ffffff;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: "Figtree", sans-serif;
    background: var(--background);
    color: var(--text);
}

.guest-page {
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* ============================================
   Preloader
   ============================================ */

.guest-preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    transition:
        opacity 0.4s ease,
        visibility 0.4s ease;
}

.guest-preloader.hide {
    opacity: 0;
    visibility: hidden;
}

.guest-loader {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: guestLoaderSpin 0.8s linear infinite;
}

@keyframes guestLoaderSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Login Page
   ============================================ */

.login-page {
    width: 100%;
    height: 100vh;
    min-height: 0;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-container {
    width: 100%;
    max-width: 1200px;
    height: calc(100vh - 48px);
    max-height: calc(100vh - 48px);
    min-height: 0;
    display: flex;
    overflow: hidden;
    background: var(--white);
    border-radius: 24px;
    box-shadow:
        0 25px 60px rgba(15, 23, 42, 0.08),
        0 10px 25px rgba(15, 23, 42, 0.04);
}

/* ============================================
   Left Showcase
   ============================================ */

.login-showcase {
    position: relative;
    width: 50%;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(255, 255, 255, 0.14),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(255, 255, 255, 0.1),
            transparent 30%
        ),
        linear-gradient(145deg, #3048d8 0%, #3c50e0 45%, #5367e8 100%);
}

.login-showcase::before {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    right: -160px;
    top: -150px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
}

.login-showcase::after {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    left: -280px;
    bottom: -280px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.showcase-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 50px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.login-logo {
    display: inline-flex;
    width: fit-content;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    flex-shrink: 0;
}

.login-logo img {
    display: block;
    width: 150px;
    height: auto;
    object-fit: contain;
}

.showcase-text {
    margin-top: 55px;
    max-width: 500px;
}

.showcase-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.showcase-text h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(32px, 3.2vw, 44px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -1.2px;
}

.showcase-text h1 span {
    display: block;
    color: #dfe4ff;
}

.showcase-text p {
    max-width: 460px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    line-height: 1.7;
}

.showcase-illustration {
    position: absolute;
    left: 50%;
    bottom: 65px;
    width: 70%;
    max-width: 390px;
    transform: translateX(-50%);
}

.showcase-illustration img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 210px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

.showcase-footer {
    position: absolute;
    left: 50px;
    bottom: 25px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
}

.showcase-footer a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
}

.showcase-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Login Form Section
   ============================================ */

.login-form-section {
    width: 50%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
}

.login-form-wrapper {
    width: 100%;
    max-width: 450px;
    max-height: 100%;
    padding: 40px 45px;
    overflow: hidden;
}

.mobile-logo {
    display: none;
}

.login-header {
    margin-bottom: 28px;
}

.login-welcome {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
}

.login-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 30px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.7px;
}

.login-header p {
    margin: 9px 0 0;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   Alert
   ============================================ */

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: var(--danger-bg);
    color: var(--danger);
}

.login-alert-icon {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--danger);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.login-alert p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================
   Form
   ============================================ */

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 19px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.password-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.password-label-row a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.password-label-row a:hover {
    text-decoration: underline;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 17px;
    top: 50%;
    z-index: 2;
    display: flex;
    color: #94a3b8;
    transform: translateY(-50%);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 48px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: #ffffff;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

.input-wrapper input:hover {
    border-color: #cbd5e1;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(60, 80, 224, 0.1);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    width: 25px;
    height: 25px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: var(--primary);
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle.show-password .eye-open {
    display: none;
}

.password-toggle.show-password .eye-closed {
    display: block;
}

.form-error {
    display: block;
    margin-top: 6px;
    color: var(--danger);
    font-size: 12px;
}

/* ============================================
   Remember Me
   ============================================ */

.remember-row {
    margin: 0 0 22px;
}

.remember-label {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    margin: 0 !important;
    color: var(--text-light) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer;
}

.remember-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
    transition: 0.2s ease;
}

.remember-label input:checked + .custom-checkbox {
    border-color: var(--primary);
    background: var(--primary);
}

.remember-label input:checked + .custom-checkbox::after {
    content: "";
    width: 9px;
    height: 5px;
    margin-top: -2px;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(-45deg);
}

/* ============================================
   Submit Button
   ============================================ */

.login-submit {
    width: 100%;
    height: 53px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(60, 80, 224, 0.18);
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.login-submit:hover {
    background: var(--primary-dark);
    box-shadow: 0 10px 24px rgba(60, 80, 224, 0.25);
    transform: translateY(-1px);
}

.login-submit:active {
    transform: translateY(0);
}

.login-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.login-submit.loading svg {
    display: none;
}

.login-submit.loading::after {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: guestLoaderSpin 0.7s linear infinite;
}

/* ============================================
   Bottom
   ============================================ */

.login-bottom {
    margin-top: 22px;
    text-align: center;
}

.login-bottom p {
    margin: 0;
    color: #94a3b8;
    font-size: 12px;
}

.login-bottom strong {
    color: #64748b;
    font-weight: 600;
}

/* ============================================
   Tablet
   ============================================ */

@media (max-width: 1199px) {
    .login-container {
        max-width: 1000px;
    }

    .showcase-content {
        padding: 40px;
    }

    .showcase-text {
        margin-top: 45px;
    }

    .showcase-text h1 {
        font-size: 36px;
    }

    .showcase-footer {
        left: 40px;
    }

    .login-form-wrapper {
        padding: 35px 38px;
    }
}

/* ============================================
   Mobile / Tablet
   ============================================ */

@media (max-width: 991px) {
    .login-page {
        height: 100vh;
        min-height: 0;
        padding: 16px;
    }

    .login-container {
        width: 100%;
        max-width: 700px;
        height: calc(100vh - 32px);
        max-height: calc(100vh - 32px);
        min-height: 0;
    }

    .login-showcase {
        display: none;
    }

    .login-form-section {
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    .login-form-wrapper {
        width: 100%;
        max-width: 480px;
        max-height: 100%;
        padding: 35px 40px;
        overflow: hidden;
    }

    .mobile-logo {
        display: flex;
        justify-content: center;
        margin-bottom: 30px;
    }

    .mobile-logo a {
        display: inline-flex;
        padding: 9px 15px;
        border-radius: 10px;
        background: #f8fafc;
    }

    .mobile-logo img {
        display: block;
        width: 135px;
        height: auto;
    }
}

/* ============================================
   Small Mobile
   ============================================ */

@media (max-width: 575px) {
    .login-page {
        width: 100%;
        height: 100vh;
        min-height: 0;
        padding: 0;
    }

    .login-container {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        min-height: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .login-form-section {
        width: 100%;
        height: 100vh;
        min-height: 0;
        overflow: hidden;
    }

    .login-form-wrapper {
        width: 100%;
        max-width: none;
        max-height: 100vh;
        padding: 25px 22px;
        overflow: hidden;
    }

    .mobile-logo {
        margin-bottom: 28px;
    }

    .mobile-logo img {
        width: 120px;
    }

    .login-header {
        margin-bottom: 24px;
    }

    .login-welcome {
        margin-bottom: 6px;
        font-size: 13px;
    }

    .login-header h2 {
        font-size: 26px;
    }

    .login-header p {
        margin-top: 7px;
        font-size: 13px;
    }

    .form-group {
        margin-bottom: 17px;
    }

    .form-group label {
        margin-bottom: 7px;
        font-size: 13px;
    }

    .input-wrapper input {
        height: 50px;
    }

    .login-alert {
        margin-bottom: 17px;
    }

    .remember-row {
        margin-bottom: 20px;
    }

    .login-submit {
        height: 51px;
    }

    .login-bottom {
        margin-top: 18px;
    }
}

/* ============================================
   Very Small Mobile
   ============================================ */

@media (max-width: 380px) {
    .login-form-wrapper {
        padding: 20px 18px;
    }

    .mobile-logo {
        margin-bottom: 22px;
    }

    .mobile-logo img {
        width: 110px;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .login-header h2 {
        font-size: 23px;
    }

    .login-header p {
        font-size: 12px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .input-wrapper input {
        height: 47px;
    }

    .remember-row {
        margin-bottom: 16px;
    }

    .login-submit {
        height: 48px;
    }

    .login-bottom {
        margin-top: 14px;
    }
}
