:root {
    --login-bg-bottom: #4c4c4c;
    --login-card-bg: #ffffff;
    --login-header: #dd681f;
    --login-text: #17283a;
    --login-muted: #65707b;
    --login-border: #c9cdd2;
    --login-focus: #078fae;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color: var(--login-text);

    /*
     * bgtile is 40 x 1080.
     * Repeat horizontally only.
     *
     * Below its 1080px height, the solid background
     * continues using the dark bottom color.
     */
    background-color: var(--login-bg-bottom);
    background-image:
        url('/assets/images/login/bgtile.png');

    background-repeat:
        repeat-x;

    background-position:
        left top;

    background-size:
        40px 1080px;

    overflow-x: hidden;
}


/* =========================================================
   Iguana artwork
   ========================================================= */

.login-iguana {
    position: fixed;
    z-index: 0;

    top: 0;
    left: 0;

    width: 1088px;
    height: 1080px;

    object-fit: contain;
    object-position: left top;

    pointer-events: none;
    user-select: none;
}


/* =========================================================
   Page/card placement
   ========================================================= */

.login-page {
    position: relative;
    z-index: 1;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    min-height: 100vh;

    /*
     * Places the card similarly to your mockup.
     */
    padding:
        clamp(190px, 27vh, 275px)
        24px
        80px;
}


.login-card {
    width: 418px;

    overflow: hidden;

    border-radius: 16px;

    background:
        var(--login-card-bg);

    box-shadow:
        0 10px 28px
        rgba(0, 0, 0, .30);
}


/* =========================================================
   Orange heading
   ========================================================= */

.login-card-header {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 56px;

    padding: 12px 20px;

    background:
        var(--login-header);

    color: #fff;

    font-size: 20px;
    font-weight: 700;

    letter-spacing: .02em;

    text-shadow:
        0 1px 2px
        rgba(0, 0, 0, .28);
}


/* =========================================================
   Card body
   ========================================================= */

.login-card-body {
    padding:
        34px
        38px
        38px;
}


/*
 * Decorative branding area.
 *
 * Keeping this text-based for now rather than baking
 * fake form fields from loginbox.png into the page.
 */
.login-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;

    min-height: 100px;

    margin-bottom: 26px;
}


.login-brand-blue {
    color: #038eae;

    font-size: 24px;
    font-weight: 800;

    line-height: 1;
    text-align: center;
}


.login-brand-divider {
    width: 1px;
    height: 58px;

    background:
        #d5d8dc;
}


.login-brand-poolbrain {
    color: #20aeda;

    font-size: 22px;
    font-weight: 700;

    line-height: 1;
}


/* =========================================================
   Form
   ========================================================= */

.login-form {
    display: grid;
    gap: 12px;
}


.login-field-row {
    display: grid;

    grid-template-columns:
        76px
        minmax(0, 1fr);

    align-items: center;

    gap: 10px;
}


.login-field-row label {
    color:
        var(--login-text);

    font-size: 14px;
    font-weight: 700;

    text-align: right;
}


.login-input {
    width: 100%;
    height: 36px;

    padding:
        7px
        10px;

    border:
        1px solid
        var(--login-border);

    border-radius: 6px;

    background:
        #fff;

    color:
        var(--login-text);

    font-size: 15px;

    outline: none;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}


.login-input:focus {
    border-color:
        var(--login-focus);

    box-shadow:
        0 0 0 3px
        rgba(7, 143, 174, .13);
}


/* =========================================================
   Sign in button
   ========================================================= */

.login-actions {
    display: flex;
    justify-content: flex-end;

    margin-top: 8px;
}


.login-button {
    min-width: 104px;
    height: 36px;

    padding:
        6px
        16px;

    border: 0;
    border-radius: 7px;

    background:
        var(--login-header);

    color: #fff;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 2px 5px
        rgba(0, 0, 0, .15);
}


.login-button:hover {
    filter:
        brightness(.96);
}


.login-button:active {
    transform:
        translateY(1px);
}


/* =========================================================
   Login errors
   ========================================================= */

