/* DDO.today — Smart City Platform design system (emerald brand, light default, dark supported) */

:root {
  --bg-main: #f4fbf7;
  --bg-soft: #ecf7f1;
  --bg-card: #ffffff;
  --bg-card-hover: #e8f5ee;
  --bg-nav: rgba(255, 255, 255, 0.97);
  --border-color: rgba(5, 120, 85, 0.16);
  --border-strong: rgba(5, 120, 85, 0.32);
  --border-glow: rgba(16, 185, 129, 0.45);

  --text-main: #0b3b2e;
  --text-muted: #334155;
  --text-dim: #52606d;

  --accent-green: #047857;
  --accent-emerald: #059669;
  --accent-teal: #0f766e;
  --accent-forest: #065f46;
  --accent-blue: #047857;
  --accent-amber: #b45309;
  --accent-rose: #be123c;
  --accent-sky: #0369a1;
  --accent-purple: #6d28d9;

  --gradient-primary: linear-gradient(135deg, #047857 0%, #0f766e 100%);
  --gradient-urgent: linear-gradient(135deg, #be123c 0%, #c2410c 100%);
  --gradient-hero: radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.16) 0%, transparent 55%), radial-gradient(circle at 90% 30%, rgba(13, 148, 136, 0.12) 0%, transparent 50%);

  --shadow-sm: 0 1px 3px rgba(6, 78, 59, 0.08), 0 1px 2px rgba(6, 78, 59, 0.04);
  --shadow-md: 0 6px 18px -4px rgba(6, 78, 59, 0.14);
  --shadow-lg: 0 16px 40px -8px rgba(6, 78, 59, 0.2);
  --focus-ring: 0 0 0 3px #fff, 0 0 0 6px #0e7490;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --container: 1240px;
  --transition-fast: all 0.18s ease;
}

