/* ============================================================
   VISTAC Login — Light Theme  |  Split Layout  |  100vh
   Stack: Bootstrap 5 CDN + Bootstrap Icons + Inter font
   ============================================================ */

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

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand */
    --accent: #2563eb;
    /* vivid blue */
    --accent-hover: #1d4ed8;
    --accent-light: #eff6ff;
    --accent-mid: #bfdbfe;

    /* Surfaces */
    --white: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --border-focus: #93c5fd;

    /* Text */
    --text-dark: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Left panel gradient */
    --panel-from: #1e3a8a;
    --panel-to: #2563eb;

    /* Shadow */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 4px 24px rgba(15, 23, 42, .08), 0 2px 8px rgba(15, 23, 42, .04);
    --shadow-input: 0 0 0 3px rgba(37, 99, 235, .15);

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --dur: 0.22s;
}

html,
body {
    height: 100%;
    overflow: hidden;
    /* No vertical scroll on any screen */
    font-family: 'Inter', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--surface);
    color: var(--text-body);
}

/* ============================================================
   ROOT WRAPPERS  — Landing page & Login page both fill 100vh
   ============================================================ */
#landingPage,
#loginPage {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

.vl-hidden {
    display: none !important;
}

/* ============================================================
   SPLIT SHELL  (flex row on desktop, column on mobile)
   The factory BG image is set here via Razor inline <style>
   ============================================================ */
.vl-split {
    display: flex;
    height: 100%;
    width: 100%;
    position: relative;
    /* BG image sits on this layer */
}

/* ============================================================
   LEFT PANEL  — dark branded overlay on BG image
   ============================================================ */
.vl-left {
    flex: 0 0 42%;
    max-width: 42%;
    /* No own background — inherits from .vl-split BG image */
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 36px;
    position: relative;
    overflow: hidden;
}

/* Decorative circles */
.vl-left::before,
.vl-left::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: .12;
    background: #ffffff;
}

.vl-left::before {
    width: 340px;
    height: 340px;
    top: -90px;
    right: -90px;
}

.vl-left::after {
    width: 220px;
    height: 220px;
    bottom: -60px;
    left: -60px;
}

/* Extra decorative ring */
.vl-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.vl-ring-1 {
    width: 180px;
    height: 180px;
    top: 30px;
    left: 30px;
}

.vl-ring-2 {
    width: 120px;
    height: 120px;
    bottom: 80px;
    right: 30px;
}

.vl-left-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 320px;
}

/* Factory background image (Razor-injected via <style> tag) */
.vl-left.has-bg {
    background-size: cover;
    background-position: center;
}

.vl-left.has-bg::before,
.vl-left.has-bg::after {
    display: none;
}

/* Stronger overlay for left panel so white text pops over the photo */
.vl-left-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, rgba(15, 40, 110, .92) 0%, rgba(29, 78, 216, .85) 100%);
    z-index: 1;
}

.vl-panel-logo {
    width: 240px;
    /* ↑ Increased from 200px */
    height: auto;
    display: block;
    margin: 0 auto 22px;
    filter: brightness(0) invert(1) drop-shadow(0 3px 10px rgba(0, 0, 0, .35));
    transition: transform .3s ease;
}

.vl-panel-logo:hover {
    transform: scale(1.04);
}

.vl-panel-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: 10px;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1;
}

.vl-panel-sub {
    font-size: 0.80rem;
    font-weight: 500;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .65);
    margin-bottom: 28px;
}

.vl-panel-desc {
    font-size: 0.83rem;
    color: rgba(255, 255, 255, .70);
    line-height: 1.75;
    margin-bottom: 0;
}

/* Feature pills */
.vl-pills {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 28px;
    text-align: left;
    width: 100%;
}

.vl-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 10px;
    padding: 9px 14px;
    backdrop-filter: blur(4px);
}

.vl-pill i {
    font-size: 15px;
    color: rgba(255, 255, 255, .90);
    flex-shrink: 0;
}