.login-error {
    margin-bottom: 18px;

    padding:
        9px
        11px;

    border-radius: 6px;

    background:
        #f5dfdc;

    color:
        #8e2519;

    font-size: 13px;
    line-height: 1.35;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 700px) {
    .login-iguana {
        /*
         * Keep the artwork present but less dominant
         * on smaller displays.
         */
        left: 50%;
        transform:
            translateX(-50%);

        opacity: .42;
    }

    .login-page {
        align-items: center;

        padding:
            24px;
    }

    .login-card {
        width:
            min(418px, 100%);
    }

    .login-card-body {
        padding:
            28px
            24px
            30px;
    }

    .login-branding {
        gap: 16px;
    }
}

@media (max-width: 440px) {
    .login-field-row {
        grid-template-columns:
            1fr;

        gap: 5px;
    }

    .login-field-row label {
        text-align: left;
    }

    .login-actions {
        justify-content: stretch;
    }

    .login-button {
        width: 100%;
    }
}


/* =========================================================
   Login positioning / real logo artwork
   ========================================================= */

.login-page {
    padding-top: clamp(90px, calc(27vh - 100px), 175px);
}

.login-branding {
    min-height: 0;
    margin-bottom: 26px;
}

.login-branding-image {
    display: block;

    width: 359px;
    max-width: 100%;
    height: auto;

    margin: 0 auto;
}


/* =========================================================
   Login logo sizing / equal vertical spacing
   ========================================================= */

.login-branding {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 0;

    /* Equal space above and below the logo */
    padding: 34px 0;
    margin: 0;
}

.login-branding-image {
    display: block;

    /* 359px reduced by 30% = ~251px */
    width: 251px;
    max-width: 100%;
    height: auto;

    margin: 0;
}


/* =========================================================
   Restore previous login logo layout
   Move artwork upward 5px only
   ========================================================= */

.login-branding {
    min-height: 0;
    padding: 0;
    margin-bottom: 26px;
}

.login-branding-image {
    display: block;

    width: 359px;
    max-width: 100%;
    height: auto;

    margin: 0 auto;

    transform: translateY(-5px);
}


/* Center BIP iguana watermark */
.login-iguana {
    left: 50%;
    transform: translateX(-50%);
}


/* Restore login-page iguana to original left alignment */
.login-iguana {
    left: 0;
    transform: none;
}


/* Login positioning refinement */
.login-iguana {
    left: 50%;
    transform: translateX(-50%);
}

.login-card {
    transform: translateY(50px);
}

/* Tighten the white login-card content by 5px */
.login-card-body {
    padding-left: calc(var(--login-card-padding, 40px) - 5px);
    padding-right: calc(var(--login-card-padding, 40px) - 5px);
    padding-bottom: calc(var(--login-card-padding, 40px) - 5px);
}



/* =========================================================
   Compact login: Blue Iguana logo only, centered on top,
   stacked full-width inputs with placeholder text.
   ========================================================= */

.login-card {
    width: min(300px, 100%);

    /* 100px higher than the previous +50px offset */
    transform: translateY(-50px);
}

.login-card-header {
    min-height: 46px;
    padding: 10px 16px;

    font-size: 16px;
}

.login-card-body {
    padding: 22px 26px 26px;
}

.login-branding {
    margin-bottom: 20px;
}

.login-branding-image {
    width: 140px;

    transform: none;
}

.login-field-row,
.login-field-row label {
    display: block;
}

.login-visually-hidden {
    position: absolute;

    width: 1px;
    height: 1px;
    overflow: hidden;

    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.login-input::placeholder {
    color: #9aa1a8;
}

.login-actions {
    justify-content: stretch;
}

.login-button {
    width: 100%;
}

@media (max-width: 700px) {
    .login-card {
        transform: none;
    }
}

/* Another ~20% smaller so more of the iguana watermark shows. */
.login-card {
    width: min(240px, 100%);
}

.login-card-header {
    min-height: 38px;
    padding: 8px 12px;

    font-size: 14px;
}

.login-card-body {
    padding: 18px 20px 20px;
}

.login-branding {
    margin-bottom: 16px;
}

.login-branding-image {
    width: 112px;
}

.login-form {
    gap: 10px;
}

.login-input {
    height: 30px;
    padding: 5px 8px;

    font-size: 13px;
}

.login-button {
    height: 30px;

    font-size: 12px;
}

.login-actions {
    margin-top: 6px;
}

.login-error {
    font-size: 11px;
}
