﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --navy-900: #0c2340;
    --navy-800: #0e2a4d;
    --navy-700: #15355f;
    --blue-accent: #3f6fd8;
    --blue-accent-dark: #2f57b3;
    --teal-accent: #3fc7b0;
    --bg-grey: #eef1f6;
    --card-bg: #fafbfc;
    --text-dark: #1c2733;
    --text-muted: #8a93a3;
    --text-faint-on-navy: #b9c4d6;
    --input-bg: #ffffff;
    --input-border: #e1e5eb;
    --error: #e0455a;
    --radius-md: 10px;
    --radius-lg: 18px;
    --font-display: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: var(--font-body);
    background: var(--bg-grey);
    color: var(--text-dark);
}

.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ===================== LEFT BRAND PANEL (DESKTOP - unchanged) ===================== */
.brand-panel {
    width: 26%;
    min-width: auto;
    height: 100vh; /* Full screen height */

    background: linear-gradient( 165deg, var(--navy-900) 0%, var(--navy-800) 60%, var(--navy-700) 100% );
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertical center */
    align-items: center; /* Horizontal center */
    text-align: center;
    padding: 20px 28px;
    position: relative;
    overflow: hidden;
}

    .brand-panel::before {
        content: "";
        position: absolute;
        top: -80px;
        right: -80px;
        width: 240px;
        height: 240px;
        background: radial-gradient(circle, rgba(63,111,216,0.18), transparent 70%);
        pointer-events: none;
    }

.brand-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Logo now shows at its actual/native size, centered horizontally on the panel.
   No fixed width/height/overflow so the image isn't stretched or cropped. */
.logo-mark {
    width: 100%;
    margin-bottom: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-svg {
    width: auto;
    height: auto;
    max-width: 100%; /* safety net: prevents overflow if the source image is very large */
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.hex-bg {
    fill: #1a4fc4;
    stroke: #ffffff;
    stroke-width: 3;
}

.hex-letter {
    fill: #ffffff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 46px;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 26px;
    margin: 2px 0 2px;
    letter-spacing: 0.3px;
}

.brand-tagline {
    font-size: 9.5px;
    letter-spacing: 1.6px;
    color: var(--text-faint-on-navy);
    margin: 0 0 22px;
    font-weight: 500;
}

.brand-illustration {
    text-align: center;
}

.illu-image {
    width: 220px;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

.brand-strapline {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 18px;
    letter-spacing: 0.2px;
}

    .brand-strapline .dot {
        color: var(--teal-accent);
        margin: 0 6px;
    }

.brand-copy {
    font-size: 13.5px;
    line-height: 1.55;
    color: #dde4ef;
    margin-bottom: 10%;
}

    .brand-copy p {
        margin: 2px 0;
    }

.brand-copy-strong {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    color: #fff;
}

.brand-version {
    font-size: 12px;
    color: var(--text-faint-on-navy);
    margin-top: 6px;
}

.brand-footer {
    margin-top: 3px;
    font-size: 15px;
    color: #ffffff;
    line-height: 1.6;
}

.powered-by {
    margin: 0;
}

.company-name {
    margin: 1px 0;
    color: #ffffff;
    font-weight: 500;
}

.company-contact {
    margin: 0;
    font-size: 12.5px;
}

.company-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .company-link:hover {
        color: #ffffff;
        text-decoration: none;
        cursor: pointer;
    }

/* ===================== RIGHT LOGIN PANEL ===================== */
.login-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 46px 42px 40px;
    box-shadow: 0 20px 50px -15px rgba(20,40,80,0.15), 0 2px 10px rgba(20,40,80,0.06);
}

.login-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 6px;
    color: #0e1726;
}

.login-subtitle {
    text-align: center;
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0 0 30px;
}

.field-group {
    margin-bottom: 20px;
}

    .field-group label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: #28344a;
        margin-bottom: 7px;
    }

    .field-group input {
        width: 100%;
        height: 46px;
        padding: 0 16px;
        border-radius: var(--radius-md);
        border: 1.5px solid var(--input-border);
        background: var(--input-bg);
        font-size: 14px;
        font-family: var(--font-body);
        color: var(--text-dark);
        outline: none;
        transition: border-color 0.18s ease, box-shadow 0.18s ease;
    }

        .field-group input::placeholder {
            color: #b6bdc9;
        }

        .field-group input:focus {
            border-color: var(--blue-accent);
            box-shadow: 0 0 0 3px rgba(63,111,216,0.14);
        }

        .field-group input.input-error {
            border-color: var(--error);
        }

            .field-group input.input-error:focus {
                box-shadow: 0 0 0 3px rgba(224,69,90,0.14);
            }

.password-wrap {
    position: relative;
}

    .password-wrap input {
        padding-right: 46px;
    }

.toggle-pass {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #9aa3b2;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

    .toggle-pass:hover {
        color: var(--blue-accent);
        background: #eef2fb;
    }

.eye-icon {
    width: 19px;
    height: 19px;
}

.eye-open {
    display: none;
}

/* Default: password masked (dots) -> show closed/crossed eye, click to reveal */
/* When .active (password visible as text) -> show open eye, click to hide */
.toggle-pass.active .eye-open {
    display: block;
}

.toggle-pass.active .eye-closed {
    display: none;
}

.error-msg {
    min-height: 16px;
    font-size: 12px;
    color: var(--error);
    margin: 6px 2px 0;
}

.login-btn {
    width: 100%;
    height: 48px;
    margin-top: 10px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, var(--blue-accent) 0%, var(--blue-accent-dark) 100%);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15.5px;
    letter-spacing: 0.2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px -6px rgba(47,87,179,0.55);
    transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

    .login-btn:hover {
        filter: brightness(1.05);
        box-shadow: 0 10px 24px -6px rgba(47,87,179,0.65);
    }

    .login-btn:active {
        transform: translateY(1px) scale(0.997);
    }

    .login-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none;
    }

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: spin 0.7s linear infinite;
}

.login-btn.loading .spinner {
    display: inline-block;
}

.login-btn.loading .btn-label {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.shake {
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-7px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(3px);
    }
}

/* ===================== RESPONSIVE ===================== */
/* Desktop/tablet landscape: layout stays as the original two-column model
   at every width down to 821px — it just scales naturally since brand-panel
   is a % width and login-card is a max-width block. No structural change. */

/* ===== MOBILE (≤820px): collapse left panel to a logo-only header, 10px padding all sides ===== */
@media (max-width: 820px) {
    .app-shell {
        flex-direction: column;
    }

    .brand-panel {
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 10px;
        align-items: center;
        justify-content: center;
    }

        .brand-panel::before {
            display: none;
        }

    /* Center the logo on its own, nothing else from the brand panel shows */
    .brand-top {
        width: 85%;
        align-items: center;
        justify-content: center;
    }

    .logo-mark {
        width: 100%;
        margin: 0 auto;
    }

    /* Hide everything else in the left panel on mobile */
    .brand-illustration,
    .brand-strapline,
    .brand-copy,
    .brand-footer,
    .status-block {
        display: none;
    }

    .login-panel {
        padding: 20px 18px 50px;
    }

    .login-card {
        padding: 34px 26px 30px;
    }
}

@media (max-width: 420px) {
    .login-card {
        padding: 28px 20px 26px;
    }
}