.vl-pill span {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .80);
    line-height: 1.3;
}

/* ============================================================
   RIGHT PANEL  — frosted white glass over the BG image
   ============================================================ */
.vl-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Semi-transparent white so factory image shows through subtly */
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    padding: 24px 40px;
    overflow-y: auto;
    overflow-x: hidden;
    /* Soft left border to separate from dark left panel */
    border-left: 1px solid rgba(255, 255, 255, 0.40);
    box-shadow: -4px 0 32px rgba(0, 0, 0, .12);
}

/* ============================================================
   FORM CARD  (max-width cap so the form isn't too wide)
   ============================================================ */
.vl-form-card {
    width: 100%;
    max-width: 390px;
    animation: vl-slideUp 0.55s var(--ease) both;
}

@keyframes vl-slideUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Form header ---------- */
.vl-form-header {
    text-align: center;
    margin-bottom: 16px;
}

.vl-form-logo {
    width: 280px;
    /* ↑ Slightly reduced from 320px to fit compact view */
    height: auto;
    display: block;
    margin: 0 auto 12px;
    transition: transform .3s ease;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .12));
}

.vl-form-logo:hover {
    transform: scale(1.03);
}

.vl-form-heading {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
    letter-spacing: -0.3px;
}

.vl-form-tagline {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ---------- Divider ---------- */
.vl-hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 12px 0;
}

/* ---------- Form groups ---------- */
.vl-fg {
    margin-bottom: 10px;
}

.vl-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-body);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.vl-label i {
    font-size: 12px;
    color: var(--accent);
}

/* Input wrapper */
.vl-iw {
    position: relative;
    display: flex;
    align-items: center;
}

.vl-iw-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
    pointer-events: none;
    transition: color var(--dur) var(--ease);
    z-index: 2;
    display: flex;
    align-items: center;
}

.vl-iw:focus-within .vl-iw-icon {
    color: var(--accent);
}

.vl-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-dark);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 9px;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
    outline: none;
}

.vl-input::placeholder {
    color: var(--text-light);
}

.vl-input:hover {
    border-color: #cbd5e1;
}

.vl-input:focus {
    border-color: var(--accent);
    box-shadow: var(--shadow-input);
    background: var(--accent-light);
}

/* Select arrow */
select.vl-input {
    cursor: pointer;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

select.vl-input option {
    background: #ffffff;
    color: #0f172a;
}

/* Password toggle */
.vl-pw-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
    z-index: 3;
    line-height: 1;
    font-size: 14px;
}

.vl-pw-btn:hover {
    color: var(--accent);
    background: var(--accent-light);
}

/* ---------- Forgot password row ---------- */
.vl-meta-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -6px;
    margin-bottom: 12px;
}

.vl-forgot {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

.vl-forgot:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ---------- Primary button ---------- */
.vl-btn {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.90rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--accent);
    border: none;
    border-radius: 9px;
    cursor: pointer;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .35), var(--shadow-sm);
    transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.vl-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, .45), var(--shadow-sm);
}

.vl-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.985);
    box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}

.vl-btn:disabled,
.vl-btn.vl-loading {
    opacity: .80;
    cursor: not-allowed;
    pointer-events: none;
}

/* Ripple */
.vl-btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
    transform: scale(0);
    animation: vl-ripple 0.55s linear;
    pointer-events: none;
}

@keyframes vl-ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Spinner */
.vl-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vl-spin 0.75s linear infinite;
    flex-shrink: 0;
}

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

/* ---------- OR separator ---------- */
.vl-or {
    position: relative;
    text-align: center;
    margin: 12px 0 8px;
}

.vl-or::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.vl-or span {
    position: relative;
    display: inline-block;
    padding: 0 12px;
    background: var(--white);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
}

/* ---------- Social buttons ---------- */
.vl-social-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vl-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-dark);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 9px;
    cursor: pointer;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
    box-shadow: var(--shadow-sm);
}

