/* ============================================
   SUN TOWER RWA — Resident Portal Styles
   ============================================ */

:root {
  --primary: #1a237e;
  --primary-light: #283593;
  --primary-dark: #0d1b4a;
  --secondary: #ff6f00;
  --secondary-light: #ff8f00;
  --accent: #00695c;
  --bg: #f5f5f5;
  --card: #fff;
  --text: #212121;
  --text-light: #666;
  --light: #e8eaf6;
  --success: #2e7d32;
  --warning: #f57f17;
  --danger: #c62828;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: var(--bg); color: var(--text); -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== HEADER ========== */
.site-header { background: linear-gradient(90deg, #0d1b4a, #1a237e); color: #fff; padding: 6px 20px; display: flex; align-items: center; gap: 12px; position: fixed; top: 0; left: 0; right: 0; z-index: 1001; height: 48px; }
.site-header .logo-sm { width: 34px; height: 34px; background: linear-gradient(135deg, #ff6f00, #ff8f00); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
.site-header .logo-sm svg { width: 24px; height: 24px; }
.site-header .header-text { flex: 1; }
.site-header .header-title { font-size: 0.85rem; font-weight: 700; letter-spacing: 1px; }
.site-header .header-sub { font-size: 0.62rem; color: #90caf9; }
.header-right { display: flex; align-items: center; gap: 10px; }
.header-user { font-size: 0.75rem; color: #a5d6a7; }
.header-btn { background: rgba(255,255,255,0.15); color: #fff; border: none; padding: 4px 12px; border-radius: 4px; font-size: 0.72rem; cursor: pointer; transition: 0.2s; }
.header-btn:hover { background: rgba(255,255,255,0.3); }

/* ========== PAGE CONTENT ========== */
.page { display: none; min-height: 100vh; padding: 60px 20px 40px; max-width: 1200px; margin: 0 auto; }
.page.active { display: block; }
.page-title { font-size: 1.8rem; color: var(--primary); border-bottom: 3px solid var(--secondary); padding-bottom: 10px; margin-bottom: 20px; }
.page-subtitle { font-size: 1rem; color: var(--text-light); margin-bottom: 20px; }

/* ========== CARDS ========== */
.card { background: var(--card); border-radius: 10px; padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); border-left: 4px solid var(--primary); transition: box-shadow 0.2s; }
.card:hover { box-shadow: var(--shadow-lg); }
.card h3 { color: var(--primary); margin-bottom: 8px; }
.card ul { padding-left: 20px; }
.card li { margin-bottom: 5px; line-height: 1.5; }

/* ========== GRIDS ========== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ========== TABLES ========== */
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.9rem; }
th { background: var(--primary); color: #fff; padding: 10px 8px; text-align: left; }
td { padding: 8px; border-bottom: 1px solid var(--border); }
tr:nth-child(even) { background: #f9f9f9; }
tr:hover { background: #e8eaf6; }

/* ========== BADGES ========== */
.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; color: #fff; }
.badge-president { background: #b71c1c; }
.badge-vp { background: #4a148c; }
.badge-gs { background: #1a237e; }
.badge-vgs { background: #01579b; }
.badge-treasurer { background: #004d40; }
.badge-vt { background: #1b5e20; }
.badge-member { background: #e65100; }
.badge-success { background: var(--success); }
.badge-warning { background: var(--warning); color: #333; }
.badge-danger { background: var(--danger); }
.badge-info { background: #0277bd; }

/* ========== BUTTONS ========== */
.btn { padding: 10px 24px; border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.action-bar { display: flex; gap: 10px; margin: 20px 0; flex-wrap: wrap; }

/* ========== FORMS ========== */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: 600; color: var(--primary); margin-bottom: 4px; font-size: 0.85rem; }
.form-control { width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: 8px; font-size: 0.9rem; transition: 0.2s; font-family: inherit; }
.form-control:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(26,35,126,0.15); }
textarea.form-control { min-height: 80px; resize: vertical; }
select.form-control { appearance: auto; }

/* ========== AUTH / LOGIN ========== */
.auth-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.auth-overlay.hidden { display: none; }
.auth-card { background: #fff; border-radius: 16px; padding: 40px; width: 90%; max-width: 420px; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.auth-card h2 { color: var(--primary); margin-bottom: 5px; text-align: center; }
.auth-card .auth-sub { color: var(--text-light); text-align: center; margin-bottom: 25px; font-size: 0.9rem; }
.auth-card .auth-logo { text-align: center; margin-bottom: 15px; }
.auth-card .auth-logo div { display: inline-flex; width: 60px; height: 60px; background: linear-gradient(135deg, #ff6f00, #ff8f00); border-radius: 14px; align-items: center; justify-content: center; }
.auth-error { background: #ffebee; color: var(--danger); padding: 10px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 15px; display: none; }
.auth-success { background: #e8f5e9; color: var(--success); padding: 10px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 15px; display: none; }
.auth-link { color: var(--primary); cursor: pointer; font-size: 0.85rem; text-align: center; margin-top: 15px; }
.auth-link:hover { text-decoration: underline; }

/* ========== NOTICE BOARD ========== */
.notice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.notice-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: 0.3s; border-top: 4px solid var(--primary); }
.notice-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.notice-card .notice-body { padding: 15px; }
.notice-card .notice-date { font-size: 0.75rem; color: var(--text-light); }
.notice-card .notice-title { font-size: 1rem; font-weight: 700; color: var(--primary); margin: 5px 0; }
.notice-card .notice-summary { font-size: 0.85rem; color: var(--text-light); line-height: 1.4; }
.notice-card .notice-cat { margin-top: 8px; }
.notice-filter { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.notice-filter-btn { padding: 6px 16px; border-radius: 20px; border: 2px solid var(--border); background: #fff; font-size: 0.8rem; cursor: pointer; font-weight: 600; transition: 0.2s; }
.notice-filter-btn.active, .notice-filter-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ========== NOTICE PREVIEW MODAL ========== */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.hidden { display: none; }
.modal-content { background: #fff; border-radius: 12px; width: 90%; max-width: 800px; max-height: 90vh; overflow: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { color: var(--primary); }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-light); padding: 5px; }
.modal-body { padding: 20px; }
.modal-body img { max-width: 100%; border-radius: 8px; }
.modal-body iframe { width: 100%; min-height: 500px; border: none; border-radius: 8px; }

/* ========== CHATBOT ========== */
.chatbot-widget { position: fixed; bottom: 20px; right: 20px; z-index: 500; }
.chatbot-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--secondary); color: #fff; border: none; font-size: 1.5rem; cursor: pointer; box-shadow: 0 4px 16px rgba(255,111,0,0.4); transition: 0.3s; }
.chatbot-btn:hover { transform: scale(1.1); }
.chatbot-panel { position: fixed; bottom: 85px; right: 20px; width: 360px; max-height: 500px; background: #fff; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); overflow: hidden; display: none; z-index: 501; }
.chatbot-panel.open { display: flex; flex-direction: column; }
.chatbot-header { background: var(--primary); color: #fff; padding: 15px; display: flex; align-items: center; justify-content: space-between; }
.chatbot-header h4 { font-size: 0.95rem; }
.chatbot-messages { flex: 1; padding: 15px; overflow-y: auto; max-height: 300px; min-height: 200px; }
.chat-msg { margin-bottom: 12px; }
.chat-msg-bot { background: #e8eaf6; padding: 10px 14px; border-radius: 12px 12px 12px 2px; font-size: 0.85rem; max-width: 85%; }
.chat-msg-user { background: var(--primary); color: #fff; padding: 10px 14px; border-radius: 12px 12px 2px 12px; font-size: 0.85rem; max-width: 85%; margin-left: auto; }
.chatbot-input { display: flex; padding: 10px; border-top: 1px solid var(--border); gap: 8px; }
.chatbot-input input { flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 20px; font-size: 0.85rem; }
.chatbot-input button { background: var(--secondary); color: #fff; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1rem; }

/* ========== EMERGENCY CONTACTS ========== */
.contact-card { display: flex; align-items: center; gap: 12px; background: #fff; padding: 12px 15px; border-radius: 8px; box-shadow: var(--shadow); }
.contact-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; }

/* ========== RESIDENT QUICK ACCESS GRID ========== */
.res-quick-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px;
}
.res-quick-tile {
  background: #fff; border-radius: 14px; padding: 24px 16px; text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06); cursor: pointer; transition: 0.3s;
  border: 1px solid #f0f0f0; position: relative;
}
.res-quick-tile:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); border-color: var(--accent); }
.res-tile-icon { font-size: 2.2rem; margin-bottom: 8px; transition: transform 0.2s; }
.res-tile-label { color: var(--primary); font-size: 0.92rem; font-weight: 600; }
.res-quick-tile { background: var(--tile-bg, #fff); }
.res-quick-tile:hover .res-tile-icon { transform: scale(1.1); }
.res-tile-badge {
  position: absolute; top: 8px; right: 8px; background: #b71c1c; color: #fff;
  font-size: 0.7rem; width: 22px; height: 22px; border-radius: 50%; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.res-quick-badge {
  position: absolute; top: 10px; right: 10px; background: #b71c1c; color: #fff;
  font-size: 0.65rem; padding: 2px 8px; border-radius: 10px; font-weight: 700;
}

/* ========== ACTIVITY FEED ========== */
.activity-feed { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.activity-feed h3 { color: var(--primary); margin-bottom: 14px; font-size: 1rem; }
.activity-item {
  display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f5f5f5;
  font-size: 0.85rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 0.9rem; flex-shrink: 0;
}
.activity-content { flex: 1; }
.activity-text { font-weight: 500; font-size: 0.88rem; color: #333; }
.activity-meta { font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }
.activity-time { font-size: 0.72rem; color: var(--text-light); margin-top: 2px; }

/* ========== POLLS ========== */
.poll-card {
  background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0; margin-bottom: 16px;
}
.poll-question { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin-bottom: 14px; }
.poll-option {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 8px;
  background: #f9f9f9; border-radius: 10px; cursor: pointer; transition: 0.2s;
  border: 2px solid transparent;
}
.poll-option:hover { background: #e8eaf6; border-color: #c5cae9; }
.poll-option.voted { background: #e8eaf6; border-color: var(--primary); }
.poll-option-bar {
  height: 6px; background: #e0e0e0; border-radius: 3px; flex: 1; overflow: hidden;
}
.poll-option-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.3s; }
.poll-option-pct { font-size: 0.8rem; font-weight: 700; color: var(--primary); min-width: 40px; text-align: right; }

/* ========== EVENTS ========== */
.event-card {
  background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 10px;
  box-shadow: var(--shadow); border-left: 4px solid var(--accent);
  display: flex; gap: 14px; align-items: center;
}
.event-date-box {
  background: var(--primary); color: #fff; border-radius: 10px; padding: 8px 12px;
  text-align: center; flex-shrink: 0; min-width: 55px;
}
.event-date-day { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.event-date-month { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; }

/* ========== PROJECT CARDS ========== */
.proj-summary-card { background: #fff; border-radius: 10px; padding: 18px; box-shadow: var(--shadow); border-left: 4px solid var(--primary); transition: 0.2s; margin-bottom: 12px; }
.proj-summary-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.proj-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.proj-card-title { font-size: 1.05rem; font-weight: 700; margin: 0; line-height: 1.3; }
.proj-card-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-light); margin-bottom: 12px; }
.proj-card-meta strong { color: var(--text); }
.proj-card-progress { margin-bottom: 12px; }
.proj-card-progress-bar { background: #e0e0e0; border-radius: 8px; height: 20px; position: relative; overflow: hidden; }
.proj-card-progress-fill { height: 100%; border-radius: 8px; transition: width 0.3s; }
.proj-card-progress-text { position: absolute; top: 1px; width: 100%; text-align: center; font-size: 0.7rem; font-weight: 700; }

/* ========== COMPLAINT CARD ========== */
.complaint-card {
  background: #fff; border-radius: 10px; padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow); border-left: 4px solid var(--primary); transition: 0.2s;
}
.complaint-card:hover { box-shadow: var(--shadow-lg); }
.complaint-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.complaint-card-title { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.complaint-card-meta { font-size: 0.78rem; color: var(--text-light); margin-bottom: 8px; }
.complaint-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.complaint-card[data-priority="Critical"] { border-left-color: #b71c1c; }
.complaint-card[data-priority="High"] { border-left-color: #e65100; }
.complaint-card[data-priority="Medium"] { border-left-color: #f57f17; }
.complaint-card[data-priority="Low"] { border-left-color: #2e7d32; }

/* ========== TOAST NOTIFICATION ========== */
.toast-container {
  position: fixed; top: 60px; right: 20px; z-index: 5000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: #333; color: #fff; padding: 12px 20px; border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2); font-size: 0.85rem;
  animation: toastSlide 0.3s ease-out; max-width: 360px;
}
.toast-success { background: #2e7d32; }
.toast-error { background: #c62828; }
.toast-info { background: #1565c0; }
@keyframes toastSlide { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ========== KPI EMPTY STATE ========== */
.kpi-empty {
  padding: 30px 20px; text-align: center; color: #999;
  font-size: 0.9rem; background: #fafafa; border-radius: 10px;
}

/* ========== SESSION EXPIRED OVERLAY ========== */
.session-expired-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000;
  background: rgba(13, 27, 74, 0.95); display: flex; align-items: center; justify-content: center;
  flex-direction: column; transition: opacity 0.4s, visibility 0.4s;
}
.session-expired-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.session-expired-card {
  background: #fff; border-radius: 16px; padding: 40px 30px; text-align: center;
  max-width: 380px; width: 90%; box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: sessionSlideIn 0.4s ease-out;
}
@keyframes sessionSlideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.session-expired-icon { font-size: 3.5rem; margin-bottom: 15px; }
.session-expired-card h2 { color: var(--primary); margin-bottom: 8px; font-size: 1.3rem; }
.session-expired-card p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 20px; }
.session-expired-card .btn { width: 100%; padding: 14px; font-size: 1rem; }

/* ========== LOADING STATES ========== */
.loading-spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 3px solid #e0e0e0; border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
.loading-spinner-lg { width: 40px; height: 40px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 30px; color: var(--text-light); font-size: 0.9rem;
}
.loading-overlay.hidden { display: none; }

/* ========== MOBILE BOTTOM NAV ========== */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  z-index: 3000;
  justify-content: space-around;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.mob-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px; cursor: pointer; text-decoration: none; color: #999;
  transition: 0.2s; border-radius: 8px; min-width: 60px;
  -webkit-tap-highlight-color: transparent;
}
.mob-nav-item.active { color: #1a237e; }
.mob-nav-item:active { background: #e8eaf6; }
.mob-nav-icon { font-size: 1.4rem; line-height: 1; }
.mob-nav-label { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.3px; }

/* ========== PRINT ========== */
@media print {
  .site-header, .chatbot-widget, .auth-overlay, .modal-overlay, .mobile-bottom-nav { display: none !important; }
  .page { display: block !important; page-break-after: always; padding-top: 20px; }
  .btn, .action-bar { display: none !important; }
}

/* ========== RESPONSIVE: 768px ========== */
@media (max-width: 768px) {
  .page { padding: 56px 10px 30px; }
  .page-title { font-size: 1.2rem; padding-bottom: 8px; margin-bottom: 14px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 12px; }
  .notice-grid { grid-template-columns: 1fr; gap: 12px; }
  .notice-filter { gap: 4px; }
  .notice-filter-btn { padding: 5px 10px; font-size: 0.72rem; min-height: 36px; }
  table { font-size: 0.78rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { padding: 6px 5px; white-space: nowrap; }
  .card { padding: 14px; margin-bottom: 12px; }
  .card h3 { font-size: 1rem; }
  .btn { padding: 10px 16px; font-size: 0.82rem; min-height: 44px; }
  .btn-lg { padding: 12px 24px; font-size: 0.9rem; min-height: 48px; }
  .btn-sm { padding: 8px 14px; font-size: 0.78rem; min-height: 38px; }
  .action-bar { gap: 6px; }
  .auth-card { padding: 25px 18px; width: 95%; }
  .form-control { padding: 10px 12px; font-size: 0.88rem; min-height: 44px; }
  textarea.form-control { min-height: 80px; }
  select.form-control { min-height: 44px; }
  .chatbot-panel { width: calc(100% - 20px); right: 10px; bottom: 75px; }
  .chatbot-btn { width: 48px; height: 48px; font-size: 1.2rem; }
  .modal-content { width: 97%; max-width: none; border-radius: 10px; max-height: 92vh; }
  .modal-header { padding: 12px 14px; }
  .modal-header h3 { font-size: 1rem; }
  .modal-close { font-size: 1.8rem; padding: 8px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .modal-body { padding: 12px; }
  .modal-body iframe { min-height: 300px; }
  .site-header { padding: 4px 10px; height: 44px; }
  .site-header .header-title { font-size: 0.78rem; }
  .site-header .header-sub { font-size: 0.58rem; }
  .header-right { gap: 6px; }
  .header-user { font-size: 0.65rem; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-btn { padding: 4px 10px; font-size: 0.68rem; min-height: 32px; }
  .contact-card { padding: 10px; gap: 8px; flex-wrap: wrap; }
  .contact-icon { width: 36px; height: 36px; font-size: 0.95rem; }
  .session-expired-card { padding: 30px 20px; }
  .complaint-card { padding: 12px; }
  .proj-summary-card { padding: 14px 12px; }
  .proj-card-header { flex-direction: column; gap: 6px; margin-bottom: 8px; }
  .proj-card-title { font-size: 0.95rem; }
  .proj-card-meta { gap: 8px; font-size: 0.72rem; margin-bottom: 8px; }
}

/* ========== RESPONSIVE: 900px (resident layout) ========== */
@media (max-width: 900px) {
  .res-quick-grid { grid-template-columns: repeat(3, 1fr); }
  .res-top-row { grid-template-columns: 1fr 1fr; }
  .res-fin-charts { grid-template-columns: 1fr; }
  .res-fin-summary { grid-template-columns: repeat(3, 1fr); }
}

/* ========== RESPONSIVE: 600px ========== */
@media (max-width: 600px) {
  .mobile-bottom-nav { display: flex !important; }
  body { padding-bottom: 70px; }
  .chatbot-widget { bottom: 80px; }
  .res-quick-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .res-quick-tile { padding: 16px 10px; border-radius: 10px; }
  .res-tile-icon { font-size: 1.8rem; }
  .res-tile-label { font-size: 0.82rem; }
  .res-top-row { grid-template-columns: 1fr !important; }
  .res-fin-charts { grid-template-columns: 1fr !important; }
  .res-fin-summary { grid-template-columns: 1fr !important; }
  .event-card { flex-direction: column; text-align: center; }
}

/* ========== RESPONSIVE: 480px ========== */
@media (max-width: 480px) {
  .page { padding: 52px 8px 25px; }
  .page-title { font-size: 1.05rem; }
  .card { padding: 12px 10px; }
  .card h3 { font-size: 0.92rem; }
  .grid-2, .grid-3 { gap: 8px; }
  .form-control { padding: 9px 10px; font-size: 0.85rem; }
  .btn { padding: 9px 14px; font-size: 0.78rem; }
  .modal-content { width: 98%; border-radius: 8px; }
  .modal-header { padding: 10px 12px; }
  .modal-header h3 { font-size: 0.92rem; }
  .modal-body { padding: 10px; }
  .contact-card { flex-direction: column; text-align: center; }
  .contact-icon { margin: 0 auto; }
  .header-user { display: none; }
  .notice-card .notice-title { font-size: 0.9rem; }
  .notice-card .notice-summary { font-size: 0.78rem; }
  .session-expired-card { padding: 25px 15px; }
  .session-expired-card h2 { font-size: 1.1rem; }
  .res-quick-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .res-quick-tile { padding: 14px 8px; }
  .res-tile-icon { font-size: 1.5rem; margin-bottom: 4px; }
  .res-tile-label { font-size: 0.75rem; }
}

/* ========== RESPONSIVE: 400px ========== */
@media (max-width: 400px) {
  .site-header { padding: 3px 8px; height: 40px; }
  .site-header .header-title { font-size: 0.72rem; }
  .site-header .logo-sm { width: 28px; height: 28px; border-radius: 6px; }
  .site-header .logo-sm svg { width: 20px; height: 20px; }
}
