
/* ============================================================
   WATER RESOURCES DSS
   AUTHENTICATION LANDING PAGE
   Visual Refinement — September 2026

   Preserves existing HTML, JavaScript and authentication logic.
   ============================================================ */

/* ------------------------------------------------------------
   1. GLOBAL RESET
   ------------------------------------------------------------ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;

    font-family: "Segoe UI", Arial, sans-serif;

    color: #173b58;

    background-color: #173d4a;

    background-image: url("./auth_background_v99.webp");

    background-position: center center;

    background-size: cover;

    background-repeat: no-repeat;

    background-attachment: fixed;

    overflow-x: hidden;
}

/* ------------------------------------------------------------
   2. BACKGROUND CLARITY

   Remove the previous translucent shading.

   The original photograph remains visible without CSS blur.
   ------------------------------------------------------------ */

.page-shade {
    display: none !important;
}

/* ------------------------------------------------------------
   3. AUTHENTICATION PANEL

   Compact panel with content-based height.

   No backdrop blur or forced 690px height.
   ------------------------------------------------------------ */

.auth-card {
    position: absolute;

    top: 50%;
    right: 5.4vw;

    transform: translateY(-50%);

    width: clamp(400px, 29vw, 505px);

    height: auto;

    min-height: 0;

    max-height: calc(100dvh - 48px);

    display: flex;

    flex-direction: column;

    overflow: hidden;

    border-radius: 16px;

    background: #ffffff;

    border: 1px solid rgba(255,255,255,0.95);

    box-shadow:
        0 12px 36px rgba(7,32,47,0.18);

    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* ------------------------------------------------------------
   4. SIGN-IN / SIGN-UP TABS
   ------------------------------------------------------------ */

.auth-tabs {
    display: grid;

    grid-template-columns: 1fr 1fr;

    height: 60px;

    flex: none;

    border-bottom: 1px solid #e2e9ee;

    background: #ffffff;
}

.auth-tab {
    position: relative;

    border: 0;

    background: transparent;

    color: #52677d;

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.auth-tab:hover {
    color: #087744;

    background: #f7faf8;
}

.auth-tab.active {
    color: #087744;
}

.auth-tab.active::after {
    content: "";

    position: absolute;

    left: 10%;
    right: 10%;
    bottom: 0;

    height: 3px;

    border-radius: 3px 3px 0 0;

    background: #087744;
}

/* ------------------------------------------------------------
   5. CONTENT PANES
   ------------------------------------------------------------ */

.pane {
    display: none;

    min-height: 0;

    flex: 0 1 auto;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 26px 32px 28px;

    scrollbar-width: thin;

    scrollbar-color: #c6d5d0 transparent;
}

.pane.active {
    display: block;
}

.pane h1 {
    margin: 0 0 7px;

    font-size: 24px;

    font-weight: 750;

    line-height: 1.2;

    color: #07558c;
}

.pane .lead {
    margin: 0 0 21px;

    font-size: 13px;

    line-height: 1.5;

    color: #526a80;
}

/* ------------------------------------------------------------
   6. FORM INPUT FIELDS
   ------------------------------------------------------------ */

.field {
    position: relative;

    display: block;

    width: 100%;

    margin-bottom: 12px;
}

.field input {
    display: block;

    width: 100%;

    height: 46px;

    border: 1px solid #d1dce4;

    border-radius: 7px;

    background: #ffffff;

    padding: 0 42px 0 44px;

    font-family: inherit;

    font-size: 13px;

    color: #263c50;

    outline: none;

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

.field input::placeholder {
    color: #788897;

    opacity: 1;
}

.field input:hover {
    border-color: #a8c3ba;
}

.field input:focus {
    border-color: #13875a;

    box-shadow:
        0 0 0 3px rgba(19,135,90,0.10);
}

/* Input icons */

.field .ico {
    position: absolute;

    left: 15px;
    top: 50%;

    transform: translateY(-50%);

    width: 18px;
    height: 18px;

    display: grid;

    place-items: center;

    color: #59758b;

    font-size: 14px;

    pointer-events: none;
}

/* Show / hide password */

.field .toggle-pass {
    position: absolute;

    right: 11px;
    top: 50%;

    transform: translateY(-50%);

    border: 0;

    background: transparent;

    color: #627b92;

    cursor: pointer;

    padding: 5px;
}

.field .toggle-pass:hover {
    color: #087744;
}

/* ------------------------------------------------------------
   7. TWO-COLUMN SIGN-UP FIELDS
   ------------------------------------------------------------ */

.field-grid {
    display: grid;

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

    gap: 10px;
}

.field-grid .field {
    min-width: 0;

    margin-bottom: 0;
}

/* ------------------------------------------------------------
   8. REMEMBER ME / FORGOT PASSWORD
   ------------------------------------------------------------ */

.auth-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

    margin: 13px 0 17px;

    font-size: 12px;

    color: #365069;
}

.check {
    display: flex;

    align-items: center;

    gap: 8px;

    cursor: pointer;
}

.check input {
    width: 16px;
    height: 16px;

    margin: 0;

    accent-color: #087744;

    cursor: pointer;
}

.link-btn {
    border: 0;

    background: none;

    padding: 0;

    color: #087744;

    font-family: inherit;

    font-size: inherit;

    font-weight: 700;

    cursor: pointer;

    text-decoration: none;
}

.link-btn:hover {
    color: #065c36;

    text-decoration: underline;
}

/* ------------------------------------------------------------
   9. PRIMARY BUTTON
   ------------------------------------------------------------ */

.primary {
    display: block;

    width: 100%;

    height: 46px;

    border: 0;

    border-radius: 7px;

    background: #087c48;

    color: #ffffff;

    font-family: inherit;

    font-size: 14px;

    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 5px 12px rgba(4,126,75,0.12);

    transition:
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.primary:hover {
    background: #066d3f;

    box-shadow:
        0 6px 15px rgba(4,126,75,0.18);
}

.primary:disabled {
    opacity: 0.62;

    cursor: wait;
}

/* ------------------------------------------------------------
   10. OR DIVIDER
   ------------------------------------------------------------ */

.or {
    display: flex;

    align-items: center;

    gap: 12px;

    margin: 17px 0;

    color: #7c8c9b;

    font-size: 11px;
}

.or::before,
.or::after {
    content: "";

    height: 1px;

    background: #d6dfe5;

    flex: 1;
}

/* ------------------------------------------------------------
   11. SECONDARY BUTTON
   ------------------------------------------------------------ */

.outline {
    display: block;

    width: 100%;

    min-height: 44px;

    padding: 10px 12px;

    border: 1px solid #13805c;

    border-radius: 7px;

    background: #ffffff;

    color: #0d6c4c;

    font-family: inherit;

    font-size: 13px;

    font-weight: 750;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.outline:hover {
    background: #f0f8f3;

    border-color: #087744;
}

/* ------------------------------------------------------------
   12. APPROVAL NOTICE
   ------------------------------------------------------------ */

.notice {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin-top: 15px;

    padding: 12px 13px;

    background: #edf4f8;

    border-radius: 7px;

    color: #425e76;

    font-size: 11.5px;

    line-height: 1.5;
}

.notice-dot {
    display: grid;

    place-items: center;

    flex: none;

    width: 18px;
    height: 18px;

    border-radius: 50%;

    background: #0c6094;

    color: #ffffff;

    font-size: 11px;

    font-weight: 800;
}

/* ------------------------------------------------------------
   13. AUTHENTICATION MESSAGES
   ------------------------------------------------------------ */

.message {
    display: none;

    margin: 0 0 11px;

    padding: 10px 11px;

    border-radius: 7px;

    font-size: 11.5px;

    line-height: 1.4;
}

.message.show {
    display: block;
}

.message.error {
    background: #fdecec;

    color: #973232;

    border: 1px solid #f4cccc;
}

.message.success {
    background: #e8f5ed;

    color: #126b40;

    border: 1px solid #c9e6d4;
}

.message.info {
    background: #edf4f9;

    color: #285a78;

    border: 1px solid #d5e3ed;
}

/* ------------------------------------------------------------
   14. SIGN-UP FORM
   ------------------------------------------------------------ */

.signup-intro {
    margin-bottom: 13px !important;
}

.signup-pane .field {
    margin-bottom: 9px;
}

.signup-pane .field input {
    height: 42px;
}

.signup-pane .primary {
    margin-top: 4px;

    height: 44px;
}

.password-hint {
    margin: -2px 0 9px;

    color: #71808d;

    font-size: 10.5px;

    line-height: 1.4;
}

.small-footer {
    margin-top: 12px;

    text-align: center;

    font-size: 11px;

    color: #70808f;
}

/* ------------------------------------------------------------
   15. REGISTRATION PENDING PANEL
   ------------------------------------------------------------ */

.pending-box {
    text-align: center;

    padding: 20px 5px;
}

.pending-box .big {
    margin-bottom: 8px;

    color: #0a8252;

    font-size: 40px;
}

.pending-box h2 {
    margin: 0 0 10px;

    color: #07558c;

    font-size: 21px;
}

.pending-box p {
    margin: 0 0 20px;

    color: #526a80;

    font-size: 12px;

    line-height: 1.6;
}

/* ------------------------------------------------------------
   16. AUTHENTICATION VERIFICATION LOADER

   Retains existing session verification functionality.
   ------------------------------------------------------------ */

.loading-screen {
    position: fixed;

    inset: 0;

    display: grid;

    place-items: center;

    z-index: 50;

    background: rgba(238,246,249,0.96);
}

.loading-screen.hidden {
    display: none;
}

.spinner {
    width: 32px;
    height: 32px;

    border: 3px solid #c9d9df;

    border-top-color: #087744;

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

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

/* ------------------------------------------------------------
   17. KEYBOARD ACCESSIBILITY
   ------------------------------------------------------------ */

button:focus-visible,
input:focus-visible {
    outline: 2px solid #13875a;

    outline-offset: 2px;
}

/* ------------------------------------------------------------
   18. MEDIUM DESKTOP SCREENS
   ------------------------------------------------------------ */

@media (max-width: 1250px) {

    .auth-card {
        right: 3.5vw;

        width: clamp(390px,35vw,470px);
    }

    .pane {
        padding-left: 28px;

        padding-right: 28px;
    }

}

/* ------------------------------------------------------------
   19. SHORT DESKTOP SCREENS
   ------------------------------------------------------------ */

@media (max-height: 760px) and (min-width: 901px) {

    .auth-card {
        max-height: calc(100dvh - 24px);
    }

    .auth-tabs {
        height: 54px;
    }

    .pane {
        padding-top: 18px;

        padding-bottom: 18px;
    }

    .pane h1 {
        font-size: 21px;
    }

    .pane .lead {
        margin-bottom: 14px;
    }

    .field input {
        height: 41px;
    }

    .signup-pane .field input {
        height: 37px;
    }

    .notice {
        margin-top: 11px;

        padding: 10px 11px;
    }

}

/* ------------------------------------------------------------
   20. TABLET AND MOBILE
   ------------------------------------------------------------ */

@media (max-width: 900px) {

    body {
        overflow-x: hidden;

        overflow-y: auto;

        background-position: 38% center;

        background-attachment: scroll;
    }

    .auth-card {
        position: relative;

        top: auto;
        right: auto;

        transform: none;

        width: min(92vw,475px);

        min-width: 0;

        height: auto;

        min-height: 0;

        max-height: none;

        margin: 4vh auto;
    }

    .pane {
        overflow: visible;
    }

}

/* ------------------------------------------------------------
   21. SMALL MOBILE SCREENS
   ------------------------------------------------------------ */

@media (max-width: 520px) {

    .auth-card {
        width: 94vw;

        margin: 3vh auto;

        border-radius: 14px;
    }

    .auth-tabs {
        height: 56px;
    }

    .auth-tab {
        font-size: 13px;
    }

    .pane {
        padding: 22px 19px;
    }

    .pane h1 {
        font-size: 22px;
    }

    .field-grid {
        grid-template-columns: 1fr;

        gap: 0;
    }

    .field-grid .field {
        margin-bottom: 9px;
    }

    .auth-row {
        gap: 8px;
    }

}

/* ------------------------------------------------------------
   22. REDUCED MOTION
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;

        animation-duration: 0.01ms !important;
    }

}