.vl-social-btn:hover {
    background: var(--surface);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.vl-social-btn.google-btn:hover {
    border-color: rgba(66, 133, 244, .4);
}

.vl-social-btn.microsoft-btn:hover {
    border-color: rgba(0, 164, 239, .35);
}

/* ---------- Footer links ---------- */
.vl-back-row {
    text-align: center;
    margin-top: 14px;
}

.vl-back-row a {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color var(--dur) var(--ease);
}

.vl-back-row a:hover {
    color: var(--accent);
}

/* ---------- OTP input ---------- */
.vl-otp-input {
    text-align: center;
    font-size: 1.6rem;
    letter-spacing: 12px;
    font-weight: 700;
    padding-left: 14px;
}

/* ---------- Resend row ---------- */
.vl-resend-row {
    text-align: center;
    margin-top: 14px;
}

.vl-resend-row p {
    font-size: 0.80rem;
    color: var(--text-muted);
}

.vl-resend-row a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

.vl-resend-row a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

#otpTimer {
    display: block;
    font-size: 0.74rem;
    color: var(--text-light);
    margin-top: 6px;
}

/* ---------- LANDING page right panel ---------- */
.vl-landing-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    max-width: 360px;
}

.vl-welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-light);
    border: 1px solid var(--accent-mid);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 50px;
}

.vl-welcome-heading {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.vl-welcome-text {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.vl-cta-btn {
    width: auto;
    padding: 11px 28px;
    font-size: 0.90rem;
}

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

/* Tablet (≤ 900px): narrower left panel */
@media (max-width: 900px) {
    .vl-left {
        flex: 0 0 38%;
        max-width: 38%;
        padding: 28px 24px;
    }

    .vl-pills {
        display: none;
    }

    .vl-right {
        padding: 20px 28px;
    }

    .vl-panel-logo {
        width: 260px;
    }

    .vl-form-logo {
        width: 280px;
    }
}

/* Mobile (≤ 640px): stack vertically, left becomes top banner */
@media (max-width: 640px) {

    html,
    body {
        overflow: hidden;
    }

    .vl-split {
        flex-direction: column;
    }

    .vl-left {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        padding: 18px 20px 16px;
        min-height: 0;
    }

    .vl-left::before {
        width: 180px;
        height: 180px;
        top: -50px;
        right: -50px;
    }

    .vl-left::after {
        display: none;
    }

    .vl-panel-logo {
        width: 150px;
        margin-bottom: 10px;
    }

    /* ↑ was 120px */
    .vl-panel-title {
        font-size: 1.6rem;
        letter-spacing: 6px;
        margin-bottom: 3px;
    }

    .vl-panel-sub {
        font-size: 0.70rem;
        margin-bottom: 0;
    }

    .vl-panel-desc {
        display: none;
    }

    .vl-pills {
        display: none;
    }

    .vl-ring {
        display: none;
    }

    .vl-right {
        flex: 1;
        padding: 16px 16px 12px;
        overflow-y: auto;
        background: rgba(255, 255, 255, 0.92);
        /* slightly more opaque on mobile */
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .vl-form-card {
        max-width: 100%;
    }

    .vl-form-header {
        margin-bottom: 12px;
    }

    .vl-form-logo {
        width: 220px;
        margin-bottom: 12px;
    }

    /* ↑ large on mobile */
    .vl-form-heading {
        font-size: 1.15rem;
    }

    .vl-fg {
        margin-bottom: 10px;
    }

    .vl-meta-row {
        margin-bottom: 12px;
    }
}

/* Very small screens (≤ 380px) */
@media (max-width: 380px) {
    .vl-left {
        padding: 14px 14px 10px;
    }

    .vl-panel-title {
        font-size: 1.35rem;
    }

    .vl-right {
        padding: 12px 12px 8px;
    }

    .vl-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .vl-input {
        font-size: 0.82rem;
        padding: 9px 10px 9px 33px;
    }
}