/* ═══════════════════════════════════════════════════════════
   SILONG — Complete Stylesheet (CLEANED)
   Sans-serif (DM Sans) • Sole accent: #1e90ff (Dodger Blue)
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700;800&display=swap');

/* ───────────────────────────────────────────────
   1. FONT AWESOME PROTECTION (do not override)
─────────────────────────────────────────────── */
.fa, .fas, .far, .fal, .fad, .fab,
.fa-solid, .fa-regular, .fa-light, .fa-thin, .fa-duotone,
[class*="fa-"], [class^="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands",
                 "Font Awesome 6 Pro", "Font Awesome 5 Free",
                 "FontAwesome", sans-serif !important;
}
.fab, [class*="fab"], [class^="fab"] {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands",
                 "FontAwesome" !important;
}
.fa::before, .fas::before, .far::before, .fal::before, .fab::before,
[class*="fa-"]::before, [class^="fa-"]::before {
    font-family: inherit !important;
}

/* ───────────────────────────────────────────────
   2. RESET & BASE
─────────────────────────────────────────────── */
*, *::before, *::after {
    font-family: 'DM Sans', sans-serif !important;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html { scroll-behavior: smooth; }
body {
    background: #f0f4f1;
    color: #1e2022;
    overflow-x: hidden;
    line-height: 1.5;
}
h1, h2, h3, h4, h5 { font-weight: 700; }
a { color: inherit; text-decoration: none; }
input, select, textarea, button { font-family: 'DM Sans', sans-serif; }

/* ───────────────────────────────────────────────
   3. VARIABLES
─────────────────────────────────────────────── */
:root {
    --emerald: #1e90ff;
    --emerald-light: #87ceeb;
    --emerald-dark: #1a7ad0;
    --gold: #1e90ff;
    --gold-light: #87ceeb;
    --charcoal: #1e2022;
    --mid: #4a5568;
    --danger: #ef4444;
    --light-border: rgba(30, 144, 255, 0.14);
    --shadow-md: 0 8px 28px rgba(30, 144, 255, .12);
    --sidebar-w: 260px;
}

/* ───────────────────────────────────────────────
   4. KEYFRAMES (consolidated)
─────────────────────────────────────────────── */
@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes sealIn {
    from { opacity: 0; transform: scale(0.78) rotate(-8deg); }
    to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
@keyframes pulse {
    0%, 100% { border-color: #ef4444; }
    50%      { border-color: #1e90ff; }
}
@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50%      { transform: translate(-50%, -50%) scale(1.4); opacity: 0.8; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes talkMouth {
    0%, 100% { transform: scaleY(1); }
    30%      { transform: scaleY(1.2); }
    60%      { transform: scaleY(0.9); }
}
@keyframes bounce {
    0%, 80%, 100% { transform: scale(.6); opacity: .4; }
    40%           { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════════
   5. LOGIN PAGE
═══════════════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    background: url('../bh2.png') no-repeat center center fixed;
    background-size: 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
    gap: 24px;
}
.login-card {
    position: relative;
    z-index: 1;
    background: #fff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    max-width: 380px;
    width: 100%;
    padding: 1.8rem 1.5rem 1.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    animation: cardIn 0.7s cubic-bezier(.22,1,.36,1) both;
}
.login-card > * { position: relative; z-index: 2; }

.seal-glow {
    position: absolute;
    top: 50%; left: 50%;
    width: 10px; height: 10px;
    background: radial-gradient(circle, rgba(30,144,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: glowPulse 2s ease-in-out infinite;
    pointer-events: none;
}

.login-seal-wrap {
    display: flex; justify-content: center; margin-bottom: 1.25rem;
    animation: sealIn 0.9s 0.1s cubic-bezier(.22,1,.36,1) both;
}
.login-seal:hover {
    filter: drop-shadow(0 6px 18px rgba(30,144,255,0.75))
            drop-shadow(0 0 16px rgba(30,144,255,0.5));
}

.login-brand-icon {
    text-align: center;
    font-size: 1rem;
    color: #1e90ff;
    margin-bottom: 0.5rem;
}
.login-brand {
    text-align: center;
    margin-bottom: 1.75rem;
    animation: fadeUp 0.6s 0.25s cubic-bezier(.22,1,.36,1) both;
}
.login-brand-title {
    font-size: 2rem; font-weight: 800;
    color: #1e90ff; letter-spacing: 2px;
    line-height: 1; margin-bottom: .3rem;
}
.login-brand-title span { color: #1e90ff; }
.login-brand-sub { font-size: .8rem; color: #040404eb; line-height: 1.55; }

.login-divider {
    display: flex; align-items: center; justify-content: center;
    gap: .75rem; margin-bottom: 1.5rem;
    animation: fadeUp 0.6s 0.3s cubic-bezier(.22,1,.36,1) both;
}
.login-divider::before, .login-divider::after {
    content: ''; flex: 1; height: 1px; background: rgb(229, 234, 232);
}
.login-divider span {
    font-size: .72rem; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: #1e293b;
}
.login-divider i { color: #1e90ff; font-size: 0.85rem; }

.login-form-wrap {
    animation: fadeUp 0.6s 0.35s cubic-bezier(.22,1,.36,1) both;
}

.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon {
    position: absolute; left: 14px;
    color: #1e90ff; font-size: 0.9rem; z-index: 1;
}
.input-wrapper input { width: 100%; padding-left: 40px; padding-right: 44px; }

.toggle-password {
    position: absolute; right: 12px;
    background: none; border: none; cursor: pointer;
    color: #4a5568; font-size: 1rem; padding: 8px;
    transition: color 0.2s; z-index: 1;
}
.toggle-password:hover { color: #1e90ff; }

.login-field { margin-bottom: 1rem; }
.login-field label {
    display: block; font-size: .8rem;
    font-weight: 600; color: #1e2022; margin-bottom: .4rem;
}
.login-field input {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid rgba(30, 144, 255, .2);
    border-radius: 10px; font-size: .92rem; color: #1e2022;
    background: #fafaf9;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.login-field input:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, .1);
    background: #fff;
}
.login-field input::placeholder { color: #b0b8c1; }

.login-btn, .btn-save {
    width: 100%; padding: 13px;
    background: #1e90ff; color: #fff;
    border: none; border-radius: 10px;
    font-size: .95rem; font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    display: flex; align-items: center; justify-content: center;
    gap: 8px; margin-top: .5rem;
    position: relative; overflow: hidden;
}
.login-btn:hover, .btn-save:hover {
    background: #1a7ad0;
    transform: translateY(-1px);
}
.login-btn i { transition: transform 0.2s; }
.login-btn:hover i { transform: translateX(3px); }
.login-btn.loading { opacity: 0.7; cursor: not-allowed; }
.login-btn.loading .btn-loader {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid #fff; border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}
.btn-loader { display: none; }

.login-error {
    display: none;
    align-items: center; gap: 8px;
    background: rgba(200,50,50,.08);
    border: 1px solid rgba(200,50,50,.2);
    border-left: 3px solid #dc2626;
    color: #c03030;
    padding: .75rem 1rem; border-radius: 10px;
    font-size: .88rem; margin-bottom: 1.25rem;
}
.login-error i { font-size: 1rem; }
.login-success {
    display: none;
    background: rgba(30, 144, 255, .08);
    border: 1px solid rgba(30, 144, 255, .2);
    color: #1e90ff;
    padding: .75rem 1rem; border-radius: 10px;
    font-size: .88rem; margin-bottom: 1.25rem;
}

.login-footer {
    text-align: center; margin-top: 1.25rem; padding-top: 1.1rem;
    border-top: 1px solid rgba(250, 252, 251, 0.12);
    animation: fadeUp 0.6s 0.45s cubic-bezier(.22,1,.36,1) both;
}
.login-footer p { font-size: .83rem; color: #1e293b; }
.login-footer p i { margin-right: 6px; color: #1e90ff; font-size: 0.7rem; }
.login-footer a { color: #1e90ff; font-weight: 700; }
.login-footer small { font-size: .7rem; color: #f9f6f6; display: block; margin-top: .2rem; }
.login-footer small i { margin-right: 4px; }

.login-hint { margin-top: 1.25rem; font-size: .82rem; color: #4a5568; line-height: 1.7; }
.login-hint strong { color: #1e2022; }
.btn.btn-outline {
    display: inline-block; padding: 9px 20px;
    border: 1.5px solid #1e90ff; color: #1e90ff;
    border-radius: 8px; font-size: .85rem; font-weight: 600;
    transition: background .2s, color .2s;
}
.btn.btn-outline:hover { background: #1e90ff; color: #fff; }
/* ═══════════════════════════════════════════
   DEFAULT (desktop) — original background
═══════════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    background: url('../bh2.png') no-repeat center center fixed;
    background-size: 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
    gap: 24px;
}

/* ═══════════════════════════════════════════
   MOBILE (≤ 768px) — DIFFERENT background
═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .login-page {
        background: url('../bh3.png') no-repeat center center fixed !important;
        background-size: cover !important;
        padding: 1rem 0.75rem !important;
    }
}

/* ═══════════════════════════════════════════
   SMALL PHONE (≤ 480px) — same mobile bg + compact card
═══════════════════════════════════════════ */
@media (max-width: 480px) {
    .login-page {
        background: url('../bh3.png') no-repeat center center fixed !important;
        background-size: cover !important;
        padding: 0.75rem 0.5rem !important;
    }
}

/* Character bubble / Marites mascot */
.char-bubble {
    display: flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #fff, #f0f8ff);
    border: 2px solid #1e90ff;
    border-radius: 30px; padding: 6px 14px;
    font-size: 12px; font-weight: 600;
    color: #1a7ad0; white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.char-bubble i { font-size: 10px; color: #1e90ff; }
.char-bubble .bubble-emoji { font-size: 14px; }

.mouth-group {
    animation: talkMouth 0.8s ease-in-out infinite;
    transform-origin: center 145px;
}
.marites-figure {
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.marites-figure:hover { transform: scale(1.03); }

/* ═══════════════════════════════════════════════
   6. FORGOT PASSWORD PAGE
═══════════════════════════════════════════════ */
body.forgot-page {
    background: url('../bh2.png') no-repeat center center fixed;
    min-height: 100vh;
    background-size: cover;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
    margin: 0;
}
body.forgot-page::before {
    content: '';
    position: absolute; inset: 0;
    opacity: .04;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 60px,
            rgba(255,255,255,.5) 60px, rgba(255,255,255,.5) 61px),
        repeating-linear-gradient(90deg, transparent, transparent 60px,
            rgba(255,255,255,.5) 60px, rgba(255,255,255,.5) 61px);
    pointer-events: none;
}
body.forgot-page::after {
    content: '';
    position: absolute; width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30,144,255,0.12) 0%, transparent 70%);
    top: -80px; right: -80px;
    pointer-events: none;
}

.forgot-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    width: 100%; max-width: 420px;
    padding: 2.5rem 2rem 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative; z-index: 1;
    animation: cardIn 0.7s cubic-bezier(.22,1,.36,1) both;
}
.forgot-card > * { position: relative; z-index: 1; }

.forgot-icon-wrap {
    display: flex; justify-content: center; margin-bottom: 1.25rem;
    animation: sealIn 0.9s 0.1s cubic-bezier(.22,1,.36,1) both;
}
.forgot-icon-circle {
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(30,144,255,0.15);
    border: 2px solid rgba(30,144,255,0.35);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #1e90ff;
    animation: float 3s ease-in-out infinite;
}
.forgot-brand {
    text-align: center; margin-bottom: 1.75rem;
    animation: fadeUp 0.6s 0.25s cubic-bezier(.22,1,.36,1) both;
}
.forgot-brand-title {
    font-size: 1.6rem; font-weight: 800;
    color: #fff; letter-spacing: 1.5px;
    line-height: 1; margin-bottom: .3rem;
}
.forgot-brand-title span { color: #1e90ff; }
.forgot-brand-sub {
    font-size: .82rem;
    color: rgba(233,235,239,0.85);
    line-height: 1.55;
}
.forgot-form-wrap {
    animation: fadeUp 0.6s 0.35s cubic-bezier(.22,1,.36,1) both;
}
.forgot-field { margin-bottom: 1rem; }
.forgot-field label {
    display: block; font-size: .8rem; font-weight: 600;
    color: #fff; margin-bottom: .4rem;
}
.forgot-field label i { margin-right: 6px; color: #1e90ff; }
.forgot-field input {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid rgba(255,255,255,.3);
    border-radius: 10px; font-size: .92rem;
    color: #1e2022; background: rgba(255,255,255,0.9);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.forgot-field input:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 0 3px rgba(30,144,255,.2);
    background: #fff;
}
.forgot-field input::placeholder { color: #b0b8c1; }

.forgot-btn {
    width: 100%; padding: 13px;
    background: linear-gradient(135deg, #1e90ff, #1a7ad0);
    color: #fff; border: none; border-radius: 10px;
    font-size: .95rem; font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    display: flex; align-items: center; justify-content: center;
    gap: 8px; margin-top: .5rem;
}
.forgot-btn:hover {
    background: linear-gradient(135deg, #1a7ad0, #0f5ca0);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(30,144,255,0.4);
}
.forgot-divider {
    display: flex; align-items: center; gap: .75rem;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.6s 0.3s cubic-bezier(.22,1,.36,1) both;
}
.forgot-divider::before, .forgot-divider::after {
    content: ''; flex: 1; height: 1px;
    background: rgba(255,255,255,0.2);
}
.forgot-divider span {
    font-size: .72rem; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}
.forgot-message {
    padding: .75rem 1rem; border-radius: 10px;
    font-size: .88rem; margin-bottom: 1.25rem;
    display: flex; align-items: center; gap: .5rem;
}
.forgot-message.success {
    background: rgba(30, 144, 255, .15);
    border: 1px solid rgba(30, 144, 255, .3);
    color: #a7f3d0;
}
.forgot-message.error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fecaca;
}
.forgot-footer {
    text-align: center;
    margin-top: 1.25rem; padding-top: 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    animation: fadeUp 0.6s 0.45s cubic-bezier(.22,1,.36,1) both;
}
.forgot-footer a {
    font-size: .83rem; color: #87ceeb;
    font-weight: 600; transition: color .2s;
}
.forgot-footer a:hover { color: #fff; }
.forgot-footer a i { margin-right: 5px; }

/* ═══════════════════════════════════════════════
   7. REGISTER PAGE
═══════════════════════════════════════════════ */
body.register-page {
    min-height: 100vh;
    background: url('../bh2.png') no-repeat center center fixed;
    background-size: 100% 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}
body.register-page::before {
    content: '';
    position: fixed; inset: 0;
    opacity: .04;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 60px,
            rgba(255,255,255,.5) 60px, rgba(255,255,255,.5) 61px),
        repeating-linear-gradient(90deg, transparent, transparent 60px,
            rgba(255,255,255,.5) 60px, rgba(255,255,255,.5) 61px);
    pointer-events: none; z-index: 0;
}
body.register-page::after {
    content: '';
    position: fixed; width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30,144,255,0.1) 0%, transparent 70%);
    top: -100px; right: -100px;
    pointer-events: none; z-index: 0;
}

.register-container,
.register-card {
    background: #ffffffb5;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    padding: 1.8rem 1.5rem 1.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 1;
    max-height: 90vh;
    overflow-y: auto;
    animation: cardIn 0.7s cubic-bezier(.22,1,.36,1) both;
}

.register-header-strip {
    text-align: center;
    margin-bottom: 1.2rem;
    background: none;
    padding: 0;
    border-bottom: none;
    display: block;
}
.register-header-strip .reg-logo-icon { display: none; }
.register-header-strip .reg-header-text h2 {
    font-size: 1.6rem; font-weight: 800;
    color: #1e90ff; letter-spacing: 1.5px;
    margin-bottom: 0.3rem;
}
.register-header-strip .reg-header-text h2 span { color: #1e90ff; }
.register-header-strip .reg-header-text p {
    font-size: 0.7rem;
    color: rgb(30, 32, 34);
    line-height: 1.4;
}

.register-form-body {
    background: transparent;
    backdrop-filter: none;
    padding: 0;
    margin-left: 1.2rem;
    margin-right: 1.2rem;
}

.section-divider {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.6);
    margin: 1rem 0 0.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.section-divider i { margin-right: 6px; color: #1e90ff; }

.form-row,
.form-row-3 {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 0;
}
.form-row   { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

.register-form-body .form-group { margin-bottom: 0.6rem; }
.register-form-body .form-group label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.15rem;
}
.register-form-body .form-group label i {
    margin-right: 6px; color: #1e90ff;
}
.register-form-body .form-group input,
.register-form-body .form-group select,
.register-form-body .form-group textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid rgba(30,144,255,0.3);
    border-radius: 8px;
    font-size: 0.78rem;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.register-form-body .form-group input:focus,
.register-form-body .form-group select:focus,
.register-form-body .form-group textarea:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 0 3px rgba(30,144,255,0.2);
    background: #ffffff;
}
.register-form-body .form-group input::placeholder { color: #b0b8c1; }
.register-form-body .form-group textarea {
    resize: vertical; min-height: 50px;
}

.register-form-body .checkbox-group {
    display: flex; flex-wrap: wrap;
    gap: 0.6rem; margin-top: 0.3rem;
}
.register-form-body .checkbox-group label {
    display: flex; align-items: center;
    gap: 5px; font-weight: 400;
    font-size: 0.7rem; cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
}
.register-form-body .checkbox-group input[type="checkbox"] {
    width: auto; padding: 0;
    border: none; box-shadow: none;
    cursor: pointer;
    accent-color: #1e90ff;
    background: rgba(255, 255, 255, 0.9);
}

.required { color: #ef4444; }
.required-text {
    color: #ef4444; font-size: 0.6rem;
    margin-top: 3px; font-weight: bold;
}

.btn-register-submit {
    width: 100%; padding: 9px;
    background: linear-gradient(135deg, #1e90ff, #7ba6d1);
    color: #fff; border: none; border-radius: 8px;
    font-size: 0.85rem; font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    gap: 8px; margin-top: 0.8rem;
}
.btn-register-submit:hover {
    background: linear-gradient(135deg, #1a7ad0, #4db8ff);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 144, 255, 0.4);
}

.register-form-body .error-message {
    background: rgba(220, 38, 38, 0.15);
    border-left: 3px solid #ef4444;
    color: #fecaca;
    padding: 0.6rem 0.8rem; border-radius: 8px;
    font-size: 0.78rem; margin-bottom: 0.8rem;
    display: flex; align-items: flex-start; gap: 0.5rem;
}
.register-form-body .success-message {
    background: rgba(30, 144, 255, 0.15);
    border-left: 3px solid #1e90ff;
    color: #a7f3d0;
    padding: 0.6rem 0.8rem; border-radius: 8px;
    font-size: 0.78rem; margin-bottom: 0.8rem;
    display: flex; align-items: flex-start; gap: 0.5rem;
}

.register-form-body .login-link,
.login-link {
    text-align: center;
    margin-top: 1rem; padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
}
.register-form-body .login-link a,
.login-link a {
    color: #1e90ff; font-weight: 700;
}
.register-form-body .login-link a:hover,
.login-link a:hover {
    color: #fff; text-decoration: underline;
}

.register-footer {
    text-align: center;
    margin-top: 0.8rem; padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.register-footer a {
    font-size: 0.7rem; color: #87ceeb;
    font-weight: 600;
}
.register-footer a:hover { color: #fff; }

/* Photo upload */
.photo-upload {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #ffffff2e;
    margin: 0 50px 0.6rem;
}
.photo-upload:hover {
    border-color: #1e90ff;
    background: rgba(30,144,255,0.1);
}
.photo-upload.required-border {
    border-color: #ef4444;
    animation: pulse 1.5s infinite;
}
.photo-preview {
    width: 80px; height: 80px;
    border-radius: 50%; object-fit: cover;
    margin: 0 auto 0.5rem;
    display: none;
    border: 2px solid #1e90ff;
}
.photo-placeholder {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════
   8. DASHBOARD LAYOUT
═══════════════════════════════════════════════ */
body.db-body {
    background: #c7cacdbd;
    min-height: 100vh;
    background-size: 100% 100%;
}

.db-sidebar {
    width: var(--sidebar-w);
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    background: linear-gradient(180deg, #e6eef573 0%, #1e90ffe0 50%, #b1daff 100%);
    display: flex; flex-direction: column;
    z-index: 100; overflow-y: auto;
}
.db-sidebar-logo {
    padding: 1.4rem 1.25rem;
    display: flex; align-items: center; gap: .75rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}
.sidebar-logo-icon {
    width: 36px; height: 36px;
    background: #1e90ff; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 800; color: #fff;
    flex-shrink: 0;
}
.sidebar-logo-title {
    font-size: 1rem; font-weight: 800;
    color: #1e90ff; letter-spacing: 1px;
}
.sidebar-logo-sub { font-size: .78rem; color: rgb(12, 12, 12); }

.db-nav { flex: 1; padding: .75rem 0; }
.db-nav-section {
    padding: .6rem 1.25rem .25rem;
    font-size: .63rem; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    color: rgba(15, 15, 15, 0.904);
}
.db-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 1.25rem;
    font-size: .86rem; color: rgb(15, 15, 15);
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
    cursor: pointer;
}
.db-nav-item:hover {
    background: rgba(255,255,255,.07);
    color: #0f0f0fa9;
}
.db-nav-item.active {
    background: rgba(30,144,255,.12);
    color: #1e90ff;
    border-left-color: #1e90ff;
}
.nav-icon {
    font-size: .95rem;
    width: 20px; text-align: center;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.nav-badge-red {
    margin-left: auto;
    background: #e74c3c; color: #0f0f0fad;
    border-radius: 100px;
    font-size: .65rem; font-weight: 800;
    padding: 2px 7px; min-width: 20px; text-align: center;
}
.nav-badge-gold {
    margin-left: auto;
    background: #1e90ff; color: #fff;
    border-radius: 100px;
    font-size: .65rem; font-weight: 800;
    padding: 2px 7px; min-width: 20px; text-align: center;
}
.db-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(8, 8, 8, 0.747);
    flex-shrink: 0;
}
.db-user-chip {
    display: flex; align-items: center;
    gap: .6rem; margin-bottom: .6rem;
}
.db-user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #1e90ff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; font-size: .9rem;
    flex-shrink: 0;
}
.db-user-name { font-size: .83rem; font-weight: 600; color: #101010; }
.db-user-role { font-size: .7rem; color: rgba(10, 9, 9, 0.4); }
.db-logout {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px; border-radius: 8px;
    font-size: .82rem; color: rgb(6, 5, 5);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.db-logout:hover {
    background: rgba(255,50,50,.12);
    color: #ff8080;
}

.db-main {
    margin-left: var(--sidebar-w);
    display: flex; flex-direction: column;
    min-height: 100vh;
}
.db-page { padding: 1.75rem 2rem; flex: 1; }

/* Topbar */
.db-topbar {
    position: sticky; top: 0;
    z-index: 1000;
    background: #ffffff0a;
    border-bottom: 1px solid rgba(30, 144, 255, .14);
    padding: 0 2rem; height: 62px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.db-topbar-left { display: flex; align-items: center; gap: .6rem; }
.db-topbar-right {
    display: flex; align-items: center;
    gap: 1.25rem; font-size: .85rem; color: #4a5568;
}
.db-topbar-title { font-size: 1.2rem; font-weight: 700; color: #1e90ff; }

.topbar-date {
    display: flex; align-items: center; gap: 6px;
    background: rgba(30, 144, 255, .08);
    padding: 5px 12px; border-radius: 20px;
    font-size: .8rem; font-weight: 500; color: #1e90ff;
}
.topbar-date i { font-size: .75rem; color: #1e90ff; }

.topbar-notif-link {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: rgba(30, 144, 255, .08);
    border-radius: 50%;
    transition: all 0.2s; color: #1e90ff;
}
.topbar-notif-link:hover {
    background: rgba(30, 144, 255, .15);
    transform: scale(1.05);
}
.topbar-notif-link i { font-size: 1.1rem; }
.topbar-notif-badge {
    position: absolute; top: -2px; right: -2px;
    background: #e74c3c; color: #fff;
    border-radius: 50%;
    width: 18px; height: 18px;
    font-size: .6rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.topbar-user {
    display: flex; align-items: center;
    gap: 6px; font-weight: 500; color: #1e2022;
}
.topbar-user i { font-size: .9rem; color: #1e90ff; }
.topbar-role-badge {
    display: flex; align-items: center; gap: 6px;
    background: rgba(30, 144, 255, .1);
    color: #1e90ff;
    padding: 4px 12px; border-radius: 100px;
    font-size: .7rem; font-weight: 600;
}
.topbar-role-badge i { font-size: .7rem; }

/* Hamburger + Overlay */
.hamburger-btn {
    display: none;
    background: none; border: none; cursor: pointer;
    color: #1e90ff; font-size: 1.2rem;
    padding: 6px 10px; border-radius: 8px;
    transition: background .2s;
    flex-shrink: 0;
}
.hamburger-btn:hover { background: rgba(30, 144, 255, .1); }
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ═══════════════════════════════════════════════
   9. KPI CARDS & WELCOME BANNER
═══════════════════════════════════════════════ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem; margin-bottom: 1.75rem;
}
.kpi-card {
    border: none;
    border-radius: 20px;
    padding: 1.5rem;
    position: relative; overflow: hidden;
    transition: box-shadow .22s ease, transform .22s ease;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 8px 24px rgba(59,130,246,.35);
}
.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(59,130,246,.48);
}
.kpi-card--blue   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.kpi-card--green  { background: linear-gradient(135deg, #1e90ff, #1a7ad0);
                    box-shadow: 0 8px 24px rgba(30,144,255,.35); }
.kpi-card--green:hover { box-shadow: 0 14px 32px rgba(30,144,255,.48); }
.kpi-card--orange { background: linear-gradient(135deg, #2563eb, #1a7ad0);
                    box-shadow: 0 8px 24px rgba(37,99,235,.35); }
.kpi-card--orange:hover { box-shadow: 0 14px 32px rgba(37,99,235,.48); }
.kpi-card--purple { background: linear-gradient(135deg, #1a7ad0, #0f5ca0);
                    box-shadow: 0 8px 24px rgba(26,122,208,.35); }
.kpi-card--purple:hover { box-shadow: 0 14px 32px rgba(26,122,208,.48); }
.kpi-card--warn   { background: linear-gradient(135deg, #1a7ad0, #0f5ca0) !important;}

.kpi-card-link {
    display: block;
    transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.kpi-card-link:hover { transform: translateY(-5px); }
.kpi-card-link .kpi-card { height: 100%; }

.kpi-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.6rem; height: 2.6rem;
    border-radius: 14px;
    font-size: 1.2rem !important;
    margin-bottom: .75rem !important;
    background: rgba(255,255,255,.2);
    color: #fff !important;
}
.kpi-icon i { font-size: 1.2rem; color: #fff; }
.kpi-card--warn .kpi-icon i { color: #fff; }
.kpi-label {
    font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    color: rgba(255,255,255,.8) !important;
    margin-bottom: .3rem;
}
.kpi-value {
    font-size: 2rem; font-weight: 800;
    color: #fff !important; line-height: 1;
}
.kpi-sub {
    font-size: .76rem;
    color: rgba(255,255,255,.7) !important;
    margin-top: .3rem;
}
.kpi-sub i { font-size: .65rem; margin-right: 3px; }

.welcome-banner {
    position: relative; overflow: hidden;
    background: #1e90ff;
    border-radius: 24px;
    padding: 1.8rem 2rem;
    margin-bottom: 1.75rem;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
    color: #fff;
    box-shadow: 0 15px 35px rgba(30,144,255,0.3);
    transition: transform .3s ease, box-shadow .3s ease;
}

/* ✅ NEW: inner wrapper for semantic-HTML welcome banners (e.g., aid.php) */
.welcome-banner-inner {
    display: block;
    width: 100%;
    color: #ffffff;
    text-align: left;
}

/* ═══════════════════════════════════════════════
   10. CARDS / TABLES / BADGES
═══════════════════════════════════════════════ */
.db-card {
    background: #fff;
    border: none; border-radius: 20px;
    overflow: hidden; margin-bottom: 1.25rem;
    box-shadow: 0 4px 15px rgba(0,0,0,.05);
    transition: all .3s ease;
}
.db-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,.1);
    transform: translateY(-2px);
}
.db-card-head {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid rgba(30,144,255,.1);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: .5rem;
    background: linear-gradient(135deg, #f0f8ff 0%, #fff 100%);
}
.db-card-title {
    font-weight: 700; font-size: .95rem; color: #1e90ff;
}
.db-card-title i { margin-right: 8px; color: #1e90ff; }
.db-card-head i { margin-right: 6px; color: #fff; }
.db-card-link {
    font-size: .82rem; color: #1e90ff;
    font-weight: 600; transition: all .2s;
}
.db-card-link:hover { color: #1a7ad0; }
.db-card-link i {
    font-size: .7rem; margin-left: 4px;
    transition: transform .2s;
}
.db-card-link:hover i { transform: translateX(3px); }
.db-card-body { padding: 1.25rem 1.5rem; }
.db-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* Tables */
.db-table {
    width: 100%; border-collapse: collapse;
}
.db-table th {
    text-align: left;
    font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    color: #6b7280;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.db-table th i {
    margin-right: 5px; font-size: .7rem; color: #1e90ff;
}
.db-table td {
    padding: 12px 16px;
    font-size: .85rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.db-table tr:last-child td { border-bottom: none; }
.db-table tr:hover td { background: rgba(30,144,255,.03); }
.td-num { color: #4a5568; font-size: .8rem; }
.td-sub {
    display: block;
    font-size: .76rem; color: #4a5568;
    margin-top: .1rem;
}
.td-sub i { font-size: .65rem; margin-right: 3px; }
.empty-cell {
    text-align: center;
    color: #4a5568;
    padding: 2.5rem !important;
    font-size: .9rem;
}
.empty-cell a { color: #1e90ff; font-weight: 600; }
.empty-cell i { color: #4a5568; margin-right: 8px; font-size: 1rem; }
.count-badge {
    display: inline-block;
    background: rgba(30,144,255,.1);
    color: #1a7ad0;
    border-radius: 100px;
    padding: 2px 10px;
    font-size: .75rem; font-weight: 700;
    margin-left: .4rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: .72rem; font-weight: 700;
}
.badge i { margin-right: 4px; font-size: .65rem; }
.badge-distributed, .badge-active { background: rgba(30,144,255,.1); color: #1e90ff; }
.badge-approved    { background: rgba(59,130,246,.1); color: #1e40af; }
.badge-pending     { background: rgba(30,144,255,.12); color: #1a7ad0; }
.badge-cancelled, .badge-inactive, .badge-rejected, .badge-suspended {
    background: rgba(200,50,50,.08); color: #c03030;
}
.badge-priority-high   { background: rgba(200,50,50,.1); color: #c03030; }
.badge-priority-medium { background: rgba(30,144,255,.12); color: #1a7ad0; }
.badge-priority-low    { background: rgba(30,144,255,.1); color: #1e90ff; }
.badge-priority-high i, .badge-priority-medium i, .badge-priority-low i {
    margin-right: 4px;
}
.badge-head-admin  { background: #f0f8ff; color: #1e90ff; border: 1px solid #87ceeb; }
.badge-role-admin,
.badge-role-staff,
.badge-role-resident { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ═══════════════════════════════════════════════
   11. TOOLBAR / FORMS / MODALS
═══════════════════════════════════════════════ */
.page-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.filter-bar {
    display: flex; gap: .6rem; flex-wrap: wrap;
    align-items: center; flex: 1;
}
.filter-input {
    padding: 9px 14px 9px 36px;
    border: 1.5px solid rgba(30, 144, 255, .14);
    border-radius: 10px;
    font-size: .88rem; background: #fff;
    outline: none; min-width: 200px;
    transition: border-color .2s;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%234a5568"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 16px;
}
.filter-input:focus { border-color: #1e90ff; }
.filter-input-icon { position: relative; }
.filter-input-icon i {
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%);
    color: #4a5568; font-size: .85rem;
}
.filter-input-icon input { padding-left: 36px; }

.filter-select {
    padding: 9px 12px;
    border: 1.5px solid rgba(30, 144, 255, .14);
    border-radius: 10px;
    font-size: .88rem; background: #fff;
    outline: none; cursor: pointer;
}
.filter-select:focus { border-color: #1e90ff; }

.btn-filter {
    padding: 9px 18px;
    background: #1e90ff; color: #fff;
    border: none; border-radius: 10px;
    font-size: .88rem; font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-filter:hover { background: #1a7ad0; }
.btn-reset {
    padding: 9px 14px;
    background: #f0f0ee; color: #4a5568;
    border: none; border-radius: 10px;
    font-size: .88rem; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-add {
    padding: 9px 20px;
    background: #1e90ff; color: #fff;
    border: none; border-radius: 10px;
    font-size: .88rem; font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-add:hover { background: #1a7ad0; }
.btn-filter i, .btn-reset i, .btn-add i { margin-right: 6px; }

/* Action buttons */
.action-btns {
    display: flex; gap: 5px;
    align-items: center; flex-wrap: wrap;
}
.btn-sm {
    padding: 5px 10px;
    border-radius: 7px;
    font-size: .78rem; font-weight: 600;
    border: none; cursor: pointer;
    transition: background .15s;
}
.btn-sm i { font-size: .85rem; }
.btn-sm-edit { background: rgba(30,144,255,.1); color: #1e90ff; }
.btn-sm-edit:hover { background: rgba(30,144,255,.2); }
.btn-sm-view { background: rgba(59,130,246,.1); color: #1e40af; }
.btn-sm-view:hover { background: rgba(59,130,246,.2); }
.btn-sm-del  { background: rgba(200,50,50,.08); color: #c03030; }
.btn-sm-del:hover { background: rgba(200,50,50,.18); }

/* Form page */
.form-page-head { margin-bottom: 1.5rem; }
.back-link {
    font-size: .85rem; color: #1e90ff; font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; cursor: pointer;
    margin-bottom: 1rem;
}
.back-link:hover { text-decoration: underline; }
.form-page-title {
    font-size: 1.4rem; font-weight: 800;
    color: #1e90ff; margin-top: .4rem;
}

.res-form { padding: 1.75rem; }
.form-section-title {
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    color: #4a5568;
    margin: .25rem 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(30, 144, 255, .14);
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: .8rem; font-weight: 600;
    color: #1e2022; margin-bottom: .4rem;
}
.form-group input,
.form-group select,
.form-group textarea,
.res-form input,
.res-form select,
.res-form textarea,
.modal-form input,
.modal-form select,
.modal-form textarea {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid rgba(30, 144, 255, .2);
    border-radius: 10px;
    font-size: .92rem; color: #1e2022;
    background: #fafaf9;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.res-form input:focus,
.res-form select:focus,
.res-form textarea:focus,
.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, .1);
    background: #fff;
}
.form-group input::placeholder,
.res-form input::placeholder,
.modal-form input::placeholder { color: #b0b8c1; }
.form-group textarea { resize: vertical; min-height: 80px; }

.checkbox-group {
    display: flex; flex-direction: column;
    gap: .4rem; margin-top: .3rem;
}
.checkbox-label {
    display: flex; align-items: center;
    gap: .5rem; font-size: .86rem; cursor: pointer;
}
.form-actions {
    display: flex; justify-content: flex-end;
    gap: .75rem; margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(30, 144, 255, .14);
}
.btn-cancel {
    padding: 11px 22px;
    background: #f0f0ee; color: #4a5568;
    border: none; border-radius: 10px;
    font-size: .9rem; font-weight: 600;
    cursor: pointer;
}
.btn-save { width: auto; margin-top: 0; }

/* Modal */
.modal-backdrop {
    position: fixed; inset: 0;
    z-index: 1000;
    background: rgba(10,25,18,.65);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.modal-box {
    background: #fff;
    border-radius: 20px;
    width: 100%; max-width: 540px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,.2);
}
.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(30, 144, 255, .14);
}
.modal-head h3 {
    font-size: 1.1rem; font-weight: 700; color: #1e90ff;
}
.modal-close-btn {
    background: none; border: none;
    font-size: 1.2rem; cursor: pointer;
    color: #4a5568;
    padding: 4px 8px; border-radius: 6px;
}
.modal-close-btn:hover { background: #f0f0ee; }
.modal-form { padding: 1.5rem; }
.modal-actions {
    display: flex; justify-content: flex-end;
    gap: .75rem; margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(30, 144, 255, .14);
}

/* Generic modal (name-clash safe) */
.modal {
    display: none; position: fixed;
    z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.5); overflow: auto;
}
.modal-content {
    background: #fff; margin: 5% auto;
    padding: 0; border-radius: 12px;
    width: 90%; max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
    align-items: center;
}
.modal-header h3 { margin: 0; font-size: 1.2rem; color: #2d3748; }
.modal-body {
    padding: 1.25rem;
    max-height: 60vh; overflow-y: auto;
}
.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    display: flex; justify-content: flex-end; gap: .5rem;
}
.close-modal {
    font-size: 1.5rem; font-weight: bold;
    cursor: pointer; color: #a0aec0; line-height: 1;
}
.close-modal:hover { color: #e53e3e; }
.btn-submit {
    background: #1e90ff; color: #fff;
    border: none; padding: .6rem 1.25rem;
    border-radius: 8px; cursor: pointer;
}
.btn-submit:hover { background: #1a7ad0; }

/* Confirm modal */
.confirm-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
}
.confirm-overlay.show { opacity: 1; pointer-events: all; }
.confirm-box {
    background: #fff;
    border-radius: 22px;
    padding: 2.25rem 2rem;
    max-width: 380px; width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,.22);
    transform: translateY(24px) scale(.97);
    transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.confirm-overlay.show .confirm-box { transform: translateY(0) scale(1); }
.confirm-icon { font-size: 2.75rem; margin-bottom: .75rem; display: block; }
.confirm-title {
    font-size: 1.3rem; font-weight: 800;
    color: #1e90ff; margin-bottom: .4rem;
}
.confirm-msg {
    font-size: .88rem; color: #4a5568;
    margin-bottom: 1.5rem; line-height: 1.65;
}
.confirm-actions { display: flex; gap: .75rem; justify-content: center; }
.confirm-yes {
    padding: 11px 26px;
    background: #1e90ff; color: #fff;
    border: none; border-radius: 10px;
    font-weight: 700; font-size: .9rem;
    cursor: pointer; transition: background .2s;
    display: inline-flex; align-items: center; gap: 6px;
}
.confirm-yes:hover { background: #1a7ad0; }
.confirm-no {
    padding: 11px 22px;
    background: #f0f0ee; color: #4a5568;
    border: none; border-radius: 10px;
    font-weight: 600; font-size: .9rem;
    cursor: pointer;
}
.confirm-no:hover { background: #e0e0de; }

/* ═══════════════════════════════════════════════
   12. ALERTS / SCHEDULE / ACTIVITY / NOTIFICATIONS
═══════════════════════════════════════════════ */
.alert-banner {
    background: rgba(30,144,255,.1);
    border: 1px solid rgba(30,144,255,.3);
    color: #1a7ad0;
    padding: .75rem 1.25rem;
    border-radius: 10px;
    font-size: .88rem; margin-bottom: 1.25rem;
    display: flex; align-items: center; gap: .5rem;
}
.alert-banner i { margin-right: 8px; font-size: 1rem; }
.alert-banner a { color: #1e90ff; font-weight: 600; margin-left: .5rem; }
.alert-banner.alert-warn {
    background: rgba(200,50,50,.06);
    border-color: rgba(200,50,50,.2);
    color: #c03030;
}
.alert-banner.alert-info {
    background: rgba(59,130,246,.06);
    border-color: rgba(59,130,246,.2);
    color: #1e40af;
}
.alert-success {
    background: rgba(30, 144, 255, .08);
    border: 1px solid rgba(30, 144, 255, .2);
    color: #1e90ff;
    padding: .75rem 1.25rem;
    border-radius: 10px;
    font-size: .88rem; margin-bottom: 1.25rem;
}
.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: .85rem 1rem;
    border-radius: 10px; margin-bottom: 1.5rem;
}
.alert-success-strip {
    background: #f0f8ff;
    border-left: 4px solid #1e90ff;
    padding: .75rem 1rem;
    border-radius: 12px; margin-bottom: 1rem;
    color: #1a7ad0;
}
.alert-error-strip {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    padding: .75rem 1rem;
    border-radius: 12px; margin-bottom: 1rem;
    color: #b91c1c;
}

.schedule-item {
    display: flex; gap: .75rem;
    align-items: flex-start;
    padding: .7rem 0;
    border-bottom: 1px solid rgba(30, 144, 255, .14);
}
.schedule-item:last-child { border: none; }
.schedule-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #1e90ff;
    flex-shrink: 0; margin-top: 5px;
}
.schedule-title {
    font-size: .88rem; font-weight: 600;
    color: #1e2022; margin-bottom: .15rem;
}
.schedule-title i { margin-right: 6px; color: #1e90ff; font-size: .8rem; }
.schedule-meta { font-size: .76rem; color: #4a5568; }
.schedule-meta i { margin-right: 4px; font-size: .7rem; color: #6b7280; }

.activity-item:last-child { border: none; }
.activity-action {
    font-size: .86rem; font-weight: 600; color: #1e2022;
}
.activity-action i { margin-right: 6px; color: #1e90ff; }
.activity-meta {
    font-size: .76rem; color: #4a5568; margin-top: .15rem;
}
.activity-meta i { margin-right: 4px; font-size: .7rem; color: #6b7280; }

.notif-item {
    display: flex; gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid rgba(30, 144, 255, .14);
    border-radius: 14px; margin-bottom: .75rem;
}
.notif-unread {
    border-left: 3px solid #1e90ff;
    background: #fafff9;
}
.notif-icon-wrap {
    font-size: 1.4rem; flex-shrink: 0;
    width: 40px; height: 40px;
    background: #f0f8ff; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.notif-body { flex: 1; }
.notif-title {
    font-weight: 700; font-size: .92rem;
    color: #1e2022;
    display: flex; align-items: center;
    justify-content: space-between; gap: .5rem;
    margin-bottom: .25rem; cursor: pointer;
}
.notif-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #e74c3c; flex-shrink: 0;
}
.notif-msg {
    display: none; margin-top: .4rem;
    font-size: .86rem; color: #4a5568;
    line-height: 1.55; margin-bottom: .4rem;
}
.notif-msg.show { display: block; }
.notif-toggle-icon {
    font-size: .75rem; color: #4a5568;
    margin-left: auto;
    transition: transform .2s; flex-shrink: 0;
}
.notif-toggle-icon.open { transform: rotate(180deg); }
.notif-meta { font-size: .76rem; color: #4a5568; }

/* ═══════════════════════════════════════════════
   13. FILE ATTACHMENT / FEEDBACK
═══════════════════════════════════════════════ */
.file-attachment-area {
    border: 2px dashed var(--light-border);
    border-radius: 12px;
    padding: 1rem; text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafaf9;
    margin-top: .4rem;
}
.file-attachment-area:hover {
    border-color: var(--emerald);
    background: #f0f8ff;
}
.file-attachment-area i {
    font-size: 1.8rem; color: var(--emerald);
    display: block; margin-bottom: .4rem;
}
.file-attachment-area p {
    font-size: .78rem; color: var(--mid); margin: 0;
}
.file-list { margin-top: .5rem; }
.file-item {
    display: flex; align-items: center; justify-content: space-between;
    background: #f0f8ff;
    padding: .4rem .75rem;
    border-radius: 8px; margin-bottom: .35rem;
    font-size: .78rem;
}
.file-item i { margin-right: 6px; color: var(--emerald); }
.file-attachment-wrapper { margin-top: .5rem; }
.file-attachment-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #f0f8ff;
    border: 1px solid var(--light-border);
    padding: 10px 18px; border-radius: 10px;
    font-size: .85rem; font-weight: 600;
    color: var(--emerald-dark); cursor: pointer;
    transition: all 0.2s;
}
.file-attachment-btn:hover {
    background: var(--emerald);
    border-color: var(--emerald); color: #fff;
}
.file-item-info {
    display: flex; align-items: center; gap: 10px; flex: 1;
}
.file-item-info i { font-size: 1rem; color: var(--emerald); }
.file-item-name { font-weight: 500; color: var(--charcoal); }
.file-item-size {
    font-size: .7rem; color: var(--mid); margin-left: 8px;
}
.remove-file, .file-item .remove-file {
    background: none; border: none;
    color: var(--danger); cursor: pointer;
    padding: 4px 8px; border-radius: 6px;
    transition: all 0.2s; font-size: 1rem;
}
.remove-file:hover, .file-item .remove-file:hover {
    background: rgba(239,68,68,.1);
    transform: scale(1.05);
}
.attachment-count {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--emerald); color: #fff;
    border-radius: 20px; padding: 2px 8px;
    font-size: .7rem; margin-left: 8px;
}

.suggestion-wrap { margin-top: .6rem; display: none; }
.suggestion-label {
    font-size: .74rem; color: var(--mid);
    margin-bottom: .4rem;
    display: flex; align-items: center; gap: 5px;
}
.suggestion-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.suggestion-chip {
    background: #f0f8ff;
    border: 1.5px solid var(--emerald);
    color: var(--emerald-dark);
    border-radius: 100px;
    padding: 4px 12px; font-size: .78rem;
    cursor: pointer; transition: all 0.15s;
}
.suggestion-chip:hover {
    background: var(--emerald); color: #fff;
    transform: translateY(-1px);
}
.ai-generating {
    display: flex; align-items: center; gap: 8px;
    font-size: .8rem; color: var(--mid); padding: 6px 0;
}
.ai-dot {
    width: 7px; height: 7px;
    background: var(--emerald); border-radius: 50%;
    animation: bounce 1.2s infinite;
}
.ai-dot:nth-child(2) { animation-delay: .2s; }
.ai-dot:nth-child(3) { animation-delay: .4s; }

.star-btn:hover { transform: scale(1.1); }
.star-btn.active { opacity: 1; transform: scale(1.05); }
.file-info-hint {
    font-size: .7rem; color: var(--mid); margin-top: .5rem;
}
.file-info-hint i { margin-right: 4px; }
.feedback-attachment-link {
    background: #f0f8ff;
    padding: 5px 12px; border-radius: 8px;
    font-size: .75rem; color: var(--emerald);
    display: inline-flex; align-items: center; gap: 6px;
    transition: all 0.2s;
}
.feedback-attachment-link:hover {
    background: #e6f3ed;
    transform: translateX(2px);
}
.feedback-attachment-link i { font-size: .8rem; }
.feedback-reply-box {
    background: #f0f8ff;
    border-left: 3px solid var(--emerald);
    padding: .5rem .75rem;
    margin-top: .5rem;
    border-radius: 0 6px 6px 0;
    font-size: .82rem;
}
.feedback-reply-box strong { color: var(--emerald); }
.feedback-reply-box i { margin-right: 4px; }
.feedback-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--light-border);
}
.feedback-header {
    display: flex; justify-content: space-between;
    margin-bottom: .3rem; flex-wrap: wrap; gap: .5rem;
}
.feedback-rating { margin-bottom: .3rem; }
.feedback-rating i { font-size: .85rem; }
.feedback-message { font-size: .86rem; line-height: 1.5; }
.feedback-attachments { margin-top: .75rem; }
.feedback-attachments-title {
    font-size: .75rem; color: var(--mid); margin-bottom: .5rem;
}
.feedback-attachments-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.empty-feedback {
    padding: 3rem; text-align: center; color: var(--mid);
}
.empty-feedback i {
    font-size: 2rem; margin-bottom: 1rem; display: block;
}

/* ═══════════════════════════════════════════════
   14. PROFILE PAGE
═══════════════════════════════════════════════ */
.profile-header {
    background: linear-gradient(135deg, #1e90ff 0%, #1a7ad0 50%, #87ceeb 100%);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 1.75rem;
    display: flex; align-items: center; gap: 2rem;
    flex-wrap: wrap;
    position: relative; overflow: hidden;
    box-shadow: 0 15px 35px rgba(30,144,255,0.3);
}
.profile-avatar {
    width: 120px; height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; font-weight: 900;
    color: #1e90ff; overflow: hidden;
    cursor: pointer; position: relative;
}
.profile-avatar img {
    width: 100%; height: 100%; object-fit: cover;
}
.photo-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.6);
    height: 35px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s;
}
.profile-avatar:hover .photo-overlay { opacity: 1; }
.profile-name { font-size: 1.8rem; font-weight: 800; color: #fff; }
.profile-badge {
    padding: 5px 14px; border-radius: 100px;
    font-size: 0.75rem; font-weight: 700;
    display: inline-flex; align-items: center; gap: 6px;
}
.profile-badge-admin,
.profile-badge-secretary,
.profile-badge-treasurer,
.profile-badge-kagawad,
.profile-badge-sk,
.profile-badge-resident { background: #1e90ff; color: #fff; }

.stat-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 0.75rem 1.25rem;
    text-align: center;
}
.stat-number { font-size: 1.5rem; font-weight: 800; color: #fff; }
.stat-label { font-size: 0.7rem; color: rgba(255,255,255,0.75); }

.info-row {
    display: flex; justify-content: space-between;
    padding: 0.7rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.info-label {
    color: #64748b; font-weight: 600;
    display: inline-flex; align-items: center; gap: 8px;
}
.info-label i { color: #1e90ff; }
.info-value { color: #1e293b; font-weight: 500; }

.edit-mode { display: none; }
.edit-input {
    padding: 6px 12px; border-radius: 8px;
    border: 1px solid #e2e8f0; min-width: 200px;
}
.btn-edit-profile, .btn-save-profile, .btn-cancel-profile {
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem; font-weight: 600;
    cursor: pointer; border: none;
}
.btn-edit-profile   { background: #1e90ff; color: white; }
.btn-save-profile   { background: #1a7ad0; color: white; display: none; }
.btn-cancel-profile { background: #6b7280; color: white; display: none; }
.btn-change-pw {
    background: #1e90ff; color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.full-width { grid-column: 1 / -1; }
.hidden-file-input { display: none; }

/* Photo modal */
.photo-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 9999;
    align-items: center; justify-content: center;
}
.photo-modal-box {
    background: #fff; border-radius: 12px;
    padding: 1rem;
    max-width: 85vw; width: 260px;
    position: relative; text-align: center;
}
.photo-modal-close {
    position: absolute; top: 0.5rem; right: 0.5rem;
    background: none; border: none;
    font-size: 0.95rem; cursor: pointer; color: #64748b;
}
.photo-modal-image {
    width: 140px; height: 140px;
    border-radius: 50%; overflow: hidden;
    margin: 0.75rem auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.photo-modal-image img {
    width: 100%; height: 100%; object-fit: cover;
}
.photo-modal-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg,#ffecd2,#fcb69f);
    font-size: 2rem; font-weight: 700; color: #fff;
}
.photo-modal-actions { margin-top: 0.75rem; }
.photo-modal-actions .btn-change-pw {
    font-size: 0.8rem; padding: 0.4rem 0.8rem;
}

/* Password warning banner — kill overlap on mobile */
.password-warning-banner,
.pw-warning-banner,
.password-reminder-banner,
[class*="password-warning"],
[class*="password_warning"],
[class*="pw-warning"] {
    position: static;
    margin: 0 0 0.75rem 0;
    border-radius: 10px;
    z-index: 1;
}

/* ═══════════════════════════════════════════════
   15. EMAIL SETTINGS
═══════════════════════════════════════════════ */
.email-settings-card {
    background: white; border-radius: 14px;
    padding: 30px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}
.email-settings-card h2 { color: #1e90ff; margin-bottom: 20px; }
.email-settings-card .form-group { margin-bottom: 18px; }
.email-settings-card label {
    display: block; margin-bottom: 6px;
    font-weight: 600; color: #333; font-size: .9rem;
}
.email-settings-card input,
.email-settings-card select {
    width: 100%; padding: 10px 14px;
    border: 1.5px solid #dde1e7; border-radius: 8px;
    font-size: .92rem; transition: border-color .2s;
}
.email-settings-card input:focus,
.email-settings-card select:focus {
    outline: none; border-color: #1e90ff;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
}
.email-settings-card .btn-save {
    background: #1e90ff; color: white;
    padding: 11px 24px; border: none;
    border-radius: 8px; cursor: pointer;
    font-size: .92rem; font-weight: 600;
    transition: background .2s;
}
.email-settings-card .btn-save:hover { background: #1a7ad0; }
.email-settings-card .btn-test {
    background: #1a73e8; color: white;
    padding: 11px 24px; border: none;
    border-radius: 8px; cursor: pointer;
    font-size: .92rem; font-weight: 600;
    transition: background .2s; margin-left: 8px;
}
.email-settings-card .btn-test:hover { background: #1558b0; }
.email-settings-card .help-text {
    font-size: .78rem; color: #888; margin-top: 4px;
}
.email-settings-card .test-section {
    margin-top: 28px; padding-top: 20px;
    border-top: 2px solid #f0f2f5;
}
.email-settings-card .info-box {
    background: #f0f8ff;
    border: 1px solid #87ceeb;
    border-left: 4px solid #1e90ff;
    color: #1a7ad0;
    padding: 14px 16px; border-radius: 8px;
    margin-bottom: 20px;
    font-size: .88rem; line-height: 1.6;
}

/* ═══════════════════════════════════════════════
   16. ICON HELPERS
═══════════════════════════════════════════════ */
.btn-secondary i, .btn-add i, .btn-filter i, .btn-reset i { margin-right: 6px; }
.group-header-icon i { font-size: 2rem; }

/* Gender / civil status */
.fa-mars  { color: #3b82f6; }
.fa-venus { color: #ec489a; }
.fa-ring  { color: #1e90ff; }
.fa-heart { color: #ec489a; }

/* Category icons */
.fa-utensils       { color: #f59e0b; }
.fa-hospital       { color: #ef4444; }
.fa-book           { color: #3b82f6; }
.fa-soap           { color: #10b981; }
.fa-box            { color: #6b7280; }
.fa-cube           { color: #1e90ff; }
.fa-weight-hanging { color: #ec489a; }
.fa-measuring-tape { color: #14b8a6; }

/* ═══════════════════════════════════════════════
   17. ADDITIONAL UTILITIES
═══════════════════════════════════════════════ */
.view-only-banner {
    background: #f0f8ff;
    border-left: 4px solid #1e90ff;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    color: #1a7ad0;
    display: flex; align-items: center;
    gap: 10px; flex-wrap: wrap;
}

.household-row { cursor: pointer; transition: background .2s; }
.household-row:hover { background: #f8fafc; }

.purok-filter-buttons {
    display: flex; gap: 10px;
    margin-bottom: 20px; flex-wrap: wrap;
}
.purok-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 8px 18px;
    font-size: .85rem; cursor: pointer;
    color: #1e293b; transition: all .2s;
}
.purok-btn.active-purok {
    background: #1e90ff; color: #fff; border-color: #1e90ff;
}

.household-actions { display: flex; gap: 5px; }
.member-item {
    display: flex; justify-content: space-between;
    align-items: center;
    padding: .75rem;
    border-bottom: 1px solid #e2e8f0;
}
.member-item:last-child { border-bottom: none; }
.member-item.highlight { background: #fefce8; }
.head-badge {
    background: #fbbf24; color: #78350f;
    font-size: .65rem; padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex; align-items: center; gap: 4px;
    margin-left: 8px;
}
.birthday-badge {
    background: #e0f2fe; color: #0369a1;
    font-size: .65rem; padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex; align-items: center; gap: 4px;
}

.btn-add-resident {
    background: #1e90ff; color: #fff;
    border: none; padding: .55rem 1rem;
    border-radius: 8px; cursor: pointer;
    font-size: .85rem;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-add-resident:hover { background: #1a7ad0; }
.btn-archive {
    background: #3b82f6; color: #fff;
    border: none; padding: 4px 8px;
    border-radius: 6px; font-size: .7rem;
    cursor: pointer;
}
.btn-archive:hover { background: #2563eb; }
.btn-edit {
    background: #1e90ff; color: #fff;
    border: none; padding: 4px 8px;
    border-radius: 6px; font-size: .7rem;
    cursor: pointer; margin-right: 4px;
}
.btn-edit:hover { background: #1a7ad0; }

.btn-youth-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    background: #fce7f3;
    border: 1.5px solid #f9a8d4;
    border-radius: 8px;
    color: #be185d;
    font-size: .8rem; font-weight: 600;
    transition: all .2s;
}
.btn-youth-link:hover {
    background: #fbb6ce;
    color: #9d174d;
    border-color: #f472b6;
}
.btn-youth-link .yp-badge {
    font-size: .6rem;
    background: #f9a8d4;
    color: #9d174d;
    border-radius: 20px;
    padding: 1px 6px; font-weight: 700;
}

.senior-badge {
    background: #1a202c; color: #fff;
    font-size: .62rem; padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex; align-items: center; gap: 4px;
    margin-left: 6px;
}
.age-senior { color: #1565c0; font-weight: 700; }
.senior-alert {
    background: #e3f2fd;
    border: 1.5px solid #90caf9;
    border-radius: 10px;
    padding: .65rem 1rem;
    font-size: .78rem; color: #1565c0;
    display: none; align-items: center;
    gap: .5rem; margin-top: .5rem;
}
.senior-alert.show { display: flex; }
.senior-alert i { color: #2196f3; }

.see-more-wrap {
    display: flex; justify-content: center;
    padding: .85rem;
    border-top: 1px solid #f1f5f9;
}
.see-more-btn {
    background: #f0f8ff;
    color: #1a7ad0;
    border: 1px solid #87ceeb;
    border-radius: 10px;
    padding: .5rem 1.2rem;
    font-size: .82rem; font-weight: 600;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    transition: all .2s;
}
.see-more-btn:hover { background: #dcfce7; }

.filter-toggle {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .8rem; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    color: #1e293b;
}
.filter-toggle.active {
    background: #1e90ff; color: #fff; border-color: #1e90ff;
}

.swal2-popup { border-radius: 12px; }
.swal2-confirm { background-color: #1e90ff !important; border-radius: 8px; }
.swal2-cancel  { background-color: #e2e8f0 !important; color: #2d3748 !important; border-radius: 8px; }

/* ═══════════════════════════════════════════════════════════
   18. RESPONSIVE — TABLET / MOBILE  (max-width: 900px)
═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    /* Layout */
    .db-main { margin-left: 0 !important; width: 100% !important; min-width: 0 !important; }
    .db-page { padding: 0.75rem !important; }

    /* Sidebar drawer */
    .db-sidebar, #dbSidebar {
        position: fixed !important;
        top: 0 !important; left: 0 !important;
        height: 100% !important; height: 100dvh !important;
        width: 280px !important;
        z-index: 999 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.26s cubic-bezier(.22,1,.36,1) !important;
        overflow-y: auto !important; overflow-x: hidden !important;
        box-shadow: none !important;
    }
    .db-sidebar.sidebar-open, #dbSidebar.sidebar-open,
    .open {
        transform: translateX(0) !important;
        box-shadow: 6px 0 32px rgba(0,0,0,.22) !important;
    }
    #sidebarToggleCheck:checked ~ .db-sidebar {
        transform: translateX(0) !important;
        box-shadow: 4px 0 32px rgba(0,0,0,0.25) !important;
    }

    /* Overlay */
    .sidebar-overlay, #sidebarOverlay {
        display: none !important;
        position: fixed !important; inset: 0 !important;
        background: rgba(0,0,0,.5) !important;
        z-index: 998 !important;
        cursor: pointer !important;
        backdrop-filter: blur(3px) !important;
        -webkit-backdrop-filter: blur(3px) !important;
    }
    .sidebar-overlay.active, #sidebarOverlay.active,
    #sidebarToggleCheck:checked ~ .sidebar-overlay {
        display: block !important;
    }

    .hamburger-btn {
        display: inline-flex !important;
        align-items: center; justify-content: center;
        font-size: 1.5rem !important;
        padding: 10px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        background: rgba(30,144,255,0.08) !important;
        border-radius: 10px !important;
    }

    /* Topbar */
    .db-topbar {
        padding: 0 0.875rem !important;
        height: 58px !important;
        background: #ffffff !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    .db-topbar-title { font-size: 1rem !important; }
    .topbar-date { display: none !important; }
    .topbar-role-badge span { display: none !important; }
    .topbar-user span, .user-name, .topbar-chevron { display: none !important; }
    .notif-menu { width: calc(100vw - 1.5rem) !important; right: -0.5rem !important; }
    .user-menu  { right: 0 !important; }

    /* ─── WELCOME BANNER ─── */
    /* ✅ CHANGED: left-aligned (hindi center) */
    .welcome-banner {
        flex-direction: column !important;
        align-items: flex-start !important;    /* ✅ left-aligned */
        justify-content: flex-start !important;
        text-align: left !important;            /* ✅ left-aligned */
        padding: 1.1rem 1rem !important;
        border-radius: 16px !important;
        gap: 0.6rem !important;
        margin-bottom: 1rem !important;
    }
    .welcome-banner > div:first-child,
    .welcome-banner > section,
    .welcome-banner .welcome-banner-inner {
        width: 100% !important;
        text-align: left !important;            /* ✅ left-aligned */
        display: block !important;
    }
    .welcome-banner > div:last-child { display: none !important; }
    .welcome-greeting {
        font-size: 0.78rem !important;
        opacity: 0.9;
        margin-bottom: 0.15rem;
        text-align: left !important;            /* ✅ left-aligned */
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }
    .welcome-name {
        font-size: 1.15rem !important;
        font-weight: 800 !important;
        line-height: 1.25 !important;
        text-align: left !important;
    }
    .welcome-badge {
        font-size: 0.68rem !important;
        padding: 3px 10px !important;
        margin-top: 0.35rem !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
    }
    /* ✅ h1.welcome-greeting & p.welcome-sub (aid.php semantic version) */
    .welcome-banner h1.welcome-greeting,
    h1.welcome-greeting {
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        line-height: 1.3 !important;
        width: 100% !important;
    }
    .welcome-banner h1.welcome-greeting i,
    h1.welcome-greeting i {
        color: #ffffff !important;
        font-size: 1.15rem !important;
        flex-shrink: 0 !important;
        display: inline-block !important;
    }
    .welcome-banner p.welcome-sub,
    p.welcome-sub {
        font-size: 0.78rem !important;
        font-weight: 400 !important;
        color: rgba(255,255,255,0.95) !important;
        margin: 4px 0 0 0 !important;
        padding: 0 !important;
        text-align: left !important;
        line-height: 1.4 !important;
        display: block !important;
        width: 100% !important;
    }

    /* KPI */
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem !important;
        margin-bottom: 1rem !important;
    }
    .kpi-card {
        padding: 0.85rem 0.8rem !important;
        border-radius: 14px !important;
        min-height: 96px !important;
    }
    .kpi-icon {
        width: 2.2rem !important; height: 2.2rem !important;
        font-size: 1rem !important;
        margin-bottom: 0.45rem !important;
    }
    .kpi-label { font-size: 0.65rem !important; letter-spacing: 0.3px !important; margin-bottom: 0.2rem !important; }
    .kpi-value { font-size: 1.35rem !important; line-height: 1.15 !important; }
    .kpi-sub   { font-size: 0.6rem !important; margin-top: 0.2rem !important; line-height: 1.4 !important; }

    /* Grids collapse */
    .db-grid-2,
    .grid-2,
    .form-grid-2,
    .form-grid-3,
    .form-grid-4,
    .report-detail-grid,
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns:1fr 1fr"],
    div[style*="grid-template-columns: 1fr 2fr"],
    div[style*="grid-template-columns: repeat(2"],
    div[style*="grid-template-columns:repeat(2"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.85rem !important;
    }
    .db-grid-3 { grid-template-columns: 1fr !important; gap: 0.85rem !important; }
    .full-width { grid-column: 1 !important; }

    /* Cards */
    .db-card {
        border-radius: 12px !important;
        margin-bottom: 0.85rem !important;
        overflow: visible !important;
    }
    .db-card-head {
        padding: 0.75rem 0.9rem !important;
        flex-wrap: wrap !important;
        gap: 0.4rem !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .db-card-title {
        font-size: 0.88rem !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    .db-card-link { font-size: 0.72rem !important; white-space: nowrap !important; flex: 0 0 auto !important; }
    .db-card-body { padding: 0.85rem 0.9rem !important; }

    /* Profile-only: stack card head when edit buttons present */
    .db-page .db-card-head:has(.btn-edit-profile),
    .db-page .db-card-head:has(.btn-save-profile),
    .db-page .db-card-head:has(.btn-cancel-profile) {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .db-page .db-card-head:has(.btn-edit-profile) > div,
    .db-page .db-card-head:has(.btn-save-profile) > div {
        display: flex !important; gap: 6px !important; width: 100% !important;
    }
    .db-page .db-card-head:has(.btn-edit-profile) button,
    .db-page .db-card-head:has(.btn-save-profile) button {
        flex: 1 1 0 !important; min-width: 0 !important;
        padding: 9px 6px !important;
        font-size: 0.7rem !important;
        justify-content: center !important;
        white-space: nowrap !important;
    }

    /* Tables — horizontal scroll */
    .db-card > div[style*="overflow-x"],
    .db-card { overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
    .db-table { min-width: 520px !important; font-size: 0.78rem !important; }
    .db-table th, .db-table td {
        padding: 0.55rem 0.7rem !important;
        white-space: nowrap !important;
    }
    .db-table th { font-size: 0.65rem !important; }
    .td-sub { font-size: 0.68rem !important; }

    /* Action buttons stay side-by-side */
    .action-btns { flex-wrap: nowrap !important; gap: 0.3rem !important; }
    .action-btns .btn-sm {
        min-height: 34px !important; min-width: 34px !important;
        padding: 0.2rem 0.6rem !important;
        font-size: 0.7rem !important;
    }

    /* Forms */
    .form-group { margin-bottom: 1rem !important; width: 100% !important; }
    .form-group label { font-size: 0.8rem !important; font-weight: 600 !important; }
    .form-group input,
    .form-group select,
    .form-group textarea,
    .filter-input,
    .filter-select {
        width: 100% !important;
        padding: 12px 14px !important;
        font-size: 16px !important; /* stop iOS zoom */
        border-radius: 10px !important;
        min-height: 48px !important;
        box-sizing: border-box !important;
    }
    .form-group textarea { min-height: 80px !important; }

    .page-toolbar { flex-direction: column !important; gap: 0.75rem !important; }
    .filter-bar { flex-direction: column !important; width: 100% !important; gap: 0.5rem !important; }
    .filter-bar .filter-input,
    .filter-bar .filter-select,
    .filter-bar .btn-filter,
    .filter-bar .btn-reset { width: 100% !important; min-height: 48px !important; }
    .btn-add, .btn-save, .btn-cancel {
        width: 100% !important;
        justify-content: center !important;
        min-height: 48px !important;
    }
    .modal-actions { flex-direction: column-reverse !important; gap: 0.5rem !important; }
    .modal-actions .btn-save,
    .modal-actions .btn-cancel { width: 100% !important; }

    /* Modals */
    .modal-box, .modal-content {
        max-width: 100% !important; width: 95% !important;
        margin: 3% auto !important;
        border-radius: 16px !important;
    }
    .modal-body { max-height: 68vh !important; }

    /* Alerts */
    .alert-banner, .alert-success, .alert-error, .alert-warning,
    .login-error, .login-success, .forgot-message {
        font-size: 0.8rem !important;
        padding: 0.7rem 0.9rem !important;
        line-height: 1.5 !important;
        word-break: break-word !important;
    }
    .alert-banner a { display: inline-block !important; margin-left: 0.3rem !important; }

    /* Empty states */
    .empty-cell {
        padding: 1.5rem 1rem !important;
        font-size: 0.82rem !important;
        line-height: 1.5 !important;
    }
    .empty-cell i {
        font-size: 1.5rem !important;
        margin-bottom: 0.4rem !important;
        display: inline-block !important;
    }

    /* Progress bars */
    .progress-bar-container { height: 8px !important; border-radius: 8px !important; }
    .db-card-body > div[style*="margin-bottom:.75rem"],
    .db-card-body > div[style*="margin-bottom:1rem"] { margin-bottom: 0.75rem !important; }
    .db-card-body div[style*="display:flex"][style*="justify-content:space-between"] {
        font-size: 0.78rem !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }

    /* Schedule / Activity */
    .schedule-item { padding: 0.65rem 0 !important; gap: 0.6rem !important; }
    .schedule-title { font-size: 0.82rem !important; word-break: break-word !important; }
    .schedule-meta  { font-size: 0.68rem !important; line-height: 1.55 !important; }
    .activity-item  { padding: 0.6rem 0 !important; }
    .activity-action { font-size: 0.8rem !important; word-break: break-word !important; }
    .activity-meta   { font-size: 0.68rem !important; line-height: 1.5 !important; }

    /* Touch targets */
    button, .btn, .btn-sm, .btn-add, .btn-save, .btn-cancel,
    .btn-filter, .btn-reset, .login-btn, .forgot-btn,
    .btn-register-submit, .btn-edit, .btn-archive,
    .btn-edit-profile, .btn-save-profile, .btn-cancel-profile,
    .btn-change-pw, .btn-youth-link, .read-status-btn,
    .modal-close-btn, .confirm-yes, .confirm-no,
    .hamburger-btn, .db-nav-item, .db-logout, .toggle-password,
    .file-attachment-btn, .remove-file, .see-more-btn,
    .filter-toggle, .purok-btn, .star-btn, .suggestion-chip,
    .db-card-link, .back-link {
        min-height: 44px !important;
        min-width: 44px !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(30,144,255,0.15) !important;
    }
    .action-btns .btn-sm { min-height: 34px !important; min-width: 34px !important; }

    /* Checkboxes / radios */
    .checkbox-group label,
    .resident-checkbox-item,
    .radio-label {
        min-height: 44px !important;
        display: flex !important; align-items: center !important;
        padding: 0.2rem 0 !important;
    }
    .checkbox-group input[type="checkbox"],
    .checkbox-group input[type="radio"],
    .resident-checkbox-item input[type="checkbox"] {
        width: 22px !important; height: 22px !important;
        flex-shrink: 0 !important;
        margin-right: 0.5rem !important;
    }

    /* Announcements */
    .announcement-item { padding: 0.75rem !important; border-bottom: 1px solid #e2e8f0 !important; }
    .announcement-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    .announcement-title { font-size: 0.85rem !important; font-weight: 700 !important; word-break: break-word !important; }
    .announcement-date  { font-size: 0.7rem !important; color: #64748b !important; white-space: normal !important; }
    .announcement-body  { font-size: 0.78rem !important; line-height: 1.5 !important; margin-bottom: 0.5rem !important; word-wrap: break-word !important; overflow-wrap: break-word !important; }
    .announcement-meta  { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; gap: 0.5rem !important; margin-bottom: 0.5rem !important; }
    .announcement-item img { max-width: 100% !important; height: auto !important; border-radius: 8px !important; margin: 0.5rem 0 !important; }

    .badge { font-size: 0.6rem !important; padding: 0.2rem 0.6rem !important; white-space: nowrap !important; display: inline-flex !important; align-items: center !important; gap: 0.25rem !important; }
    .badge i { font-size: 0.55rem !important; }

    .announcement-item [style*="background:#e8f5e9"],
    .announcement-item [style*="background:#e3f2fd"] {
        display: inline-flex !important;
        font-size: 0.65rem !important;
        padding: 0.2rem 0.6rem !important;
        margin-bottom: 0.3rem !important;
        flex-wrap: wrap !important;
        word-break: break-word !important;
    }

    .read-status-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.5rem !important;
        font-size: 0.75rem !important;
        margin-top: 0.5rem !important;
        display: flex !important; align-items: center !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }
    .read-badge, .unread-badge { font-size: 0.65rem !important; padding: 0.15rem 0.5rem !important; }

    .read-status-table {
        width: 100% !important;
        font-size: 0.7rem !important;
        display: table !important;
    }
    .read-status-table th, .read-status-table td { padding: 0.4rem 0.5rem !important; }
    .status-read, .status-unread { font-size: 0.7rem !important; }

    /* Resident selection modal */
    #residentSelectionModal {
        padding: 0.5rem !important;
        align-items: center !important; justify-content: center !important;
        position: fixed !important; overflow-y: auto !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
    }
    #residentSelectionModal > div {
        width: 95% !important; max-width: 95% !important;
        margin: 0 auto !important;
        max-height: 85vh !important;
        border-radius: 16px !important;
        overflow: hidden !important;
    }
    #residentSelectionModal > div > div:first-child { padding: 1rem !important; }
    #residentSelectionModal h3 { font-size: 0.95rem !important; margin: 0 !important; }
    #residentSelectionModal p  { font-size: 0.7rem !important; margin-top: 0.25rem !important; }
    #residentListContainer { max-height: 350px !important; overflow-y: auto !important; }
    .resident-checkbox-item {
        padding: 0.6rem 0.75rem !important;
        gap: 0.6rem !important;
        border-radius: 8px !important;
        margin-bottom: 0.5rem !important;
        display: flex !important; align-items: center !important;
        min-height: 55px !important;
    }
    .resident-name    { font-size: 0.8rem !important; font-weight: 600 !important; }
    .resident-details { font-size: 0.65rem !important; margin-top: 0.2rem !important; }
    .resident-checkbox-item input[type="checkbox"] { width: 18px !important; height: 18px !important; flex-shrink: 0 !important; margin: 0 !important; }
    #residentSelectionModal > div > div:last-child { flex-direction: column-reverse !important; gap: 0.5rem !important; padding: 1rem !important; }
    #residentSelectionModal button { width: 100% !important; padding: 0.6rem !important; font-size: 0.8rem !important; display: flex !important; align-items: center !important; justify-content: center !important; gap: 0.5rem !important; }

    /* Login / Forgot / Register */
    .login-card, .forgot-card { max-width: 96% !important; padding: 1.5rem 1.2rem !important; border-radius: 20px !important; }
    .login-brand-title  { font-size: 1.6rem !important; }
    .login-brand-icon   { font-size: 1.5rem; }
    .login-field input, .forgot-field input { min-height: 50px !important; font-size: 16px !important; padding: 12px 14px 12px 40px !important; }
    .login-btn, .forgot-btn { min-height: 50px !important; font-size: 0.95rem !important; }
    .char-bubble { white-space: normal; max-width: 130px; text-align: center; font-size: 10px; }
    .forgot-icon-circle { width: 64px !important; height: 64px !important; font-size: 1.5rem !important; }

    .register-container, .register-card {
        max-width: 96% !important;
        padding: 1.25rem 1rem !important;
        border-radius: 16px !important;
        max-height: 96vh !important;
        background: #fff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
        margin: 0.75rem auto !important;
    }
    .register-brand-title { font-size: 1.5rem !important; }
    .register-form-body   { padding: 0 !important; margin: 0 !important; }
    .form-row, .form-row-3 {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    .register-form-body .form-group { width: 100% !important; margin-bottom: 0.6rem !important; }
    .register-form-body .form-group input,
    .register-form-body .form-group select,
    .register-form-body .form-group textarea {
        min-height: 50px !important;
        font-size: 16px !important;
        padding: 10px 12px !important;
        border-radius: 10px !important;
    }
    .register-form-body .checkbox-group { flex-direction: column !important; gap: 0.4rem !important; }
    .register-form-body .checkbox-group label {
        font-size: 0.8rem !important; padding: 0.3rem 0 !important;
    }
    .btn-register-submit { min-height: 50px !important; font-size: 0.95rem !important; width: 100% !important; padding: 0.85rem !important; border-radius: 12px !important; }

    .photo-upload {
        margin-left: 0 !important; margin-right: 0 !important;
        width: 100% !important;
        min-height: 120px !important;
        padding: 0.8rem !important;
        box-sizing: border-box !important;
    }
    .photo-preview, .photo-placeholder { width: 60px !important; height: 60px !important; }

    .otp-fallback-box { padding: 0.8rem !important; margin: 0.5rem !important; }
    .otp-fallback-box .otp-code { font-size: 1.8rem !important; letter-spacing: 6px !important; word-break: break-all !important; }
    #otpInput { font-size: 1.8rem !important; letter-spacing: 6px !important; width: 100% !important; box-sizing: border-box !important; }
    #otpTimer { font-size: 0.9rem !important; }

    /* Profile */
    .profile-header { flex-direction: column !important; text-align: center !important; align-items: center !important; gap: 0.85rem !important; padding: 1rem !important; }
    .profile-stats  { width: 100% !important; justify-content: center !important; }
    .stat-card      { flex: 1 !important; text-align: center !important; }
    .info-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.3rem !important;
        padding: 0.65rem 0 !important;
    }
    .info-label { font-size: 0.72rem !important; text-transform: uppercase !important; letter-spacing: 0.04em !important; }
    .info-value { text-align: left !important; width: 100% !important; font-size: 0.92rem !important; font-weight: 600 !important; word-break: break-word !important; }
    .edit-mode  { width: 100% !important; display: block !important; }
    .edit-input { width: 100% !important; box-sizing: border-box !important; }
    .pw-form-grid { grid-template-columns: 1fr !important; gap: 0.85rem !important; }
    #my-password-section > div { flex-direction: column !important; align-items: stretch !important; gap: 0.5rem !important; }
    #my-password-section code#myPwDisplay { display: block !important; width: 100% !important; box-sizing: border-box !important; text-align: center !important; letter-spacing: 3px !important; font-size: 0.85rem !important; padding: 8px 10px !important; }
    #my-password-section button { width: 100% !important; min-height: 42px !important; padding: 9px 12px !important; font-size: 0.8rem !important; }
    #change-password-section form > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; gap: 0.75rem !important; }
    #change-password-section .btn-change-pw { width: 100% !important; justify-content: center !important; min-height: 46px !important; }
    #change-password-section form input { width: 100% !important; min-height: 46px !important; font-size: 16px !important; box-sizing: border-box !important; }

    /* SK / Youth / Project items */
    .sk-card .db-card-head { padding: 0.7rem 0.9rem !important; flex-wrap: wrap !important; gap: 0.4rem !important; }
    .sk-card .db-card-title { font-size: 0.85rem !important; }
    .sk-card .db-card-link  { font-size: 0.72rem !important; }
    .sk-card > div[style*="padding"] { padding: 0.65rem 0.85rem !important; }
    .announcement-snippet { font-size: 0.78rem !important; }
    .announcement-snippet > div:first-child { flex-wrap: wrap !important; gap: 0.25rem !important; }
    .announcement-snippet > div:first-child span:first-child { flex: 1 1 auto !important; min-width: 0 !important; word-break: break-word !important; }
    .announcement-snippet > div:first-child span:last-child  { flex: 0 0 auto !important; }
    .youth-item, .project-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.35rem !important;
        padding: 0.65rem 0 !important;
    }
    .youth-item > div:last-child, .project-item > div:last-child { text-align: left !important; width: 100% !important; }
    .youth-name, .project-title { font-size: 0.82rem !important; word-break: break-word !important; }
    .youth-meta, .project-meta  { font-size: 0.68rem !important; line-height: 1.5 !important; }
    .project-badge { font-size: 0.6rem !important; padding: 2px 7px !important; }
    .badge-Pending, .badge-Approved, .badge-Distributed,
    .badge-Planning, .badge-Proposed, .badge-Ongoing,
    .badge-Completed, .badge-Cancelled, .badge-Archived {
        font-size: 0.58rem !important; padding: 2px 7px !important;
    }

    /* Utility overrides */
    .form-group[style*="max-width"],
    .form-group[style*="max-width:200px"],
    .form-group[style*="max-width:220px"] { max-width: 100% !important; }
    form[style*="padding:1.5rem"] { padding: 1rem !important; }
    .welcome-banner > div[style*="text-align: right"] { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   19. RESPONSIVE — SMALL PHONES (max-width: 480px)
═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .db-page   { padding: 0.55rem !important; }
    .db-topbar { height: 52px !important; padding: 0 0.65rem !important; }
    .page-title { display: none !important; }

    .kpi-grid { grid-template-columns: 1fr !important; gap: 0.6rem !important; }
    .kpi-card { min-height: 82px !important; padding: 0.75rem !important; }
    .kpi-value { font-size: 1.25rem !important; }
    .kpi-icon  { width: 2rem !important; height: 2rem !important; font-size: 0.9rem !important; }
    .welcome-name { font-size: 1.05rem !important; text-align: left !important; }
    .welcome-greeting { font-size: 0.72rem !important; text-align: left !important; justify-content: flex-start !important; }
    .welcome-banner p.welcome-sub,
    p.welcome-sub { font-size: 0.72rem !important; text-align: left !important; }
    .welcome-banner h1.welcome-greeting,
    h1.welcome-greeting { font-size: 1rem !important; justify-content: flex-start !important; text-align: left !important; }

    .db-table { min-width: 460px !important; font-size: 0.72rem !important; }
    .db-table th, .db-table td { padding: 0.45rem 0.55rem !important; }

    .db-card-head { padding: 0.65rem 0.75rem !important; }
    .db-card-body { padding: 0.75rem !important; }
    .db-page .db-card-title { font-size: 0.82rem !important; }
    .db-page .db-card-link  { font-size: 0.68rem !important; }
    .empty-cell i { font-size: 1.35rem !important; }

    .announcement-item { padding: 0.6rem !important; }
    .announcement-title { font-size: 0.8rem !important; }
    .announcement-date  { font-size: 0.65rem !important; }
    .announcement-body  { font-size: 0.72rem !important; line-height: 1.4 !important; }
    .announcement-meta  { gap: 0.3rem !important; }
    .read-status-btn { font-size: 0.7rem !important; padding: 0.4rem !important; }
    .read-badge, .unread-badge { font-size: 0.6rem !important; padding: 0.1rem 0.4rem !important; }
    .badge { font-size: 0.55rem !important; padding: 0.15rem 0.5rem !important; }
    .badge i { font-size: 0.5rem !important; }
    .announcement-item [style*="background:#e8f5e9"],
    .announcement-item [style*="background:#e3f2fd"] { font-size: 0.6rem !important; padding: 0.15rem 0.5rem !important; }
    .read-status-table { font-size: 0.65rem !important; }
    .read-status-table th, .read-status-table td { padding: 0.3rem 0.4rem !important; }
    .status-read, .status-unread { font-size: 0.65rem !important; }

    .form-group input,
    .form-group select,
    .form-group textarea { font-size: 0.8rem !important; padding: 0.5rem !important; }
    .form-group label { font-size: 0.7rem !important; }
    .info-box { font-size: 0.7rem !important; padding: 0.5rem !important; }
    .btn-save { font-size: 0.75rem !important; padding: 0.5rem !important; }

    .resident-checkbox-item { padding: 0.5rem 0.6rem !important; }
    .resident-name    { font-size: 0.75rem !important; }
    .resident-details { font-size: 0.6rem !important; }
    #residentSelectionModal button { padding: 0.5rem !important; font-size: 0.75rem !important; }

    .alert-success, .alert-error { font-size: 0.7rem !important; padding: 0.5rem !important; }

    .login-card, .forgot-card { padding: 1rem 0.75rem !important; }
    .login-brand-title { font-size: 1.3rem !important; }
    .register-container { padding: 0.75rem 0.5rem !important; }
    .register-brand-title { font-size: 1.3rem !important; }
    .photo-upload, .file-upload-box { min-height: 100px !important; padding: 0.5rem !important; }
    .photo-preview, .photo-placeholder { width: 50px !important; height: 50px !important; }
    .btn-register-submit { font-size: 0.85rem !important; padding: 0.7rem !important; min-height: 44px !important; }

    .db-page .profile-avatar { width: 68px !important; height: 68px !important; }
    .db-page .profile-name   { font-size: 1rem !important; }
    .db-page .db-card-head button { font-size: 0.68rem !important; padding: 8px 5px !important; }

    .form-actions { flex-direction: column-reverse !important; }
    .btn-cancel, .btn-save { width: 100% !important; text-align: center !important; justify-content: center !important; }
    .confirm-actions { flex-direction: column !important; }
    .confirm-yes, .confirm-no { width: 100% !important; justify-content: center !important; }
    .btn-filter { padding: 8px 12px !important; font-size: .82rem !important; }
}

/* ═══════════════════════════════════════════════════════════
   20. DESKTOP (≥ 901px) — ensure sidebar visible
═══════════════════════════════════════════════════════════ */
@media (min-width: 901px) {
    .db-sidebar, #dbSidebar {
        position: fixed !important;
        transform: translateX(0) !important;
        transition: none !important;
    }
    .sidebar-overlay, #sidebarOverlay { display: none !important; }
    .hamburger-btn { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   21. PRINT STYLES
═══════════════════════════════════════════════════════════ */
@media print {
    .db-sidebar, #dbSidebar, .db-topbar, .page-toolbar,
    .btn-add, .btn-save, .read-status-btn,
    .modal, .modal-overlay, #residentSelectionModal,
    .info-box, .announcement-meta,
    .hamburger-btn, .sidebar-overlay, #sidebarToggleCheck {
        display: none !important;
    }
    .db-main { margin: 0 !important; padding: 0 !important; }
    .db-page { padding: 0 !important; }
    .db-card { box-shadow: none !important; border: 1px solid #ddd !important; }
    .announcement-item {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        border-bottom: 1px solid #ddd !important;
    }
    .welcome-banner {
        background: #1b6b4a !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .welcome-banner > div:last-child { display: block !important; }
    .badge {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        border: 1px solid #ddd !important;
    }
    .db-sidebar { transform: none !important; position: static !important; width: auto !important; height: auto !important; }
}