:root {
    --primary-color: #4a90e2; --primary-start: #6a11cb; --primary-end: #2575fc;
    --danger-color: #e94b3c; --success-color: #28a745;
    --text-primary: #ffffff; --text-secondary: #d1d1d1;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body { background: url("../photos/Municipal Hall.jpg") no-repeat center center/cover; min-height: 100vh; display: flex; justify-content: center; align-items: center; position: relative; padding: 2rem 1rem; }
body::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); }
.form-container { position: relative; background: rgba(40, 40, 40, 0.75); backdrop-filter: blur(15px); padding: 2.5rem; border-radius: 1rem; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); width: 100%; max-width: 600px; color: var(--text-primary); }
.logo { width: 80px; height: 80px; display: block; margin: 0 auto 1rem; }
h2 { text-align: center; margin-bottom: 1.5rem; font-size: 1.8rem; font-weight: 600; }

.alert { padding: 0.8rem 1rem; border-radius: 0.5rem; margin-bottom: 1rem; font-size: 0.9rem; text-align: left; }
.alert-danger { background: rgba(233, 75, 60, 0.2); color: #ffacac; border: 1px solid var(--danger-color); }
.alert-success { background: rgba(40, 167, 69, 0.2); color: #a7e9b9; border: 1px solid var(--success-color); }
.alert ul { list-style-position: inside; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { text-align: left; }
.form-group.full-width { grid-column: 1 / -1; }
label { display: block; font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.5rem; }

input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

select {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #000000;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

input:focus, select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3); }
.terms-group { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.terms-group input[type="checkbox"] { width: auto; }
.terms-group label { margin: 0; }
.terms-group a { color: var(--primary-color); text-decoration: none; }
.terms-group a:hover { text-decoration: underline; }

button { width: 100%; margin-top: 1.5rem; padding: 0.8rem; background: linear-gradient(135deg, var(--primary-start), var(--primary-end)); color: white; border: none; border-radius: 0.5rem; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
button:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }

.form-footer { margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-secondary); text-align: center; }
.form-footer a { color: var(--primary-color); text-decoration: none; font-weight: 500; }
.form-footer a:hover { text-decoration: underline; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #2a2a2a; color: var(--text-secondary); padding: 2rem; border-radius: 1rem; width: 90%; max-width: 600px; max-height: 80vh; overflow-y: auto; }
.modal h3 { color: var(--primary-color); margin-bottom: 1rem; }
.modal p { margin-bottom: 1rem; line-height: 1.6; }
.modal button { max-width: 200px; margin: 1rem auto 0 auto; display: block; }

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 2.8rem; /* leave room for the icon */
}

.password-wrapper .toggle-password {
    position: absolute;
    right: 0.9rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: color 0.2s ease;
}

.password-wrapper .toggle-password:hover {
    color: var(--text-primary);
}

@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