[data-theme="dark"] {
  --bg-main: #06140f;
  --bg-soft: #0a1f18;
  --bg-card: #0e261d;
  --bg-card-hover: #133327;
  --bg-nav: rgba(6, 20, 15, 0.96);
  --border-color: rgba(52, 211, 153, 0.18);
  --border-strong: rgba(52, 211, 153, 0.35);
  --text-main: #ecfdf5;
  --text-muted: #cbd5e1;
  --text-dim: #9fb3aa;
  --accent-green: #34d399;
  --accent-emerald: #10b981;
  --accent-blue: #34d399;
  --accent-amber: #fbbf24;
  --accent-rose: #fb7185;
  --accent-sky: #38bdf8;
  --accent-purple: #a78bfa;
  --shadow-md: 0 6px 18px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.6);
  --focus-ring: 0 0 0 3px #06140f, 0 0 0 6px #67e8f9;
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1 0 auto; outline: none; }
h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', system-ui, sans-serif; font-weight: 700; color: var(--text-main); line-height: 1.25; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
p + p { margin-top: 0.75em; }
ul, ol { padding-left: 1.25rem; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 5000; background: #064e3b; color: #fff; padding: 10px 18px; border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { top: 12px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--text-dim); }
.small, small { font-size: 0.85rem; }
.center { text-align: center; justify-content: center; }
.pad { padding: 16px; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.lead { font-size: 1.15rem; color: var(--text-dim); max-width: 70ch; }

/* ---------- alert bar & utility bar ---------- */
.alert-bar { color: #fff; font-size: 0.95rem; }
.alert-high { background: linear-gradient(90deg, #92400e, #b45309); }
.alert-emergency { background: linear-gradient(90deg, #9f1239, #be123c); }
.alert-bar-inner { max-width: var(--container); margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 12px; }
.alert-bar-badge { background: rgba(0, 0, 0, 0.25); padding: 2px 10px; border-radius: var(--radius-full); font-weight: 800; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.alert-bar-text { color: #fff; font-weight: 600; flex: 1; }
.alert-bar-text:hover { color: #fff; }
.alert-bar-more { text-decoration: underline; white-space: nowrap; margin-left: 6px; }
.alert-bar-close { background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; font-size: 1rem; }

.utility-bar { background: #022c22; color: #a7f3d0; font-size: 0.85rem; }
.utility-inner { max-width: var(--container); margin: 0 auto; padding: 6px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.utility-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.utility-bar a { color: #d1fae5; }
.lang-select { background: #064e3b; color: #ecfdf5; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: var(--radius-sm); padding: 3px 8px; font: inherit; font-size: 0.82rem; cursor: pointer; }

/* ---------- navbar ---------- */
.navbar { position: sticky; top: 0; z-index: 1000; background: var(--bg-nav); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.nav-container { max-width: var(--container); margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; position: relative; }
.brand-logo { display: inline-flex; align-items: center; gap: 10px; font-family: 'Outfit', sans-serif; font-size: 1.45rem; font-weight: 800; color: var(--text-main); letter-spacing: -0.5px; flex-shrink: 0; }
.brand-logo:hover { text-decoration: none; color: var(--text-main); }
.brand-logo .logo-icon { width: 38px; height: 38px; background: var(--gradient-primary); border-radius: var(--radius-md); display: grid; place-items: center; color: #fff; font-size: 1.1rem; box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3); }
.brand-logo .accent { color: var(--accent-emerald); }
.main-nav { flex: 1; min-width: 0; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; padding: 0; flex-wrap: nowrap; justify-content: center; }
.nav-link { font-weight: 600; font-size: 0.9rem; color: var(--text-main); padding: 8px 10px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.nav-link i { color: var(--accent-green); font-size: 0.9rem; }
.nav-link:hover { background: var(--bg-card-hover); text-decoration: none; color: var(--text-main); }
.nav-link.active { background: var(--gradient-primary); color: #fff; }
.nav-link.active i { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mobile-toggle { display: none !important; }
.mobile-only { display: none; }
button.nav-link { background: none; border: 0; cursor: pointer; width: 100%; text-align: left; font: inherit; font-weight: 600; }

.btn-icon { width: 40px; height: 40px; border-radius: var(--radius-md); border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-main); display: inline-grid; place-items: center; cursor: pointer; transition: var(--transition-fast); position: relative; flex-shrink: 0; }
.btn-icon:hover { background: var(--bg-card-hover); border-color: var(--accent-green); color: var(--accent-green); text-decoration: none; }
.has-badge .badge-dot { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent-rose); color: #fff; font-size: 0.7rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg-card); }
.account-btn { display: flex; align-items: center; gap: 8px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-full); padding: 3px 12px 3px 3px; cursor: pointer; }
.account-btn:hover { border-color: var(--accent-green); }
.account-name { font-weight: 600; font-size: 0.9rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 6px; z-index: 1500; }
.dropdown-menu > a, .dropdown-menu form button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; color: var(--text-main); border-radius: var(--radius-sm); font-size: 0.93rem; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown-menu > a:hover, .dropdown-menu form button:hover { background: var(--bg-card-hover); text-decoration: none; }
.dropdown-menu i { width: 18px; color: var(--accent-green); }
.notif-menu { width: min(380px, 92vw); padding: 0; }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border-color); }
.dropdown-foot { display: block; text-align: center; padding: 10px; border-top: 1px solid var(--border-color); font-weight: 600; font-size: 0.9rem; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-color); color: var(--text-main); font-size: 0.9rem; }
.notif-item:hover { background: var(--bg-card-hover); text-decoration: none; }
.notif-item.unread { background: rgba(16, 185, 129, 0.07); }
.notif-item.unread .notif-title::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-emerald); margin-right: 6px; vertical-align: middle; }
.notif-title { font-weight: 600; display: block; }
.notif-body { color: var(--text-dim); font-size: 0.85rem; display: block; }
.notif-time { color: var(--text-dim); font-size: 0.78rem; }

/* ---------- buttons ---------- */
.btn-primary, .btn-secondary, .btn-danger, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 0.95rem; padding: 11px 22px; border-radius: var(--radius-md); cursor: pointer; transition: var(--transition-fast); line-height: 1.2; text-align: center; border: 1px solid transparent; min-height: 44px; }
.btn-primary { background: var(--gradient-primary); color: #fff; box-shadow: 0 4px 14px rgba(4, 120, 87, 0.28); }
.btn-primary:hover { color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(4, 120, 87, 0.38); }
.btn-secondary { background: var(--bg-card); border-color: var(--border-strong); color: var(--text-main); }
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--accent-green); color: var(--text-main); text-decoration: none; }
.btn-secondary.active { background: rgba(16, 185, 129, 0.12); border-color: var(--accent-green); color: var(--accent-green); }
.btn-danger { background: #be123c; color: #fff; }
.btn-danger:hover { background: #9f1239; color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--accent-green); }
.btn-ghost:hover { background: var(--bg-card-hover); text-decoration: none; }
.btn-sm { padding: 7px 14px; font-size: 0.86rem; min-height: 36px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
button[disabled], .btn-primary[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; transform: none; }
.link-btn { background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: 0.85rem; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: 6px; }
.link-btn:hover { color: var(--accent-green); background: var(--bg-card-hover); }
.link-btn.danger:hover { color: var(--accent-rose); }
.inline-form { display: inline; }
.is-loading { position: relative; pointer-events: none; opacity: 0.75; }
.is-loading::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin 0.7s linear infinite; margin-left: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- layout ---------- */
.section { padding: 48px 20px; }
.section-tight { padding: 28px 20px; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.section-container { max-width: var(--container); margin: 0 auto; }
.section-container.narrow { max-width: 820px; }
.section-container.medium { max-width: 1000px; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-title-wrap h2 { margin-bottom: 4px; }
.section-title-wrap p { color: var(--text-dim); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.layout-sidebar-left { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* page hero */
.page-hero { padding: 40px 20px 28px; background: var(--gradient-hero); border-bottom: 1px solid var(--border-color); }
.page-hero .section-container { display: flex; flex-direction: column; gap: 10px; }
.page-hero h1 .gradient-text, .gradient-text { background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.page-hero p { color: var(--text-dim); max-width: 70ch; font-size: 1.08rem; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--accent-green); font-size: 0.82rem; font-weight: 700; padding: 5px 12px; border-radius: var(--radius-full); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-actions.center { justify-content: center; }

/* home hero */
.home-hero { padding: 44px 20px 36px; background: var(--gradient-hero); border-bottom: 1px solid var(--border-color); }
.home-hero-grid { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.home-hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 10px 0 12px; }
.home-search { display: flex; gap: 8px; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 6px; box-shadow: var(--shadow-md); margin: 18px 0 14px; max-width: 620px; }
.home-search input { flex: 1; border: 0; background: transparent; padding: 10px 12px; font: inherit; color: var(--text-main); min-width: 0; }
.home-search input:focus { outline: none; }
.home-search:focus-within { box-shadow: var(--focus-ring); }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick-action { display: flex; gap: 12px; align-items: center; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 16px; color: var(--text-main); box-shadow: var(--shadow-sm); transition: var(--transition-fast); }
.quick-action:hover { border-color: var(--accent-green); transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; color: var(--text-main); }
.quick-action.active { border-color: var(--accent-green); box-shadow: 0 0 0 2px rgba(16,185,129,.25); }
.quick-action .qa-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; background: rgba(16, 185, 129, 0.12); color: var(--accent-green); font-size: 1.2rem; flex-shrink: 0; }
.quick-action strong { display: block; font-size: 0.98rem; }
.quick-action span { font-size: 0.82rem; color: var(--text-dim); }

/* ---------- cards ---------- */
.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.card-tight { padding: 16px; }
.card h2, .card h3 { margin-bottom: 10px; }
.card-title { font-size: 1.1rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--accent-green); }

.post-card, .business-card, .story-card, .event-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition-fast); display: flex; flex-direction: column; position: relative; }
.post-card:hover, .business-card:hover, .story-card:hover, .event-card:hover { border-color: var(--border-glow); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card-link:hover { text-decoration: none; }
.post-card .reaction-group, .post-card button, .post-card form, .story-card .reaction-group { position: relative; z-index: 2; }
.post-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.4rem; color: var(--accent-green); background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(13, 148, 136, 0.18)); }
.post-category-badge { position: absolute; top: 12px; left: 12px; background: rgba(255, 255, 255, 0.95); color: #065f46; font-size: 0.74rem; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-full); box-shadow: var(--shadow-sm); z-index: 2; }
.urgent-badge { position: absolute; top: 12px; right: 12px; background: var(--accent-rose); color: #fff; font-size: 0.74rem; font-weight: 800; padding: 4px 10px; border-radius: var(--radius-full); z-index: 2; }
.post-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.post-meta { display: flex; align-items: center; gap: 12px; font-size: 0.82rem; color: var(--text-dim); flex-wrap: wrap; }
.post-meta span { display: inline-flex; align-items: center; gap: 5px; }
.post-title { font-size: 1.15rem; line-height: 1.35; }
.post-title a { color: var(--text-main); }
.post-excerpt { font-size: 0.93rem; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 12px; margin-top: auto; border-top: 1px solid var(--border-color); font-size: 0.86rem; color: var(--text-dim); }

.tag { display: inline-flex; align-items: center; gap: 5px; background: rgba(16, 185, 129, 0.1); color: var(--accent-green); font-size: 0.76rem; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-full); }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 0.76rem; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-full); white-space: nowrap; border: 1px solid transparent; }
.status-green { background: #d1fae5; color: #065f46; } .status-blue { background: #dbeafe; color: #1e40af; } .status-purple { background: #ede9fe; color: #5b21b6; }
.status-amber { background: #fef3c7; color: #92400e; } .status-orange { background: #ffedd5; color: #9a3412; } .status-red { background: #ffe4e6; color: #9f1239; }
.status-gray { background: #f1f5f9; color: #334155; } .status-slate { background: #e2e8f0; color: #1e293b; }
[data-theme="dark"] .status-pill { filter: saturate(0.9) brightness(0.95); }
.role-badge { display: inline-block; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 7px; border-radius: var(--radius-full); background: #064e3b; color: #d1fae5; vertical-align: middle; }
.count-badge { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--bg-soft); color: var(--text-dim); font-size: 0.8rem; font-weight: 700; vertical-align: middle; }

/* announcements */
.ann-card { display: flex; gap: 14px; background: var(--bg-card); border: 1px solid var(--border-color); border-left: 5px solid var(--accent-green); border-radius: var(--radius-md); padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; }
.ann-card.priority-high { border-left-color: #d97706; background: linear-gradient(90deg, rgba(245, 158, 11, 0.08), var(--bg-card) 40%); }
.ann-card.priority-emergency { border-left-color: #be123c; background: linear-gradient(90deg, rgba(225, 29, 72, 0.1), var(--bg-card) 40%); }
.ann-icon { width: 42px; height: 42px; border-radius: var(--radius-md); display: grid; place-items: center; background: rgba(16, 185, 129, 0.12); color: var(--accent-green); flex-shrink: 0; font-size: 1.1rem; }
.priority-high .ann-icon { background: rgba(245, 158, 11, 0.18); color: #b45309; }
.priority-emergency .ann-icon { background: rgba(225, 29, 72, 0.15); color: #be123c; }
.ann-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.ann-card h3 a { color: var(--text-main); }
.ann-card p { font-size: 0.92rem; color: var(--text-dim); }
.priority-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.priority-high .priority-label { color: #b45309; }
.priority-emergency .priority-label { color: #be123c; }

/* business */
.business-cover { aspect-ratio: 16 / 7; background: var(--bg-soft); overflow: hidden; }
.business-cover img { width: 100%; height: 100%; object-fit: cover; }
.business-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.business-logo { width: 56px; height: 56px; border-radius: var(--radius-md); border: 3px solid var(--bg-card); background: var(--bg-card); box-shadow: var(--shadow-sm); overflow: hidden; margin-top: -40px; position: relative; z-index: 2; display: grid; place-items: center; color: var(--accent-green); font-weight: 800; font-size: 1.3rem; }
.business-logo img { width: 100%; height: 100%; object-fit: cover; }
.business-meta { font-size: 0.85rem; color: var(--text-dim); display: flex; flex-direction: column; gap: 3px; }
.biz-header { position: relative; }
.biz-header-cover { height: 260px; background: var(--bg-soft); overflow: hidden; }
.biz-header-cover img { width: 100%; height: 100%; object-fit: cover; }
.biz-header-main { max-width: var(--container); margin: -60px auto 0; padding: 0 20px; display: flex; gap: 20px; align-items: flex-end; position: relative; flex-wrap: wrap; }
.biz-header-logo { width: 120px; height: 120px; border-radius: var(--radius-lg); border: 4px solid var(--bg-card); background: var(--bg-card); box-shadow: var(--shadow-md); overflow: hidden; display: grid; place-items: center; font-size: 2.6rem; color: var(--accent-green); font-weight: 800; }
.biz-header-logo img { width: 100%; height: 100%; object-fit: cover; }
.hours-table { width: 100%; font-size: 0.92rem; border-collapse: collapse; }
.hours-table td { padding: 5px 0; border-bottom: 1px dashed var(--border-color); }
.hours-table tr.today td { font-weight: 700; color: var(--accent-green); }
.info-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.95rem; }
.info-list li { display: flex; gap: 10px; align-items: flex-start; }
.info-list i { color: var(--accent-green); width: 18px; margin-top: 4px; }
.info-list a { word-break: break-word; }

/* councillors */
.councillor-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 22px; text-align: center; box-shadow: var(--shadow-sm); transition: var(--transition-fast); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.councillor-card:hover { border-color: var(--accent-green); box-shadow: var(--shadow-md); }
.district-badge { display: inline-block; background: var(--gradient-primary); color: #fff; font-weight: 800; font-size: 0.78rem; padding: 3px 12px; border-radius: var(--radius-full); }
.district-badge.mayor { background: var(--gradient-urgent); }
.councillor-avatar { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; border: 3px solid var(--accent-green); display: grid; place-items: center; background: var(--bg-soft); color: var(--accent-green); font-family: 'Outfit'; font-weight: 800; font-size: 1.8rem; }
.councillor-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mayor-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: center; }
.mayor-card .councillor-avatar { width: 170px; height: 170px; font-size: 3rem; }

/* forum */
.topic-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.topic-row + .topic-row { margin-top: 10px; }
.topic-row:hover { border-color: var(--border-glow); }
.topic-row.pinned { border-left: 4px solid var(--accent-amber); }
.topic-title { font-size: 1.05rem; font-weight: 700; }
.topic-title a { color: var(--text-main); }
.topic-flags { display: inline-flex; gap: 6px; margin-left: 6px; vertical-align: middle; }
.topic-flags i { font-size: 0.8rem; color: var(--accent-amber); }
.topic-stats { display: flex; gap: 16px; font-size: 0.85rem; color: var(--text-dim); text-align: center; }
.topic-stats strong { display: block; font-size: 1.05rem; color: var(--text-main); }
.forum-cats { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.forum-cats a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-main); font-weight: 600; font-size: 0.93rem; }
.forum-cats a:hover { background: var(--bg-card-hover); text-decoration: none; }
.forum-cats a.active { background: rgba(16, 185, 129, 0.14); color: var(--accent-green); }
.forum-cats i { width: 20px; color: var(--accent-green); }
.post-thread { display: flex; flex-direction: column; gap: 14px; }
.thread-post { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 18px; }
.thread-post.op { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.thread-body { font-size: 1rem; word-wrap: break-word; }
.thread-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 8px; }
.thread-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

/* stories */
.story-card .post-thumb { aspect-ratio: 4 / 3; }
.story-author { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; }
.story-type { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-teal); }
[data-theme="dark"] .story-type { color: #5eead4; }

/* avatar */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--gradient-primary); color: #fff; font-weight: 800; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 24px; height: 24px; font-size: 0.7rem; }
.avatar-sm { width: 34px; height: 34px; font-size: 0.85rem; }
.avatar-md { width: 48px; height: 48px; font-size: 1.1rem; }
.avatar-lg { width: 96px; height: 96px; font-size: 2rem; }
.avatar-xl { width: 140px; height: 140px; font-size: 3rem; border: 4px solid var(--bg-card); box-shadow: var(--shadow-md); }
.author-name { font-weight: 700; color: var(--text-main); }

/* ---------- forms ---------- */
.form-group { margin-bottom: 18px; border: 0; }
.form-label { display: block; font-weight: 700; font-size: 0.93rem; margin-bottom: 6px; color: var(--text-main); }
.form-label .req { color: var(--accent-rose); margin-left: 2px; }
.form-label .opt { color: var(--text-dim); font-weight: 500; font-size: 0.82rem; }
.form-input, .form-textarea, .form-select, .form-file { width: 100%; background: var(--bg-card); border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); padding: 11px 14px; color: var(--text-main); font: inherit; font-size: 1rem; transition: var(--transition-fast); min-height: 46px; }
.form-textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--accent-green); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25); }
.form-input[aria-invalid="true"], .form-textarea[aria-invalid="true"], .form-select[aria-invalid="true"] { border-color: var(--accent-rose); }
.form-file { padding: 9px; cursor: pointer; }
.form-help { font-size: 0.82rem; color: var(--text-dim); margin-top: 5px; }
.field-error { color: var(--accent-rose); font-size: 0.86rem; font-weight: 600; margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .span-2, .form-grid-3 .span-3 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.form-actions-right { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.check-row, .radio-row { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 0.95rem; cursor: pointer; }
.check-row input, .radio-row input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent-green); flex-shrink: 0; }
.form-alert { background: #fff1f2; border: 1px solid #fecdd3; color: #881337; border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 18px; font-size: 0.93rem; }
.form-alert ul { margin-top: 6px; }
.form-alert a { color: #881337; text-decoration: underline; }
[data-theme="dark"] .form-alert { background: rgba(190, 18, 60, 0.15); color: #fecdd3; border-color: rgba(251, 113, 133, 0.4); }
[data-theme="dark"] .form-alert a { color: #fecdd3; }
.file-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.file-previews figure { width: 92px; text-align: center; font-size: 0.72rem; color: var(--text-dim); }
.file-previews img { width: 92px; height: 70px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border-color); }
.char-count { font-size: 0.78rem; color: var(--text-dim); text-align: right; margin-top: 3px; }
.form-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 32px); box-shadow: var(--shadow-sm); }
.form-card h2 { margin-bottom: 6px; }
.form-section-title { font-size: 1.05rem; margin: 22px 0 12px; padding-top: 18px; border-top: 1px solid var(--border-color); }
.auth-wrap { max-width: 480px; margin: 0 auto; }
.existing-media { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.existing-media label { position: relative; display: block; width: 110px; font-size: 0.78rem; }
.existing-media img { width: 110px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border-color); }

/* filter bar */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.filter-bar .form-group { margin: 0; flex: 1 1 170px; }
.filter-bar .grow { flex: 3 1 260px; }
.filter-bar .form-label { font-size: 0.8rem; margin-bottom: 4px; }
.search-input-wrap { position: relative; }
.search-input-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-dim); }
.search-input-wrap .form-input { padding-left: 40px; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border-color); margin-bottom: 24px; overflow-x: auto; scrollbar-width: thin; }
.tabs a { padding: 10px 16px; font-weight: 700; color: var(--text-dim); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tabs a:hover { color: var(--text-main); text-decoration: none; }
.tabs a.active, .tabs a[aria-current="page"] { color: var(--accent-green); border-bottom-color: var(--accent-green); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--radius-full); font-size: 0.86rem; font-weight: 700; color: var(--text-main); background: var(--bg-card); border: 1px solid var(--border-color); }
.chip:hover { border-color: var(--accent-green); text-decoration: none; }
.chip.active { background: var(--gradient-primary); color: #fff; border-color: transparent; }

/* flash */
.flash-stack { max-width: var(--container); margin: 16px auto 0; padding: 0 20px; display: flex; flex-direction: column; gap: 8px; }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-md); font-weight: 600; font-size: 0.95rem; border: 1px solid; }
.flash span { flex: 1; }
.flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash-error { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.flash-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.flash-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
[data-theme="dark"] .flash { background: var(--bg-card); color: var(--text-main); }
.flash-close { background: none; border: 0; cursor: pointer; color: inherit; padding: 4px; }

/* breadcrumbs, pagination, empty */
.breadcrumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 10px; }
.breadcrumbs li + li::before { content: '/'; margin-right: 6px; opacity: 0.5; }
.pagination { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pagination ul { list-style: none; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-main); font-weight: 700; }
.pagination a:hover { border-color: var(--accent-green); text-decoration: none; }
.pagination span[aria-current] { background: var(--gradient-primary); color: #fff; border-color: transparent; }
.pagination .gap { border: 0; background: none; min-width: 20px; display: grid; place-items: center; }
.pagination-info { font-size: 0.82rem; color: var(--text-dim); }
.empty-state { text-align: center; padding: 48px 20px; background: var(--bg-card); border: 2px dashed var(--border-color); border-radius: var(--radius-lg); }
.empty-state .empty-icon { font-size: 2.6rem; color: var(--accent-green); opacity: 0.7; margin-bottom: 12px; }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { color: var(--text-dim); max-width: 50ch; margin: 0 auto 14px; }

/* article */
.article-container { max-width: 820px; margin: 0 auto; padding: 32px 20px 48px; }
.article-header { margin-bottom: 24px; }
.article-title { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.2; margin: 10px 0 14px; }
.article-hero-img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 28px; border: 1px solid var(--border-color); }
.article-content { font-size: 1.1rem; line-height: 1.8; color: var(--text-muted); overflow-wrap: break-word; }
.article-content h2, .article-content .article-h2 { font-size: 1.55rem; margin: 34px 0 12px; color: var(--text-main); }
.article-content h3, .article-content .article-h3 { font-size: 1.3rem; margin: 28px 0 10px; color: var(--accent-green); }
.article-content h4 { font-size: 1.12rem; margin: 22px 0 8px; }
.article-content p { margin-bottom: 18px; }
.article-content ul, .article-content ol { margin: 0 0 20px 6px; padding-left: 22px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote { border-left: 4px solid var(--accent-green); background: var(--bg-soft); padding: 12px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 0 0 18px; font-style: italic; }
.article-content img, .article-img { border-radius: var(--radius-md); margin: 10px 0; border: 1px solid var(--border-color); }
.article-content code { background: var(--bg-soft); padding: 1px 6px; border-radius: 4px; font-size: 0.92em; }
.article-footer { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.share-links { display: flex; align-items: center; gap: 8px; }
.share-label { font-weight: 700; font-size: 0.88rem; color: var(--text-dim); }
.user-content { overflow-wrap: break-word; }
.user-content p { margin-bottom: 12px; }

/* gallery & attachments */
.gallery { display: grid; gap: 8px; margin: 16px 0; border-radius: var(--radius-md); overflow: hidden; }
.gallery-1 { grid-template-columns: 1fr; } .gallery-2 { grid-template-columns: 1fr 1fr; } .gallery-3 { grid-template-columns: 2fr 1fr 1fr; } .gallery-4 { grid-template-columns: repeat(2, 1fr); }
.gallery-item { display: block; background: var(--bg-soft); }
.gallery-item img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; aspect-ratio: 4 / 3; }
.gallery-1 .gallery-item img { aspect-ratio: auto; object-fit: contain; max-height: 560px; }
.attachment-list { list-style: none; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.attachment-list a { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-card); font-size: 0.85rem; color: var(--text-main); }
.attachment-list img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.attach-icon { font-size: 1.6rem; color: var(--accent-rose); padding: 6px; }

/* reactions */
.reaction-group { position: relative; display: inline-flex; }
.reaction-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-color); background: var(--bg-card); border-radius: var(--radius-full); padding: 5px 12px; font-size: 0.85rem; font-weight: 700; cursor: pointer; color: var(--text-dim); min-height: 34px; }
.reaction-btn:hover { border-color: var(--accent-green); color: var(--text-main); }
.reaction-btn.active { background: rgba(16, 185, 129, 0.12); border-color: var(--accent-green); color: var(--accent-green); }
.reaction-picker { position: absolute; bottom: calc(100% + 6px); left: 0; display: none; gap: 2px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-full); padding: 4px; box-shadow: var(--shadow-md); z-index: 30; }
.reaction-group:hover .reaction-picker, .reaction-group:focus-within .reaction-picker, .reaction-group.open .reaction-picker { display: flex; }
.reaction-picker button { background: none; border: 0; font-size: 1.25rem; padding: 4px 6px; border-radius: 50%; cursor: pointer; transition: transform 0.12s; }
.reaction-picker button:hover, .reaction-picker button:focus-visible { transform: scale(1.25); }
.follow-btn.active { background: rgba(16, 185, 129, 0.12); color: var(--accent-green); border-color: var(--accent-green); }

/* comments */
.comments { margin-top: 40px; }
.comments h2 { font-size: 1.35rem; margin-bottom: 16px; }
.comment-form { margin-bottom: 24px; }
.comment-compose { display: flex; gap: 10px; align-items: flex-start; }
.comment-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.comment { display: flex; gap: 12px; }
.comment-main { flex: 1; min-width: 0; }
.comment-meta { display: flex; gap: 8px; align-items: center; font-size: 0.88rem; flex-wrap: wrap; }
.comment-meta time { color: var(--text-dim); font-size: 0.8rem; }
.comment-body { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 4px var(--radius-md) var(--radius-md) var(--radius-md); padding: 10px 14px; margin-top: 4px; font-size: 0.97rem; overflow-wrap: break-word; }
.comment-body p + p { margin-top: 8px; }
.comment-actions { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.replies { margin-top: 14px; padding-left: 8px; border-left: 2px solid var(--border-color); }
.reply-form { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.login-prompt { background: var(--bg-soft); border: 1px solid var(--border-color); padding: 14px 16px; border-radius: var(--radius-md); margin-bottom: 18px; }

/* stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.stat-card { display: block; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); color: var(--text-main); transition: var(--transition-fast); }
a.stat-card:hover { border-color: var(--accent-green); transform: translateY(-2px); text-decoration: none; color: var(--text-main); }
.stat-icon { font-size: 1.3rem; color: var(--accent-green); margin-bottom: 8px; }
.stat-number { font-family: 'Outfit'; font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 0.85rem; color: var(--text-dim); font-weight: 600; }
.stat-card.warn .stat-icon { color: var(--accent-amber); }
.stat-card.danger .stat-icon { color: var(--accent-rose); }

/* timeline (requests) */
.timeline { list-style: none; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: var(--border-color); }
.timeline li { position: relative; padding: 0 0 20px 50px; }
.timeline .tl-dot { position: absolute; left: 4px; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-card); border: 2px solid var(--accent-green); color: var(--accent-green); font-size: 0.75rem; }
.timeline .tl-internal .tl-dot { border-color: var(--accent-amber); color: var(--accent-amber); }
.tl-head { font-size: 0.88rem; color: var(--text-dim); }
.tl-head strong { color: var(--text-main); }
.tl-body { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 10px 14px; margin-top: 6px; }
.tl-internal .tl-body { background: #fffbeb; border-color: #fde68a; }
[data-theme="dark"] .tl-internal .tl-body { background: rgba(251, 191, 36, 0.08); }
.ref-code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-weight: 700; background: var(--bg-soft); padding: 2px 8px; border-radius: 6px; letter-spacing: 0.03em; }
.progress-steps { display: flex; gap: 0; list-style: none; padding: 0; margin: 10px 0 4px; }
.progress-steps li { flex: 1; text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--text-dim); position: relative; padding-top: 22px; }
.progress-steps li::before { content: ''; position: absolute; top: 6px; left: 0; right: 0; height: 4px; background: var(--border-color); }
.progress-steps li::after { content: ''; position: absolute; top: 1px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--border-strong); }
.progress-steps li.done { color: var(--accent-green); }
.progress-steps li.done::before, .progress-steps li.done::after { background: var(--accent-green); }

/* messages */
.inbox-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 0; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; min-height: 560px; }
.conv-list { border-right: 1px solid var(--border-color); overflow-y: auto; max-height: 75vh; }
.conv-item { display: flex; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border-color); color: var(--text-main); }
.conv-item:hover { background: var(--bg-card-hover); text-decoration: none; }
.conv-item.active { background: rgba(16, 185, 129, 0.1); }
.conv-item.unread .conv-subject { font-weight: 800; }
.conv-subject { display: block; font-size: 0.93rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-meta { font-size: 0.8rem; color: var(--text-dim); }
.conv-pane { display: flex; flex-direction: column; min-height: 560px; }
.conv-head { padding: 16px 20px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.msg-thread { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; max-height: 60vh; background: var(--bg-soft); }
.msg { max-width: 78%; display: flex; flex-direction: column; gap: 3px; }
.msg-bubble { padding: 10px 14px; border-radius: var(--radius-md); background: var(--bg-card); border: 1px solid var(--border-color); overflow-wrap: break-word; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.mine .msg-bubble { background: #047857; color: #fff; border-color: transparent; }
.msg.mine .msg-bubble a { color: #d1fae5; }
.msg-meta { font-size: 0.75rem; color: var(--text-dim); }
.msg-compose { padding: 14px 16px; border-top: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 8px; }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-emerald); flex-shrink: 0; margin-top: 6px; }

/* tables */
.table-wrap { overflow-x: auto; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.data-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); background: var(--bg-soft); white-space: nowrap; }
.data-table th a { color: inherit; }
.data-table tbody tr:hover { background: var(--bg-card-hover); }
.data-table td.actions { white-space: nowrap; text-align: right; }
.data-table .thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.data-table td.title-cell { max-width: 380px; }
.data-table td.title-cell a { font-weight: 700; color: var(--text-main); }

/* modal & toast */
.modal { position: fixed; inset: 0; background: rgba(2, 20, 14, 0.65); backdrop-filter: blur(4px); z-index: 3000; display: grid; place-items: center; padding: 16px; }
.modal-card { background: var(--bg-card); border-radius: var(--radius-lg); width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; padding: 28px; position: relative; box-shadow: var(--shadow-lg); }
.modal-card h2 { font-size: 1.3rem; margin-bottom: 6px; }
.modal-close { position: absolute; top: 12px; right: 12px; background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: var(--text-dim); padding: 8px; border-radius: 8px; }
.modal-close:hover { background: var(--bg-card-hover); }
.toast-region { position: fixed; bottom: 18px; right: 18px; z-index: 4000; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, 92vw); }
.toast { background: #064e3b; color: #fff; padding: 12px 16px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); font-weight: 600; font-size: 0.93rem; animation: toastIn 0.2s ease-out; }
.toast.error { background: #9f1239; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.form-feedback:empty { display: none; }
.form-feedback { margin: 8px 0; font-weight: 600; }

/* sidebar widgets */
.widget { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.widget + .widget { margin-top: 18px; }
.widget h2, .widget h3 { font-size: 1.05rem; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
.widget h2 i, .widget h3 i { color: var(--accent-green); }
.mini-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.mini-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.mini-list a { color: var(--text-main); font-weight: 600; }
.mini-list .mini-meta { font-size: 0.8rem; color: var(--text-dim); display: block; font-weight: 500; }
.date-tile { width: 52px; flex-shrink: 0; text-align: center; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-color); background: var(--bg-card); }
.date-tile .m { display: block; background: var(--gradient-primary); color: #fff; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; padding: 2px 0; }
.date-tile .d { display: block; font-family: 'Outfit'; font-size: 1.3rem; font-weight: 800; padding: 2px 0; color: var(--text-main); }

/* event */
.event-when { display: flex; gap: 14px; align-items: center; }
.capacity-bar { height: 8px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.capacity-bar span { display: block; height: 100%; background: var(--gradient-primary); }

/* map */
.map-frame { width: 100%; height: 320px; border: 0; border-radius: var(--radius-md); }
.city-map { background: #fff; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-color); }
.city-map img { width: 100%; max-height: 600px; object-fit: contain; padding: 10px; }

/* profile */
.profile-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 16px; font-size: 0.93rem; }
.kv dt { color: var(--text-dim); font-weight: 600; }

/* error page */
.error-page { padding: 80px 20px; }
.error-code { font-family: 'Outfit'; font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; line-height: 1; background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.error-page h1 { margin: 10px 0; }
.error-page .lead { margin: 0 auto 24px; }

/* ---------- admin ---------- */
.admin-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 120px); }
.admin-sidebar { background: #022c22; color: #d1fae5; padding: 18px 12px; position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto; }
.admin-sidebar h2 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #6ee7b7; margin: 16px 10px 6px; font-family: inherit; }
.admin-sidebar a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: #d1fae5; font-size: 0.9rem; font-weight: 600; }
.admin-sidebar a:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.admin-sidebar a.active { background: #059669; color: #fff; }
.admin-sidebar a i { width: 18px; color: #6ee7b7; }
.admin-sidebar a.active i { color: #fff; }
.admin-sidebar .count-badge { margin-left: auto; background: #be123c; color: #fff; }
.admin-main { padding: 24px clamp(16px, 3vw, 32px) 48px; min-width: 0; }
.admin-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-header h1 { font-size: 1.6rem; }
.admin-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.admin-toolbar .form-group { margin: 0; }
.admin-toolbar .form-input, .admin-toolbar .form-select { min-height: 40px; padding: 7px 12px; font-size: 0.92rem; }
.bulk-bar { display: flex; gap: 8px; align-items: center; padding: 10px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--border-color); flex-wrap: wrap; font-size: 0.9rem; }
.bulk-bar .form-select { width: auto; min-height: 36px; padding: 5px 10px; font-size: 0.88rem; }
.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 0.86rem; }
.bar-track { height: 12px; background: var(--bg-soft); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--gradient-primary); border-radius: 6px; }
.activity-list { list-style: none; padding: 0; font-size: 0.88rem; }
.activity-list li { padding: 8px 0; border-bottom: 1px solid var(--border-color); display: flex; gap: 8px; justify-content: space-between; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; }
.preview-box { background: var(--bg-soft); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px; }

/* ---------- cookie consent ---------- */
.cookie-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 2500; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.cookie-bar-inner { max-width: var(--container); margin: 0 auto; padding: 14px 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cookie-text { flex: 1 1 420px; font-size: 0.92rem; color: var(--text-main); }
.cookie-text i { color: var(--accent-green); margin-right: 4px; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-cat { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 10px 12px; margin-bottom: 10px; }
body:has(.cookie-bar) .toast-region { bottom: 120px; }
@media (max-width: 560px) { .cookie-actions { width: 100%; } .cookie-actions > * { flex: 1; } }

/* ---------- analytics ---------- */
.chart-card { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg .bar { fill: #047857; }
[data-theme="dark"] .chart-svg .bar { fill: #059669; }
.chart-svg .bar-hit { fill: transparent; cursor: pointer; }
.chart-svg .bar.is-hover { opacity: 0.75; }
.chart-svg .grid { stroke: var(--border-color); stroke-width: 1; }
.chart-svg .axis-label { fill: var(--text-dim); font-size: 11px; font-family: inherit; }
.chart-svg .value-label { fill: var(--text-main); font-size: 11px; font-weight: 700; font-family: inherit; }
.chart-tip { position: absolute; pointer-events: none; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 10px; font-size: 0.82rem; box-shadow: var(--shadow-md); white-space: nowrap; z-index: 5; color: var(--text-main); }
.chart-tip strong { display: block; }
.hbar-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hbar-list li { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 4px 10px; font-size: 0.88rem; align-items: center; }
.hbar-list .hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-list .hbar-track { grid-column: 1 / -1; height: 8px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; }
.hbar-list .hbar-fill { height: 100%; background: #047857; border-radius: 0 4px 4px 0; }
[data-theme="dark"] .hbar-list .hbar-fill { background: #059669; }
.hbar-list .hbar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-dim); }
.range-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.footer { margin-top: 40px; background: #022c22; color: #d1fae5; padding: 48px 20px 24px; }
.footer-container { max-width: var(--container); margin: 0 auto 32px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer .brand-logo { color: #fff; }
.footer-brand p { color: #a7f3d0; font-size: 0.93rem; margin-top: 12px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social .btn-icon { background: #064e3b; border-color: rgba(255, 255, 255, 0.15); color: #ecfdf5; }
.footer-column h2 { font-size: 1rem; margin-bottom: 14px; color: #fff; font-family: inherit; }
.footer-links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; }
.footer-links a { color: #a7f3d0; }
.footer-links a:hover { color: #fff; }
.footer-label { color: #ecfdf5; font-weight: 600; margin-right: 4px; }
.footer-label i { color: #6ee7b7; width: 16px; }
.footer-bottom { max-width: var(--container); margin: 0 auto; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.85rem; color: #6ee7b7; }
.footer-bottom nav { display: flex; gap: 16px; }
.footer-bottom a { color: #a7f3d0; }

/* ---------- responsive ---------- */
/* Compact desktop menu: short labels, no icons, secondary links under "More" */
.label-full, .desktop-hide { display: none; }
.nav-link > i { display: none; }
.nav-more .nav-link { width: auto; gap: 5px; }
.nav-more .nav-link i { display: inline-block; font-size: 0.7rem; color: inherit; }
.nav-more .dropdown-menu { left: 0; right: auto; }
@media (max-width: 1280px) {
  .nav-link { padding: 8px 8px; font-size: 0.88rem; }
  .account-name { display: none; }
}
@media (max-width: 1100px) {
  .layout-sidebar { grid-template-columns: minmax(0, 1fr); }
  .home-hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .mobile-toggle { display: inline-grid !important; }
  .main-nav { flex: 0; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); border-bottom: 3px solid var(--accent-green); flex-direction: column; align-items: stretch; padding: 14px; box-shadow: var(--shadow-lg); gap: 6px; z-index: 2000; max-height: calc(100vh - 120px); overflow-y: auto; }
  .nav-links.mobile-open { display: flex; }
  .mobile-only { display: block; }
  .nav-link { padding: 13px 16px; font-size: 1.02rem; background: var(--bg-soft); }
  .nav-link > i { display: inline-block; }
  .label-full { display: inline; }
  .label-short, .desktop-only { display: none !important; }
  li.desktop-hide { display: block; }
  .nav-actions { margin-left: auto; }
  .account-name { display: none; }
  .account-btn { padding: 3px 8px 3px 3px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; }
  .admin-sidebar h2 { display: none; }
  .admin-sidebar a { padding: 6px 10px; font-size: 0.82rem; }
  .layout-sidebar-left { grid-template-columns: 1fr; }
  .inbox-layout { grid-template-columns: 1fr; }
  .conv-list { border-right: 0; border-bottom: 1px solid var(--border-color); max-height: 320px; }
  .inbox-layout.has-active .conv-list { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 1rem; }
  .section { padding: 32px 16px; }
  .page-hero, .home-hero { padding-left: 16px; padding-right: 16px; }
  .nav-container, .utility-inner, .alert-bar-inner, .flash-stack { padding-left: 16px; padding-right: 16px; }
  .grid-2, .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .mayor-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .topic-row { grid-template-columns: auto minmax(0, 1fr); }
  .topic-stats { grid-column: 2; justify-content: flex-start; text-align: left; }
  .topic-stats strong { display: inline; margin-right: 4px; font-size: 0.9rem; }
  .thread-post { grid-template-columns: 1fr; }
  .thread-post > .avatar { display: none; }
  .kv { grid-template-columns: 1fr; }
  .hide-xs { display: none !important; }
  .utility-links a:nth-child(2) { display: none; }
  .msg { max-width: 92%; }
  .biz-header-cover { height: 180px; }
  .biz-header-logo { width: 90px; height: 90px; }
  .bar-row { grid-template-columns: 100px minmax(0, 1fr) 36px; }
  .data-table th, .data-table td { padding: 9px 10px; }
  .gallery-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .hide-sm { display: none !important; }
}
@media (max-width: 420px) {
  .brand-logo { font-size: 1.2rem; }
  .brand-logo .logo-icon { width: 32px; height: 32px; }
  .nav-actions { gap: 4px; }
  .btn-icon { width: 36px; height: 36px; }
  .footer-container { grid-template-columns: 1fr; }
}
@media print {
  .navbar, .utility-bar, .alert-bar, .footer, .comments form, .share-links { display: none !important; }
}
