﻿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;
}

.main-logo {
    height: 1.2em;
    vertical-align: middle;
    margin-right: 10px;
}

.container-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
    width: 100%;
    padding: 40px 0 100px;
    box-sizing: border-box;
}

.forgot-container {
    max-width: 500px;
    width: 90%;
    margin: 0 auto;
    background: #faf2e3;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(31,153,190,0.13);
    padding: 24px 26px 28px;
    border: 1px solid #e6d9bc;
    box-sizing: border-box;
}

.forgot-container h2 {
    text-align: center;
    color: #176d8a;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.9em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.form-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group label {
    color: #176d8a;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 1.05em;
}

.form-group input {
    padding: 9px 11px;
    border: 1.5px solid #176d8a;
    border-radius: 5px;
    color: #176d8a;
    font-size: 1em;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    border-color: #1f99be;
    box-shadow: 0 0 8px rgba(31,153,190,0.3);
    outline: none;
}

.submit-btn {
    width: 100%;
    padding: 11px 0;
    background: #1f99be;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    margin-top: 8px;
    box-shadow: 0 3px 8px rgba(31,153,190,0.25);
}

.submit-btn:hover {
    background: #176d8a;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(31,153,190,0.35);
}

.submit-btn:active { transform: translateY(0); }

.back-to-login-container {
    text-align: center;
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px dashed #c4b99b;
}

.back-to-login-link {
    color: #1f99be;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05em;
    transition: color 0.2s;
}

.back-to-login-link:hover {
    color: #176d8a;
    text-decoration: underline;
}

.message {
    color: #176d8a;
    text-align: center;
    margin-top: 18px;
    font-weight: 600;
    font-size: 0.95em;
}

/* --- Added to match SignUp styling for password rules & mismatch message --- */
#passwordMismatch,
.forgot-container .confirm-password .password-match-error,
.forgot-container p.error-text,
.forgot-container .error-text,
.forgot-container .password-match-error {
    color: #ED1E4D;
}

.password-match-error {
    font-size: 0.9em;
    display: none; /* JS toggles */
    width: 100%;
    order: 2;
    margin-top: 6px;
    margin-bottom: 0;
    text-decoration: underline;
    font-style: italic;
    font-weight: bold;
}

.form-group.confirm-password.has-error { margin-bottom: 8px; }
.form-group.confirm-password { margin-bottom: 28px; }

.password-rules {
    width: 100%;
    order: 2;
    margin: 6px 0 0 0;
    padding-left: 18px;
    font-size: 0.92em;
    color: #6b7280; /* neutral for unmet rules */
}
.password-rules li { list-style: disc; }
.password-rules li.valid { color: #3c763d; font-weight: bold; }
.password-rules li.invalid { color: #a94442; }
/* --- End added section --- */

.footer {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #faf2e3;
    padding: 12px 15px 12px 15px;
    border-top: 1.5px solid #1f99be;
    font-size: 0.95em;
    color: #176d8a;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

.footer-left, .footer-right { flex: 0 0 auto; }
.footer-center { flex: 0 0 auto; text-align: center; margin: 0 auto; }
.footer-logo {
    height: 80px;
    width: auto;
    border-radius: 6px;
    border: 1.5px solid #1f99be;
    position: absolute;
    right: 15px;
    bottom: 8px;
    z-index: 1002;
    background-color: #faf2e3;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.footer-left a {
    color: #1f99be;
    text-decoration: none;
    font-weight: bold;
}

.footer-left a:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .container-wrapper { padding: 30px 0 140px; }
    .footer { flex-direction: column; text-align: center; padding: 12px; min-height: auto; }
    .footer-center, .footer-right { width: 100%; }
    .footer-logo { position: relative; right: auto; bottom: auto; margin: 8px auto; height: 60px; }
}

@media (max-width: 600px) {
    .forgot-container { max-width: 100%; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.3em; margin: 8px 0 8px 8px; }
    .container-wrapper { padding: 20px 0 120px; }
    .forgot-container h2 { font-size: 1.5em; }
    .submit-btn { font-size: 1em; }
    .footer { flex-direction: column; padding: 10px; }
    .footer-center { font-size: 0.9em; }
    .footer-logo { height: 55px; }
}