/*
 * Pano Software — Login Page Theme
 * =================================
 *
 * Change log (2026-04-16):
 *   - Submit button colour changed to navy (#0C245C) to match the app
 *     taskbar / top ribbon (per client request).
 *   - Hero background image switched from login_background.jpg to the new
 *     Pano_Log-in_Page.jpg (portrait — "Wealth management, Unified.").
 *   - Removed dark teal gradient overlay: the new hero image already ships
 *     with its own purple→teal overlay and tagline baked in.
 *   - Copyright now references "Pano Software" (moved from JS — see
 *     custom_login.js).
 *   - Logo on left panel resized to scale with viewport width: width is
 *     now clamp(160px, 15vw, 360px) with aspect-ratio 1481/847. Up from
 *     the old fixed 200×46 box (which was rendering the P mark at only
 *     ~80px wide).
 *   - (round 2) Purged all residual green/teal from the original High
 *     Meadow theme (sage border #c8d8d3, muted teal label #6a9988).
 *     Login page now uses a navy-dominant palette with the logo's own
 *     cyan as a focus accent, sampled directly from tenant_logo.png:
 *        purple #A66FD1   teal #1AC6C1
 *        cyan   #0BB2F4   blue #2463EB
 *
 * Brand palette — login page (Pano-blue, logo-derived):
 *   --pano-navy:           #0C245C   ribbon navy        (buttons, text, copyright)
 *   --pano-navy-hover:     #14367A   lighter navy       (button hover)
 *   --pano-cyan-accent:    #0BB2F4   logo cyan          (input focus ring)
 *   --pano-label-mid:      #6B7C9E   muted navy-grey    (floating labels, eye icon)
 *   --pano-border-light:   #DCE4EE   light blue-grey    (inputs, dividers)
 *   --pano-teal-logo:      #1AC6C1   logo teal          (reserved — not currently used)
 *   --pano-purple-logo:    #A66FD1   logo purple        (reserved — not currently used)
 *
 * Logo image:
 *   /custom/images/tenant_logo.png   (Pano "P" mark — colour, transparent bg)
 *
 * Hero image:
 *   /custom/images/Pano_Log-in_Page.jpg
 */

.logo {
    background-color: #0C245C;  /* (element is hidden below; kept in navy for consistency) */
    padding: 20px;
}

/* Reset and basic styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #fff;
}

/* Layout structure */
#login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Hide original container styling */
#core-login-container {
    /* Override any existing styles */
    display: block;
    width: 50%;
    margin: 0;
    padding: 0;
}

.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Hide original login form and display it properly in right panel */
#loginForm {
    /* Override original styling */
    width: 100%;
    max-width: 500px;
    padding: 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form {
    padding-top: 100px;
    width: 400px;
}

/* The left panel with hero image
   Pano_Log-in_Page.jpg — client-supplied hero (purple/teal overlay,
   "Wealth management, Unified." tagline baked in) */
.left-panel {
    width: 50%;
    background-image: url('/custom/images/Pano_Log-in_Page.jpg');
    background-size: cover;
    background-position: center;
    background-color: #0C245C; /* navy fallback while image loads */
    position: relative;
}

/* No ::before overlay — the hero image already carries its own gradient
   and tagline. If a darkening overlay is ever needed (e.g. for readability
   on wide displays), uncomment the block below.

    .left-panel::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: linear-gradient(160deg, rgba(12,36,92,0.25) 0%, rgba(26,59,51,0.15) 100%);
        z-index: 1;
    }
*/

/* The right panel with form */
.right-panel {
    width: 50%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Logo in top left
   Sized responsively so it scales with the left panel (which is 50vw on
   desktop). clamp() locks a sensible floor and ceiling:
     min  160px  — stays legible on a narrow laptop
     pref 15vw   — ~15% of viewport width (≈30% of left panel)
     max  360px  — stops growing on 4K / ultrawide displays
   aspect-ratio keeps the P mark in its natural proportions (1481 × 847)
   so the height follows the width automatically. */
.logo-container {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    z-index: 10;
}

.logo-box {
    width: clamp(160px, 10vw, 360px);
    aspect-ratio: 1481 / 847;
    background-image: url('/custom/images/tenant_logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
}

.logo-text {
    color: white;
    font-size: 18px;
    letter-spacing: 3px;
    font-weight: bold;
}

/* Block button (Back to Home) — navy outline to match submit button / ribbon */
.block-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 1px solid #0C245C;
    border-radius: 50px;
    padding: 6px 16px;
    color: #0C245C;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

    /* Hover effect */
    .block-button:hover {
        background-color: #0C245C;
        color: #ffffff;
        border-color: #0C245C;
    }

/* Hide original logo */
.logo {
    display: none !important;
}

/* Login header */
h1 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: normal;
    text-align: center;
}

/* Form inputs */
.input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid #DCE4EE;
    border-radius: 4px;
    font-size: 16px;
    background-color: transparent;
}

    .form-control:focus {
        outline: none;
        border-color: #0BB2F4;   /* Pano logo cyan — focus ring */
        box-shadow: 0 0 0 3px rgba(11, 178, 244, 0.15);
    }

        /* Floating labels using pseudo-elements */
        .form-control:focus::placeholder,
        .form-control:not(:placeholder-shown)::placeholder {
            color: transparent;
        }

        /* Detect Chrome/Edge autofill via animation */
        @keyframes onAutoFillStart { from { /**/ } to { /**/ } }
        input:-webkit-autofill { animation-name: onAutoFillStart; }

        /* Use ~ (general sibling) instead of + (adjacent sibling) because
           password managers like LastPass inject icon elements between the
           input and the floating-label, breaking the adjacent selector. */
        .form-control:focus ~ .floating-label,
        .form-control:not(:placeholder-shown) ~ .floating-label,
        .form-control:-webkit-autofill ~ .floating-label,
        .form-control.autofilled ~ .floating-label {
            top: -10px;
            left: 10px;
            font-size: 12px;
            padding: 0 5px;
            background-color: white;
        }

