body {
    font-family: Calibri, Arial, Helvetica, sans-serif;
    background-color: #fff8eb;
    margin: 0;
    padding: 0;
    color: rgb(26, 109, 134);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
}

h1 {
    color: #1f99be;
    text-align: left;
    font-size: 2.2em;
    font-weight: bold;
    margin: 18px 0 18px 18px;
    flex-shrink: 0;
}

.container-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
    padding: 20px 0 85px;
}

.container {
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    background: #faf2e3;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 0 auto;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 350px;
    margin: 0 auto;
}

.form-group {
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

    .form-group label {
        flex: 0 0 100px;
        text-align: left;
        margin-right: 18px;
        color: #176d8a;
    }

    .form-group input {
        flex: 1;
        padding: 6px;
        border: 1.5px solid #176d8a;
        color: #176d8a;
        text-align: left;
        box-sizing: border-box;
    }

.button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
}

button[type="submit"],
.signup-btn {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
}

button[type="submit"] {
    font-size: 1.1em;
    padding: 10px;
    background-color: #1f99be;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(31,153,190,0.15);
    transition: background 0.2s;
}

    button[type="submit"]:hover {
        background-color: #176d8a;
    }

.signup-btn {
    font-size: 1.1em;
    padding: 10px;
    background-color: #fff;
    color: #1f99be;
    border: 2px solid #1f99be;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s, color 0.2s;
}

    .signup-btn:hover {
        background-color: #1f99be;
        color: #fff;
    }

.container h2 { text-align: center; }

.main-logo {
    height: 1.2em;
    vertical-align: middle;
    margin-right: 10px;
}

@media (max-width: 600px) {
    body {
        padding: 6px;
    }

    .container-wrapper {
        padding: 10px 0 85px;
    }

    .container {
        padding: 20px 15px;
        border-radius: 7px;
    }

    h1 {
        font-size: 1.3em;
        margin: 8px 0 8px 8px;
    }

    h2 {
        font-size: 1.05em !important;
        margin-bottom: 14px !important;
    }

    form {
        max-width: 98%;
    }

    .form-group label {
        flex: 0 0 80px;
        font-size: 0.98em;
        margin-right: 8px;
    }

    .form-group input {
        font-size: 0.98em;
        padding: 5px;
    }

    button[type="submit"], .signup-btn {
        width: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
        font-size: 0.98em;
        padding: 8px;
    }

    .button-container {
        gap: 6px;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .container p, .container a {
        font-size: 0.98em !important;
    }

    .footer-logo {
        height: 40px !important;
    }

    .footer {
        padding: 12px 8px 12px 8px !important;
    }
}

@media (max-width: 900px) and (min-width: 601px) {
    body {
        padding-bottom: 0;
    }

    .container-wrapper {
        padding: 10px 0 85px;
    }

    .container {
        padding: 25px;
        border-radius: 10px;
        max-width: 90%;
    }

    h1 {
        font-size: 1.7em;
        margin: 12px 0 12px 12px;
    }

    h2 {
        font-size: 1.2em !important;
        margin-bottom: 18px !important;
    }

    form {
        max-width: 90%;
    }

    .form-group label {
        flex: 0 0 90px;
        font-size: 1em;
        margin-right: 12px;
    }

    .form-group input {
        font-size: 1em;
        padding: 6px;
    }

    button[type="submit"], .signup-btn {
        width: 145px;
        min-width: 145px;
        max-width: 145px;
        font-size: 1em;
        padding: 9px;
    }

    .button-container {
        gap: 8px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .container p, .container a {
        font-size: 1em !important;
    }

    .footer-logo {
        height: 45px !important;
    }

    .footer {
        padding: 12px 12px 12px 12px !important;
    }
}

/* Fixed Footer Styling */
.footer {
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #faf2e3;
    padding: 15px 18px 15px 18px;
    border-top: 1.5px solid #1f99be;
    font-size: 1em;
    color: #176d8a;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

.footer-left {
    flex: 1;
    text-align: left;
    position: relative;
    z-index: 1001;
    padding-left: 18px;
}

.footer-center {
    flex: 2;
    text-align: center;
    font-size: 0.98em;
    position: relative;
    z-index: 1001;
}

.footer-right {
    flex: 1;
    text-align: right;
    padding-right: 18px;
}

/* Footer Logo Styling */
.footer-logo {
    height: 85px;
    width: auto;
    border-radius: 6px;
    border: 1.5px solid #1f99be;
    position: absolute;
    right: 18px;
    bottom: 10px;
    z-index: 1002;
    background-color: #faf2e3;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

@media (max-width: 900px) and (min-width: 601px) {
    .footer-logo {
        height: 70px;
        bottom: 8px;
    }
}

@media (max-width: 600px) {
    .footer-logo {
        height: 60px;
        bottom: 7px;
    }
}

.footer-left a {
    color: #1f99be;
    text-decoration: none;
    font-weight: bold;
}

    .footer-left a:hover {
        text-decoration: underline;
    }

.footer-separator {
    color: #1f99be;
    margin: 0 8px;
    font-weight: 400;
    opacity: 0.6;
}

/* Align with markup: remove inline styles */
.main-logo { height: 1.2em; vertical-align: middle; margin-right: 10px; }
.container h2 { text-align: center; }

/* Replace inline containers */
.form-inline-right {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 10px;
}
.form-inline-right label { margin-left: 8px; }

.link-right { width: 100%; text-align: right; margin-bottom: 18px; }

/* Accessible error text */
.error-text {
    color: #ED1E4D;
    text-align: center;
    text-decoration: underline;
    font-weight: bold;
    font-style: italic;
}

/* Keyboard focus hints */
button[type="submit"]:focus,
.signup-btn:focus,
.footer-left a:focus { outline: 2px solid #1f99be; outline-offset: 2px; }
/* Forgot link: match "Remember me" color, always underlined and italic */
.forgot-link,
.forgot-link:visited,
.forgot-link:hover,
.forgot-link:active {
    color: inherit;           /* same as "Remember me" label */
    text-decoration: underline;
    font-style: italic;
    font-weight: normal;
}

/* Checkbox accent color override */
#rememberMe { accent-color:#cc0000; }

/* Active session warning */
.session-warning {
    background: #fff3cd;
    border: 1.5px solid #e0a800;
    border-radius: 5px;
    padding: 16px 20px;
    margin: 12px 0;
    text-align: center;
    color: #856404;
}
.session-warning p { margin: 6px 0; font-size: 0.95em; }
.session-warning strong { color: #856404; }
.force-login-btn {
    font-size: 1em;
    padding: 10px 24px;
    background-color: #e0a800;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 8px;
    transition: background 0.2s;
}
.force-login-btn:hover { background-color: #c69500; }
.force-login-btn:focus { outline: 2px solid #856404; outline-offset: 2px; }
