/* ============================================
   LOGIN PAGE — FinSight AI
   Centered card layout, responsive, fluid type
   ============================================ */

:root {
    --color-primary: #1b4988;
    --color-primary-hover: #153a6e;
    --color-text: #0f1727;
    --color-text-secondary: #4a5565;
    --color-text-muted: #676f7f;
    --color-bg: #f9f9f9;
    --color-bg-alt: #f3f3f5;
    --color-border: #dfe1e5;
    --color-input-bg: #f3f3f5;
    --color-danger: #c70036;
    --color-link: #006ba1;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--color-bg-alt);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

/* ===========================
   PAGE WRAPPER — centers the card
   =========================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

/* ===========================
   LOGIN CARD — constrained width, two columns
   =========================== */
.login-card {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 580px;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ===========================
   LEFT SIDE — form
   =========================== */
.login-left {
    flex: 1.15;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(32px, 4vw, 56px);
    background: var(--color-bg);
}

/* Logo */
.logo {
    margin-bottom: 32px;
}

.brand-logo {
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 700;
    color: #1b4988;
    letter-spacing: -0.5px;
}

.brand-highlight {
    color: #f7b500;
}

/* Login Box */
.login-box,
.forgotPasswordSection {
    max-width: 400px;
    width: 100%;
}

.loginAccountText,
.forgotPasswordText {
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
    line-height: 1.3;
}

.welcomeTextLoginPage,
.login-box p,
.forgotPasswordSection p {
    font-size: 15px;
    color: var(--color-text-secondary) !important;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* Form */
.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
}

.aestrick {
    color: var(--color-danger);
}

.emailBlock,
.passwordBlock {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

input[type="email"],
input[type="password"] {
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    background-color: var(--color-input-bg);
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    margin: 4px 0 0;
}

input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(27, 73, 136, 0.12);
}

input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: var(--color-text-muted);
}

/* Remember / Forgot */
.rememberForgotBlock {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-label {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 0;
}

.form-check-input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    margin: 0;
    cursor: pointer;
}

.forgot-password {
    font-size: 14px;
    color: var(--color-link) !important;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Buttons */
.login-btn,
.reset-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 16px;
    transition: background-color 0.2s;
}

.login-btn:hover,
.reset-btn:hover {
    background-color: var(--color-primary-hover);
}

/* Forgot Password Section */
.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.6;
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 42px !important;
}

.back-to-login {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-link);
}

/* Left footer — only visible on mobile when right side is hidden */
.footerLeftSide {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

/* ===========================
   RIGHT SIDE — illustration
   =========================== */
.login-right {
    flex: 0.85;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--color-bg-alt);
    padding: clamp(32px, 4vw, 48px) clamp(24px, 3vw, 40px);
}

.rightSideTopCOntent {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.login-right .illustration {
    width: clamp(180px, 18vw, 300px);
    height: auto;
    margin-bottom: 28px;
}

.login-right h3 {
    font-size: clamp(18px, 1.6vw, 24px);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.rightsideSmallText {
    font-size: 14px;
    color: var(--color-text-secondary) !important;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Footer */
.footerRightSide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 24px;
}

.poweredByText {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.poweredByLogo {
    width: clamp(80px, 9vw, 120px);
    height: auto;
}

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

/* Mobile: single column, hide right side */
@media (max-width: 767px) {
    .login-page {
        padding: 0;
        align-items: stretch;
    }

    .login-card {
        flex-direction: column;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        max-width: 100%;
    }

    .login-left {
        flex: 1;
        padding: 32px 24px;
        justify-content: center;
    }

    .login-right {
        display: none;
    }

    .footerLeftSide {
        display: flex;
    }

    .login-box,
    .forgotPasswordSection {
        max-width: 100%;
    }
}

/* Small tablets: tighter padding */
@media (min-width: 768px) and (max-width: 991px) {
    .login-card {
        max-width: 860px;
    }

    .login-left {
        padding: 36px 32px;
    }

    .login-right {
        padding: 36px 24px;
    }

    .login-right .illustration {
        width: 160px;
    }
}