.floating-label {
    position: absolute;
    left: 15px;
    top: 15px;
    color: #6B7C9E;
    font-size: 16px;
    transition: all 0.2s ease;
    pointer-events: none;
}

/* Password toggle */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6B7C9E;
    font-size: 18px;
    z-index: 1;
    transition: color 0.2s ease;
}

    .toggle-password:hover {
        color: #0C245C;
    }

/* Submit button — navy to match the app ribbon (client request 2026-04-16) */
#submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #0C245C;
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

    /* Hover effect — slightly lighter navy */
    #submit-btn:hover {
        background-color: #14367A;
    }

/* Form footer links */
.form-footer {
    display: flex !important; /* Override any hide */
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    visibility: visible; /*hidden, implement password retrieval and onboarding of account*/
}

    .form-footer a {
        color: #0C245C;
        text-decoration: none;
        font-size: 14px;
    }

        .form-footer a:hover {
            color: #14367A;
            text-decoration: underline;
        }

.separator {
    color: #0C245C;
    font-size: 14px;
}

/* Footer disclaimer */
.disclaimer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    font-size: 12px;
    color: #0C245C;
    text-align: center;
    border-top: 1px solid #DCE4EE;
    background-color: white;
}

.disclaimer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

    .disclaimer-links a {
        color: #0C245C;
        text-decoration: none;
        font-size: 12px;
    }

        .disclaimer-links a:hover {
            color: #14367A;
        }

.disclaimer-text {
    max-width: 800px;
    margin: 0 auto;
}

/* Validation messages */
.field-validation-message {
    color: #d32f2f;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

.validation-summary {
    color: #d32f2f;
    margin-bottom: 20px;
}

    .validation-summary ul {
        list-style: none;
        padding-left: 0;
    }

/* Responsive design */
@media (max-width: 768px) {
    #login-wrapper {
        flex-direction: column;
    }

    #core-login-container,
    .left-panel {
        width: 100%;
        height: 40vh;
    }

    .right-panel {
        width: 100%;
        min-height: 60vh;
    }

    #loginForm {
        padding: 10px;
    }

    /* Brand logo: shrink + corner-tuck on mobile so it no longer overlaps the
       hero image's baked-in "Wealth management, Unified." tagline. Desktop is
       unchanged (keeps the clamp(160px, 10vw, 360px) sizing above). */
    .logo-container {
        top: 12px;
        left: 12px;
    }
    .logo-box {
        width: 70px;
    }
}


/* Modal styles */
.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 10px;
    border-bottom: 1px solid #DCE4EE;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.modal-title {
    font-size: 24px;
    font-weight: 500;
    margin: 0;
    color: #0C245C;
}

.modal-close {
    font-size: 28px;
    font-weight: 700;
    color: #6B7C9E;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .modal-close:hover {
        color: #0C245C;
    }

.modal-body {
    padding: 20px;
    line-height: 1.6;
}

    .modal-body h3 {
        font-size: 20px;
        margin-bottom: 10px;
        font-weight: 600;
    }

    .modal-body h4 {
        font-size: 16px;
        margin-top: 15px;
        margin-bottom: 10px;
        font-weight: 600;
    }

    .modal-body p {
        margin-bottom: 10px;
    }

    .modal-body ul {
        margin-left: 20px;
        margin-bottom: 10px;
    }

    .modal-body li {
        margin-bottom: 5px;
    }

/* Responsive styles for modal */
@media (max-width: 768px) {
    .modal-content {
        max-height: 90vh;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-body {
        padding: 15px;
    }
}
