/* ============================================================================
   BRGY-CONNECT — Advanced Design System
   Sections:
     01 Tokens                 09 Cards & stat panels         17 Modals
     02 Reset & base           10 Forms                       18 Map
     03 Backdrop & layout      11 Frames (auth)               19 Footer
     04 Motion library         12 Steps / timeline            20 Gallery (landing)
     05 Page entrance          13 Calendar                    21 Utilities
     06 Navbar / navigation    14 Data: tables                22 Print
     07 Buttons                15 Lists / group lists         23 Logo & captain
     08 Hero (landing)         16 Badges / alerts             24 Sidebar layout

   Convention: every section owns its own responsive media queries (each
   @media rule sits inside the section it affects).
   ============================================================================ */

/* ---------------------------------------------------------------------------
   Brand font (self-hosted — no CDN needed, works offline)
--------------------------------------------------------------------------- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/plus-jakarta-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/plus-jakarta-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/plus-jakarta-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/plus-jakarta-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------------------------------------------------------------------------
   01  TOKENS
--------------------------------------------------------------------------- */
:root {
  /* Brand palette (soft blue scale — easy on the eyes) */
  --brgy-50:  #eff6ff;
  --brgy-100: #dbeafe;
  --brgy-200: #bfdbfe;
  --brgy-300: #93c5fd;
  --brgy-400: #60a5fa;
  --brgy-500: #3b82f6;
  --brgy-600: #2563eb;
  --brgy-700: #1d4ed8;
  --brgy-800: #1e40af;
  --brgy-900: #1e3a8a;

  /* Extended accents */
  --info-500:  #2e90fa;
  --info-600:  #1570ef;
  --warn-500:  #3b82f6;
  --warn-600:  #1d4ed8;
  --danger-500:#f04438;
  --danger-600:#d92d20;
  --violet-500:#2563eb;
  --violet-600:#1d4ed8;
  --pink-500:  #60a5fa;

  /* Ink (neutral) scale */
  --ink-50:  #f9fafb;
  --ink-100: #f2f4f7;
  --ink-200: #eaecf0;
  --ink-300: #d0d5dd;
  --ink-500: #667085;
  --ink-700: #344054;
  --ink-900: #101828;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1e40af 100%);
  --grad-hero:    linear-gradient(140deg, #12275c 0%, #1e3a8a 48%, #2563eb 100%);
  --grad-accent:  linear-gradient(135deg, #93c5fd 0%, #2563eb 100%);
  --grad-warm:    linear-gradient(135deg, #60a5fa 0%, #1e40af 100%);
  --grad-text:    linear-gradient(100deg, #3b82f6 0%, #2563eb 60%, #1d4ed8 120%);
  /* Lighter blue gradient for text sitting on the dark hero */
  --grad-text-light: linear-gradient(100deg, #93c5fd 0%, #60a5fa 60%, #93c5fd 120%);

  /* Shape */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Depth */
  --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --shadow-sm: 0 1px 3px rgba(16,24,40,.1), 0 1px 2px rgba(16,24,40,.06);
  --shadow-md: 0 4px 8px -2px rgba(16,24,40,.1), 0 2px 4px -2px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 16px -4px rgba(16,24,40,.08), 0 4px 6px -2px rgba(16,24,40,.03);
  --shadow-xl: 0 20px 24px -4px rgba(16,24,40,.08), 0 8px 8px -4px rgba(16,24,40,.03);
  --shadow-brand: 0 10px 24px -6px rgba(37,99,235,.42), 0 4px 8px -4px rgba(37,99,235,.2);

  /* Focus rings */
  --ring-brand: 0 0 0 4px rgba(59,130,246,.2);
  --ring-info:  0 0 0 4px rgba(46,144,250,.16);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.45, .44, 1);
}

/* Bootstrap "success" utilities are recolored to the brand blue so every
   btn-success / text-success / bg-success badge matches the system. */
:root {
  --bs-success: #2563eb;
  --bs-success-rgb: 37, 99, 235;
  --bs-success-text-emphasis: #1e40af;
  --bs-success-bg-subtle: #eff6ff;
  --bs-success-border-subtle: #dbeafe;
  --bs-form-check-checked-bg-color: #2563eb;
  --bs-form-check-checked-border-color: #2563eb;
}
.btn-success:hover, .btn-success.active, .btn-check:checked + .btn-success {
  background: linear-gradient(135deg, #2f6bf0 0%, #1d4ed8 60%, #172554 100%);
}
.btn-outline-success:hover { background: #eff6ff; color: #1e40af; }
.link-success { color: #2563eb !important; }
.btn-success:focus-visible { box-shadow: var(--ring-brand) !important; }

/* Bootstrap "warning" utilities likewise remapped to blue tones so the
   whole system stays a single soft blue family (amber is gone). */
:root {
  --bs-warning: #3b82f6;
  --bs-warning-rgb: 59, 130, 246;
  --bs-warning-text-emphasis: #1e40af;
  --bs-warning-bg-subtle: #eff6ff;
  --bs-warning-border-subtle: #bfdbfe;
}

/* ---------------------------------------------------------------------------
   02  RESET & BASE
--------------------------------------------------------------------------- */
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body > .container { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 { letter-spacing: -.02em; color: var(--ink-900); }
.fw-extrabold { font-weight: 800; }

::selection { background: var(--brgy-200); color: var(--brgy-900); }

/* WebKit scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ink-300); border-radius: 8px; border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-500); background-clip: padding-box; }

/* ---------------------------------------------------------------------------
   03  BACKDROP & LAYOUT
--------------------------------------------------------------------------- */
body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(59, 130, 246, .08), transparent 60%),
    radial-gradient(900px 520px at -10% 30%, rgba(46,144,250,.06), transparent 55%),
    radial-gradient(700px 420px at 55% 110%, rgba(105,56,239,.045), transparent 60%),
    var(--ink-50);
  background-attachment: fixed;
}

/* Shared page header block: kicker + title + sub + actions */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  margin-bottom: 1.5rem;
}
.page-head .head-titles { min-width: 0; }
.page-head h1, .page-head h2, .page-head h3 { margin: 0; letter-spacing: -.02em; }
.page-head .head-sub { color: var(--ink-500); margin-top: .25rem; }
.page-head .head-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-width: 0;
}

/* ---------------------------------------------------------------------------
   04  MOTION LIBRARY
--------------------------------------------------------------------------- */
@keyframes fadeUp    { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes floaty   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeScale { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes popIn     { from { opacity: 0; transform: translateY(10px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes floatBlob { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(24px,-28px) scale(1.06); } 66% { transform: translate(-18px,16px) scale(.96); } }
@keyframes floatSoft { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.35); } 70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
@keyframes pingSoft  { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes rippleGrow { to { transform: scale(3.2); opacity: 0; } }
@keyframes shineSweep {
  0%   { transform: translateX(-130%) skewX(-18deg); }
  100% { transform: translateX(230%) skewX(-18deg); }
}
@keyframes shimmerMove { 0% { transform: translateX(-100%); } 100% { transform: translateX(220%); } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes borderGlow {
  0%,100% { border-color: var(--brgy-200); }
  50%     { border-color: var(--brgy-400); }
}

/* Scroll-reveal base (driven by app.js IntersectionObserver) */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s var(--ease-out), transform .65s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.reveal-visible { opacity: 1; transform: none; }

/* Staggered children reveal (applied to rows/groups) */
.anim-stagger > * { opacity: 0; animation-fill-mode: both; }
.anim-stagger.reveal-visible > *, .anim-stagger.is-visible > * { animation: fadeUp .55s var(--ease-out) backwards; }
.anim-stagger.is-visible > *:nth-child(1) { animation-delay: .03s; }
.anim-stagger.is-visible > *:nth-child(2) { animation-delay: .09s; }
.anim-stagger.is-visible > *:nth-child(3) { animation-delay: .15s; }
.anim-stagger.is-visible > *:nth-child(4) { animation-delay: .21s; }
.anim-stagger.is-visible > *:nth-child(5) { animation-delay: .27s; }
.anim-stagger.is-visible > *:nth-child(6) { animation-delay: .33s; }
.anim-stagger.is-visible > *:nth-child(n+7) { animation-delay: .38s; }

/* Hover micro-interactions */
.hover-lift { transition: transform .28s var(--ease-out), box-shadow .28s ease, border-color .28s ease; }
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--brgy-200);
}

/* Idle float for decorative icons */
.float-soft { animation: floatSoft 4.5s ease-in-out infinite; }

/* Live status dot */
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brgy-400);
  position: relative; flex-shrink: 0;
}
.live-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: inherit; animation: pingSoft 1.8s ease-out infinite;
}
.live-dot.off { background: var(--ink-300); }
.live-dot.off::after { display: none; }

/* Skeleton shimmer placeholder */
.skeleton {
  position: relative; overflow: hidden;
  background: var(--ink-100); border-radius: 8px; color: transparent;
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: shimmerMove 1.4s infinite;
}

/* ---------------------------------------------------------------------------
   05  PAGE ENTRANCE
--------------------------------------------------------------------------- */
/* Gates the entrance on JS being present so content never hides without it */
body.has-js:not(.is-ready) > .container > *,
body.has-js:not(.is-ready) > .app-main > .container > * { opacity: 0; }
body.has-js.is-ready > .container > *,
body.has-js.is-ready > .app-main > .container > * { animation: fadeUp .55s var(--ease-out) both; }
body.has-js.is-ready > .container > *:nth-child(2),
body.has-js.is-ready > .app-main > .container > *:nth-child(2) { animation-delay: .04s; }
body.has-js.is-ready > .container > *:nth-child(3),
body.has-js.is-ready > .app-main > .container > *:nth-child(3) { animation-delay: .08s; }
body.has-js.is-ready > .container > *:nth-child(4),
body.has-js.is-ready > .app-main > .container > *:nth-child(4) { animation-delay: .12s; }
body.has-js.is-ready > .container > *:nth-child(n+5),
body.has-js.is-ready > .app-main > .container > *:nth-child(n+5) { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-delay: 0s !important;
    transition-duration: .001s !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body.has-js:not(.is-ready) > .container > *,
  body.has-js:not(.is-ready) > .app-main > .container > * { opacity: 1; }
}

/* ---------------------------------------------------------------------------
   06  NAVBAR / NAVIGATION
--------------------------------------------------------------------------- */
.navbar {
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(30, 58, 138, .92) !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: box-shadow .3s ease, background .3s ease;
  position: relative;
}
/* animated brand hairline on top */
.navbar::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--brgy-400) 20%, #fff 50%, var(--brgy-400) 80%, transparent);
  background-size: 200% 100%;
  animation: shimmerMove 6s linear infinite;
  opacity: .9;
}
.navbar.nav-elevated {
  box-shadow: var(--shadow-lg);
  background: rgba(30, 58, 138, .96) !important;
}
.navbar .navbar-brand {
  letter-spacing: -.02em;
  display: inline-flex; align-items: center; gap: .5rem;
}
.navbar .brand-mark {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 8px rgba(30, 58, 138, .35);
  transition: transform .3s var(--ease-spring), box-shadow .3s ease;
}
.navbar .navbar-brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); box-shadow: var(--shadow-brand); }

/* Nav links become glossy system pills */
.navbar-nav .nav-link {
  position: relative;
  font-weight: 600;
  font-size: .925rem;
  color: rgba(255,255,255,.8) !important;
  padding: .55rem .95rem !important;
  border-radius: 999px;
  transition: color .2s ease, background .28s var(--ease-out), transform .2s var(--ease-out);
}
.navbar-nav .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.1); transform: translateY(-1px); }
.navbar-nav .nav-link.active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(96, 165, 250, .32), rgba(255,255,255,.14));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 2px 10px rgba(0,0,0,.14);
}
.navbar-nav .nav-link i { margin-right: .35rem; font-size: .95em; }

/* Notification badge pulses */
.navbar .badge.bg-danger { animation: pulseRing 2.4s infinite; }

.dropdown-menu {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  animation: fadeUp .22s var(--ease-out);
  overflow: hidden;
}
.dropdown-item { font-weight: 600; padding: .6rem 1rem; transition: background .15s ease, transform .15s ease; }
.dropdown-item:hover { background: var(--brgy-50); transform: translateX(2px); }
.dropdown-item i { width: 1.35rem; color: var(--ink-500); }
.dropdown-item:hover i { color: var(--brgy-700); }
.dropdown-item.text-danger:hover i, .dropdown-item.text-danger:hover { color: var(--danger-500); }

/* ---------------------------------------------------------------------------
   07  BUTTONS
--------------------------------------------------------------------------- */
.btn {
  --bs-btn-border-radius: var(--radius-sm);
  font-weight: 700;
  letter-spacing: .01em;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform .15s var(--ease-out), box-shadow .2s ease,
              background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:not(.btn-sm):not(.btn-lg) { padding: .55rem 1.15rem; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:focus-visible { outline: none; box-shadow: var(--ring-brand) !important; }

/* Gradient primary with light sheen sweep */
.btn-success {
  background: var(--grad-primary);
  border: none;
  box-shadow: 0 2px 6px rgba(37, 99, 235, .35);
}
.btn-success:hover { background: linear-gradient(135deg, #2f6bf0 0%, #1d4ed8 60%, #172554 100%); box-shadow: var(--shadow-brand); }
.btn-success::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-130%) skewX(-18deg);
}
.btn-success:hover::before { animation: shineSweep .9s var(--ease-out); }

.btn-outline-success { color: var(--brgy-700); border-width: 1.5px; }
.btn-outline-success:hover { background: var(--brgy-50); color: var(--brgy-800); transform: translateY(-1px); }

/* Accent helpers used across the system */
.btn-soft-success { background: var(--brgy-50); color: var(--brgy-800); border: 1px solid var(--brgy-100); }
.btn-soft-success:hover { background: var(--brgy-100); color: var(--brgy-900); }
.btn-soft-info { background: #eff8ff; color: var(--info-600); border: 1px solid #b2ddff; }
.btn-soft-info:hover { background: #e0f2fe; color: var(--info-600); }
.btn-soft-danger { background: #fef3f2; color: var(--danger-600); border: 1px solid #fecdca; }
.btn-soft-danger:hover { background: #fee4e2; color: var(--danger-600); }

/* Wide filter pill groups wrap into tasteful individual pills on phones +
   tablets (prevents page-level horizontal overflow, e.g. admin appointments) */
@media (max-width: 767.98px) {
  .btn-group { flex-wrap: wrap; gap: .4rem; }
  .btn-group > .btn { border-radius: var(--radius-sm) !important; }
}

/* Ripple (spawned by app.js) */
.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255,255,255,.45);
  transform: scale(0);
  animation: rippleGrow .6s ease-out forwards;
  z-index: 0;
}

/* ----------/ 08  HERO (landing) /------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-hero);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 4px;
  background: linear-gradient(90deg, transparent, var(--brgy-400), #fff, var(--brgy-400), transparent);
  opacity: .75;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  z-index: -1;
  animation: floatBlob 14s ease-in-out infinite;
}
.hero-blob.b1 { width: 420px; height: 420px; background: #3b82f6; top: -120px; left: -80px; }
.hero-blob.b2 { width: 360px; height: 360px; background: #2e90fa; bottom: -160px; right: -60px; animation-delay: -5s; }
.hero-blob.b3 { width: 260px; height: 260px; background: #3b82f6; bottom: -80px; left: 32%; animation-delay: -9s; opacity: .35; }

.hero .eyebrow-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: #bfdbfe;
  font-size: .8rem; font-weight: 700;
  padding: .42rem 1rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.15rem, 9vw, 3.5rem);
  text-shadow: 0 2px 24px rgba(0,0,0,.25);
  animation: fadeUp .7s var(--ease-out) both .1s;
}
.hero-gradient-text {
  background: var(--grad-text-light);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero p { color: rgba(255,255,255,.82); animation: fadeUp .7s var(--ease-out) both .2s; }
.hero .hero-sub { animation: fadeUp .7s var(--ease-out) both .05s; }
.hero .btn-row { animation: fadeUp .7s var(--ease-out) both .3s; }
.hero .lead strong { color: #93c5fd; }

.hero-stats {
  margin-top: 2.75rem;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 3.5rem;
  animation: fadeUp .7s var(--ease-out) both .45s;
}
.hero-stat { text-align: center; min-width: 110px; position: relative; }
.hero-stat:not(:last-child)::after {
  content: ""; position: absolute; right: -1.75rem; top: 50%; transform: translateY(-50%);
  height: 46px; width: 1px; background: rgba(255,255,255,.18);
}
.hero-stat .num {
  font-size: 1.9rem; font-weight: 800; color: #fff; line-height: 1;
  text-shadow: 0 4px 18px rgba(0,0,0,.28);
}
.hero-stat .num span {
  background: var(--grad-text-light);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-stat .lbl {
  font-size: .78rem; color: rgba(255,255,255,.65);
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
@media (max-width: 575.98px) { .hero-stat:not(:last-child)::after { display: none; } }

/* Phone: CTAs become full-width tap targets, stats tighten */
@media (max-width: 575.98px) {
  .hero { padding-top: 2.25rem !important; padding-bottom: 2.5rem !important; }
  .hero .btn-row { flex-direction: column; align-items: stretch; }
  .hero .btn-row .btn { width: 100%; }
  .hero-stats { gap: .5rem 1.25rem; }
  .hero-stat { min-width: 88px; }
  .hero-stat .num { font-size: 1.6rem; }
}

.section-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
.section-kicker {
  display: inline-block;
  color: var(--brgy-700);
  background: var(--brgy-50);
  border: 1px solid var(--brgy-100);
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  padding: .35rem .9rem;
  border-radius: 999px;
  margin-bottom: .9rem;
}

/* ---------------------------------------------------------------------------
   09  CARDS & STAT PANELS
--------------------------------------------------------------------------- */
.card {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: #fff;
}
.card-header {
  background: #fff !important;
  border-bottom: 1px solid var(--ink-200);
  font-weight: 700;
  padding: 1rem 1.25rem;
}
.card-body { padding: 1.25rem; }

/* Gradient-accented header strip for content panels */
.panel {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.panel > .card-header {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  background: linear-gradient(90deg, var(--brgy-50), #fff 70%) !important;
  border-bottom: 1px solid var(--brgy-100);
}
.panel > .card-header i { color: var(--brgy-700); }

/* Stat cards */
.stat-card {
  transition: transform .25s var(--ease-out), box-shadow .25s ease, border-color .25s ease;
  position: relative;
}
.stat-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--grad-primary);
  opacity: 0; transition: opacity .25s ease;
}
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl) !important;
  border-color: var(--brgy-200);
}
.stat-card:hover::before { opacity: 1; }
.stat-card .icon-chip { transition: transform .3s var(--ease-spring); }
.stat-card:hover .icon-chip { transform: scale(1.08) rotate(-4deg); }

/* Gradient icon chips */
.icon-chip {
  width: 54px; height: 54px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 16px;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.05);
}
.chip-green   { background: var(--brgy-50);  color: var(--brgy-700); }
.chip-blue    { background: #eff8ff; color:  var(--info-500); }
.chip-orange  { background: #eff6ff; color:  var(--warn-500); }
.chip-red     { background: #fef3f2; color:  var(--danger-500); }
.chip-violet  { background: #eff6ff; color:  var(--violet-500); }
.chip-gray    { background: var(--ink-100); color: var(--ink-700); }

/* Number counters get a branded gradient */
.stat-card [data-counter], .stat-card h3 {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-weight: 800;
}

.service-card { transition: transform .3s var(--ease-out), box-shadow .3s ease, border-color .3s ease, background .3s ease; cursor: default; }
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--brgy-200);
  background: linear-gradient(180deg, #fff, var(--brgy-50)) ;
}
.service-card .icon-chip { transition: transform .3s var(--ease-out); }
.service-card:hover .icon-chip { transform: scale(1.12) rotate(-5deg); }

/* ---------------------------------------------------------------------------
   10  FORMS
--------------------------------------------------------------------------- */
.form-label { font-weight: 600; color: var(--ink-700); font-size: .9rem; }
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--ink-300);
  padding: .58rem .85rem;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  color: var(--ink-900);
}
.form-control:hover, .form-select:hover { border-color: var(--ink-500); }
.form-control:focus, .form-select:focus {
  border-color: var(--brgy-500);
  box-shadow: var(--ring-brand);
  background: #fff;
}
.form-control::placeholder { color: #98a2b3; }
.form-switch .form-check-input { cursor: pointer; }
.form-check-input:checked { background-color: var(--brgy-600); border-color: var(--brgy-600); }

/* Input groups: keep icons vertically centered */
.input-group-text {
  border: 1.5px solid var(--ink-300); border-radius: var(--radius-sm);
  color: var(--ink-500); background: var(--ink-50);
}
.input-group:focus-within .input-group-text { border-color: var(--brgy-500); color: var(--brgy-700); }

/* ---------------------------------------------------------------------------
   11  AUTH SPLIT FRAME
--------------------------------------------------------------------------- */
.auth-wrap { min-height: calc(100vh - 76px); display: flex; align-items: stretch; }
.auth-brand {
  position: relative; overflow: hidden;
  background: var(--grad-hero);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 3rem;
  display: flex; flex-direction: column; justify-content: space-between;
  isolation: isolate;
}
.auth-brand::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 30% 20%, black, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 30% 20%, black, transparent 70%);
}
.auth-brand::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--brgy-400), #fff, transparent);
  opacity: .8;
}
.auth-brand .hero-blob.b1 { top: auto; left: -60px; bottom: -140px; }
.auth-feature { display: flex; gap: .9rem; align-items: flex-start; }
.auth-feature:hover .auth-feature i { transform: rotate(-6deg) scale(1.08); }
.auth-feature i {
  width: 38px; height: 38px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 11px;
  transition: transform .25s var(--ease-spring);
}
.auth-form-col { display: flex; flex-direction: column; justify-content: center; }
.auth-card { border-radius: var(--radius-lg); border-color: var(--ink-200); }
.auth-card h3 span.grad {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------------------------------------------------------------------------
   12  STEPS / TIMELINE
--------------------------------------------------------------------------- */
.step-circle {
  width: 56px; height: 56px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem;
  background: var(--grad-primary);
  box-shadow: 0 6px 14px rgba(37, 99, 235, .35);
  position: relative;
  transition: transform .3s var(--ease-spring);
}
.step-node:hover .step-circle { transform: translateY(-4px) scale(1.06) rotate(-3deg); }
.step-node { position: relative; }
.step-node::after {
  content: "";
  position: absolute; top: 28px; left: calc(50% + 48px);
  width: calc(100% - 96px); max-width: 220px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--ink-300) 0 8px, transparent 8px 16px);
}
.step-node:last-child::after { display: none; }
@media (max-width: 767.98px) { .step-node::after { display: none; } }

/* Vertical activity/notification timeline */
.feed-line { position: relative; list-style: none; margin: 0; padding: 0; }
.feed-line > li { position: relative; padding: .35rem 0 .8rem 2.1rem; }
.feed-line > li::before {
  content: ""; position: absolute; left: 9px; top: 22px; bottom: -4px;
  width: 2px; background: var(--ink-100); border-radius: 2px;
}
.feed-line > li:last-child::before { display: none; }
.feed-line .feed-ico {
  position: absolute; left: 0; top: 6px;
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .62rem; color: #fff; background: var(--grad-primary);
  box-shadow: 0 0 0 3px var(--brgy-50);
}

/* ---------------------------------------------------------------------------
   13  CALENDAR
--------------------------------------------------------------------------- */
.brgy-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.brgy-calendar .cal-head {
  text-align: center;
  font-size: .72rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-500);
  padding: 6px 0;
}
.brgy-calendar .cal-day {
  min-height: 76px;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  padding: 6px;
  font-size: .75rem;
  background: #fff;
  transition: transform .18s var(--ease-out), box-shadow .18s ease, border-color .18s ease;
}
.brgy-calendar .cal-day.has-event:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brgy-300);
}
.brgy-calendar .cal-day.other { background: var(--ink-50); opacity: .5; }
.brgy-calendar .cal-day.today {
  border: 2px solid var(--brgy-500);
  background: var(--brgy-50);
}
.brgy-calendar .day-num {
  font-weight: 700; color: var(--ink-700);
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 7px;
}
.brgy-calendar .cal-day.today .day-num { background: var(--grad-primary); color: #fff; box-shadow: 0 2px 6px rgba(37, 99, 235, .35); }
.cal-event {
  display: block;
  margin-top: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--grad-primary);
  color: #fff;
  font-size: .67rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  box-shadow: 0 1px 3px rgba(37, 99, 235, .3);
  animation: popIn .3s var(--ease-spring);
}
@media (max-width: 768px) {
  .brgy-calendar .cal-day { min-height: 48px; }
  .cal-event { display: none; }
  .brgy-calendar .has-event .day-num::after { content: " •"; color: var(--brgy-500); font-size: .9rem; }
}
/* Very compact screens: keep cells tappable */
@media (max-width: 575.98px) {
  .brgy-calendar { gap: 4px; }
  .brgy-calendar .cal-day { padding: 4px; min-height: 44px; }
  .brgy-calendar .day-num { width: 21px; height: 21px; }
}

/* ---------------------------------------------------------------------------
   14  DATA: TABLES (smart / sticky / animated)
--------------------------------------------------------------------------- */
.table { color: var(--ink-700); vertical-align: middle; }
.table thead th {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-500);
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-200);
  white-space: nowrap;
  padding: .8rem 1rem;
}
.table tbody td { padding: .85rem 1rem; border-color: var(--ink-100); }
.table tbody tr {
  transition: transform .15s ease, background .15s ease, box-shadow .2s ease;
  position: relative;
}
.table tbody tr:hover { background: var(--brgy-50); }
.table-hover tbody tr:hover { box-shadow: inset 3px 0 0 var(--brgy-500); }

/* Sticky header + native momentum scroll inside any scrollable wrapper */
.table-responsive { border-radius: 0 0 var(--radius-lg) var(--radius-lg); -webkit-overflow-scrolling: touch; }
.table-responsive thead th { position: sticky; top: 0; z-index: 2; }

/* Cascading row entrance (animate once on load) */
tbody.rows-animate tr { animation: fadeUp .45s var(--ease-out) backwards; }
tbody.rows-animate tr:nth-child(1) { animation-delay: .02s; }
tbody.rows-animate tr:nth-child(2) { animation-delay: .07s; }
tbody.rows-animate tr:nth-child(3) { animation-delay: .12s; }
tbody.rows-animate tr:nth-child(4) { animation-delay: .17s; }
tbody.rows-animate tr:nth-child(5) { animation-delay: .22s; }
tbody.rows-animate tr:nth-child(6) { animation-delay: .27s; }
tbody.rows-animate tr:nth-child(7) { animation-delay: .32s; }
tbody.rows-animate tr:nth-child(n+8) { animation-delay: .36s; }
tbody.rows-animate tr:first-child td:first-child { border-top-left-radius: 0; }

/* Progress bars (reports) */
.progress {
  height: 10px; border-radius: 999px;
  background: var(--ink-100);
  overflow: hidden;
}
.progress-bar {
  background: var(--grad-primary);
  border-radius: 999px;
  position: relative;
}
.progress-bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  background-size: 200% 100%;
  animation: shimmerMove 1.8s linear infinite;
}

/* ---------------------------------------------------------------------------
   15  LISTS / GROUP LISTS
--------------------------------------------------------------------------- */
.list-group-item { border-color: var(--ink-100); transition: background .15s ease, transform .15s ease; }
.list-group-item-action:hover { background: var(--ink-50); padding-left: 1.5rem; transform: translateX(2px); }
.list-group-item-action { transition: padding-left .2s var(--ease-out), transform .2s var(--ease-out), background .15s ease; }

/* ---------------------------------------------------------------------------
   16  BADGES / ALERTS / PILLS
--------------------------------------------------------------------------- */
.badge { font-weight: 700; letter-spacing: .04em; border-radius: 999px; padding: .45em .8em; }
.badge.bg-success { background: var(--grad-primary) !important; box-shadow: 0 2px 6px rgba(37, 99, 235, .35); }
.badge.text-uppercase { font-size: .68rem; }

/* System status pills */
.status-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .34rem .7rem; border-radius: 999px;
}
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.alert {
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  animation: slideInRight .4s var(--ease-out);
  border-left-width: 4px;
}
.alert-success { background: var(--brgy-50);  border-left-color: var(--brgy-600); color: var(--brgy-800); }
.alert-danger  { background: #fef3f2; border-left-color: var(--danger-500); color: #912018; }
.alert-warning { background: #eff6ff; border-left-color: var(--warn-500);   color: #1e40af; }
.alert-info    { background: #eff8ff; border-left-color: var(--info-500);   color: #194185; }

/* ---------------------------------------------------------------------------
   17  MODALS
--------------------------------------------------------------------------- */
.modal-content {
  border: none; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: popIn .28s var(--ease-spring);
}
.modal-header { padding: 1.1rem 1.4rem; }
.modal-body { padding: 1.4rem; }
.modal-backdrop.show { opacity: .45; backdrop-filter: blur(2px); }

/* Modals breathe on small screens without getting cramped */
@media (max-width: 575.98px) {
  .modal-header { padding: .9rem 1rem; }
  .modal-body { padding: 1rem; }
  .page-head .head-actions, .page-head .btn, .page-head .btn-group { max-width: 100%; }
}

/* ---------------------------------------------------------------------------
   18  MAP
--------------------------------------------------------------------------- */
#map, #viewMap {
  background: var(--ink-100);
  border-radius: 12px;
  border: 1px solid var(--ink-200);
  z-index: 1;
}

/* ---------------------------------------------------------------------------
   19  FOOTER
--------------------------------------------------------------------------- */
footer.site-footer { background: #fff; border-top: 1px solid var(--ink-200); }
footer.site-footer a { color: var(--brgy-700); text-decoration: none; font-weight: 600; }
footer.site-footer a:hover { text-decoration: underline; }

footer.site-footer.footer-dark {
  background: var(--grad-hero);
  color: rgba(255,255,255,.75);
  position: relative;
  overflow: hidden;
}
.footer-dark::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--brgy-400) 30%, #fff 50%, var(--brgy-400) 70%, transparent);
  opacity: .8;
}
.footer-dark strong { color: #fff; }

/* Floating back-to-top */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 1030;
  width: 44px; height: 44px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(30, 58, 138, .92);
  color: #fff; font-size: 1.15rem;
  box-shadow: var(--shadow-brand);
  border: 1px solid rgba(255,255,255,.15);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s var(--ease-out), visibility .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: #fff; transform: translateY(-3px); }

/* ---------------------------------------------------------------------------
   20  BAYANIHAN GALLERY & HALL PHOTOS
--------------------------------------------------------------------------- */
.hall-photo {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); background: #fff; line-height: 0;
  border: 1px solid rgba(30, 58, 138, .08);
}
.hall-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.hall-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(30, 58, 138, .02), rgba(30, 58, 138, .28));
  opacity: 0; transition: opacity .35s ease;
}
.gallery-item { cursor: zoom-in; }
.gallery-item:hover .hall-photo { box-shadow: var(--shadow-brand); border-color: transparent; }
.gallery-item:hover .hall-photo img { transform: scale(1.055); }
.gallery-item:hover .hall-photo::after { opacity: 1; }
.gallery-item:hover .hall-cap { transform: translateY(0); opacity: 1; }

.hall-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 1.6rem 1.1rem .8rem;
  line-height: 1.3; text-align: left; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(30, 58, 138, .82));
  transform: translateY(14px); opacity: 0; transition: transform .35s var(--ease-out), opacity .35s ease;
}
.hall-cap strong { display: block; font-size: .95rem; letter-spacing: .02em; }
.hall-cap span { display: block; font-size: .78rem; color: rgba(255,255,255,.85); font-weight: 500; }
.hall-corner {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92); color: var(--brgy-700); font-size: .9rem;
  box-shadow: var(--shadow-sm); opacity: 0; transform: scale(.8);
  transition: opacity .3s ease, transform .3s var(--ease-out);
}
.gallery-item:hover .hall-corner { opacity: 1; transform: scale(1); }

/* Aspect helpers */
.hall-main { aspect-ratio: 16 / 10.5; }
.hall-thumb { aspect-ratio: 16 / 10.5; }

/* Floating hero collage (large screens only) */
.hero-collage { position: absolute; right: 4%; bottom: -26%; gap: .9rem; }
.hero-collage .hall-photo {
  width: 250px; aspect-ratio: 4 / 3; animation: floaty 6s ease-in-out infinite;
}
.hero-collage .hall-photo:nth-child(2) { width: 170px; animation-delay: -3s; margin-top: 6.2rem; }
@media (max-width: 1199.98px) { .hero-collage { display: none !important; } }

/* Auth brand frames */
.auth-frame {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-brand); border: 1px solid rgba(255,255,255,.35);
  animation: floaty 7s ease-in-out infinite; line-height: 0;
}
.auth-frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.auth-frame .auth-frame-chip {
  position: absolute; left: 12px; bottom: 12px; z-index: 1;
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(30, 58, 138, .85); color: #fff;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  padding: .4rem .7rem; border-radius: 999px;
  box-shadow: var(--shadow-sm); backdrop-filter: blur(4px);
}

/* Footer hall strip */
.hall-strip {
  display: flex; gap: 1rem; align-items: center; max-width: 640px; margin: 0 auto;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg); padding: .8rem 1rem;
}
.hall-strip__img {
  flex: 0 0 92px; width: 92px; height: 68px; border-radius: .8rem; overflow: hidden;
  border: 1px solid rgba(255,255,255,.25); box-shadow: var(--shadow-sm);
}
.hall-strip__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hall-strip__meta { min-width: 0; }
.hall-strip__meta .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: #93c5fd; font-weight: 600; }
@media (max-width: 575.98px) { .hall-strip { flex-direction: column; text-align: center; } .hall-strip__meta { text-align: center !important; } }

/* Lightbox modal */
.lightbox-modal .modal-content { background: #0d1b3a; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,.12); }
.lightbox-modal .modal-body { padding: 0; }
.lightbox-modal img { width: 100%; max-height: 74vh; object-fit: contain; }
.lightbox-modal .modal-footer {
  border-top-color: rgba(255,255,255,.1); color: rgba(255,255,255,.85);
  justify-content: space-between;
}
.lightbox-modal .modal-title { color: #fff; font-weight: 700; }

/* ---------------------------------------------------------------------------
   21  UTILITIES
--------------------------------------------------------------------------- */
.text-grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.divider-dash { border-top: 1px dashed var(--ink-200); }

/* ---------------------------------------------------------------------------
   22  PRINT
--------------------------------------------------------------------------- */
.print-only { display: none; }

@media print {
  .navbar, footer.site-footer, .to-top, .print-hide, .no-print { display: none !important; }
  body { background: #fff !important; }
  body > .container > *, tbody.rows-animate tr { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .card { box-shadow: none !important; border-color: var(--ink-300) !important; break-inside: avoid; }
  a { text-decoration: none !important; color: inherit !important; }
  .print-only { display: block !important; }
  .stat-card [data-counter], .stat-card h3 { -webkit-text-fill-color: var(--ink-900); color: var(--ink-900); background: none; }
}

/* ---------------------------------------------------------------------------
   23  BRAND LOGO & BARANGAY CAPTAIN
--------------------------------------------------------------------------- */
.navbar .brand-mark img {
  width: 100%; height: 100%;
  object-fit: contain; border-radius: 9px;
  display: block;
}
.auth-logo { width: 76px; height: 76px; border-radius: 16px; display: block; background: #fff; box-shadow: var(--shadow-brand); padding: 6px; object-fit: contain; }
.footer-logo { width: 40px; height: 40px; border-radius: 10px; display: block; background: #fff; padding: 3px; object-fit: contain; }

.captain-photo {
  position: relative;
  width: 210px; height: 210px;
}
.captain-photo img {
  position: relative;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid #ffffff;
  background: var(--brgy-50);
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--brgy-200);
  z-index: 1;
}
.captain-ring {
  position: absolute; inset: -16px;
  border-radius: 50%;
  background: var(--grad-primary);
  opacity: .14;
}
.captain-sign {
  border-left: 3px solid var(--brgy-500);
  padding-left: 12px;
  display: flex; flex-direction: column;
}
.captain-sign strong { color: var(--brgy-900); font-size: 1.02rem; }
.captain-sign span { font-size: .82rem; color: var(--ink-500); }
.captain-fb {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: 10px; max-width: 100%;
  font-size: .76rem; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #1877f2, #0a4fa8);
  border-radius: 999px; padding: .42rem .85rem;
  text-decoration: none; box-shadow: 0 4px 12px rgba(24, 119, 242, .28);
  transition: transform .25s var(--ease-spring), box-shadow .25s ease;
}
.captain-fb:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(24, 119, 242, .38); }
.captain-fb .bi-facebook { font-size: .95rem; }

/* ---------------------------------------------------------------------------
   24  SIDEBAR LAYOUT (side navigation replaces the top header)
--------------------------------------------------------------------------- */
.app-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 264px;
  z-index: 1030;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #15275c 0%, #1e3a8a 55%, #1d4ed8 130%);
  color: #fff;
  box-shadow: 2px 0 18px rgba(21, 39, 92, .35);
  overflow: hidden;
}
.app-sidebar::after {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--brgy-300) 25%, #fff 50%, var(--brgy-300) 75%, transparent);
  background-size: 200% 100%;
  animation: shimmerMove 6s linear infinite;
  opacity: .9;
}

.sb-head { padding: 1.1rem 1.1rem 1.05rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.sb-social {
  display: flex; align-items: center; gap: .5rem;
  margin-top: .6rem; padding: .5rem .8rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  text-decoration: none;
  color: #fff; font-size: .78rem; font-weight: 600; letter-spacing: .01em;
  transition: background-color .25s ease, border-color .25s ease, transform .25s var(--ease-spring);
}
.sb-social:hover {
  background: linear-gradient(135deg, #1877f2, #0a4fa8);
  border-color: transparent; color: #fff;
  transform: translateY(-1px);
}
.sb-social .bi-facebook { font-size: 1rem; }
.sb-social .bi-box-arrow-up-right { margin-left: auto; font-size: .72rem; opacity: .7; }
.sb-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.sb-brand .brand-mark {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px;
  background: #fff; padding: 5px;
  box-shadow: 0 4px 14px rgba(10, 20, 50, .4);
}
.sb-brand .brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 8px; }
.sb-brand-text { min-width: 0; }
.sb-brand-text strong { display: block; color: #fff; font-size: 1.06rem; line-height: 1.1; letter-spacing: .01em; }
.sb-brand-text small {
  display: block; color: rgba(255,255,255,.62); font-size: .66rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sb-nav-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .55rem .8rem 1rem; display: flex; flex-direction: column; }
.sb-nav { flex: 1; }
.sb-section {
  font-size: .64rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .16em; color: rgba(255,255,255,.5);
  margin: 1.15rem .6rem .4rem; user-select: none;
}
.sb-section:first-child { margin-top: .7rem; }
.sb-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .7rem; margin-bottom: 2px;
  border-radius: 10px; text-decoration: none;
  color: rgba(255,255,255,.84); font-weight: 600; font-size: .9rem;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.sb-item i { font-size: 1.05rem; color: rgba(255,255,255,.62); width: 1.35rem; text-align: center; flex-shrink: 0; }
.sb-item:hover { background: rgba(255,255,255,.1); color: #fff; transform: translateX(2px); }
.sb-item:hover i { color: #fff; }
.sb-item.active { background: rgba(255,255,255,.17); color: #fff; box-shadow: inset 3px 0 0 #fff; }
.sb-item.active i { color: #fff; }
.sb-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: rgba(255,255,255,.95); color: var(--brgy-900);
  font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}

.sb-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: .9rem .3rem 0; }
.sb-user { display: flex; align-items: center; gap: .65rem; padding: .2rem .4rem .55rem; }
.sb-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff;
}
.sb-user-meta { overflow: hidden; }
.sb-user-meta strong { display: block; color: #fff; font-size: .92rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-role { display: inline-block; margin-top: 2px; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brgy-900); background: #fff; border-radius: 999px; padding: 1px 8px; }
.sb-logout { color: rgba(255,255,255,.85); margin-top: .1rem; border: 0; background: none; width: 100%; }
.sb-logout i { color: rgba(255,255,255,.75); }
.sb-logout:hover { background: rgba(220, 38, 38, .25); color: #fff; }
.sb-logout:hover i { color: #fff; }
.sb-logout-btn { background: none; border: 0; color: inherit; display: flex; align-items: center; gap: .6rem; width: 100%; padding: 0; font: inherit; cursor: pointer; }
.sb-guest { color: rgba(255,255,255,.6); padding: .2rem .4rem .4rem; }

.app-main { margin-left: 264px; min-height: 100vh; display: flex; flex-direction: column; }
.app-main .container { flex: 1; width: 100%; max-width: 1180px; }

.sb-menu-btn, .sb-backdrop { display: none; }

/* Language switcher (EN | Filipino) — used in the sidebar & auth panels */
.lang-switch {
  display: flex; gap: 3px; padding: 3px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; max-width: 240px;
}
.lang-switch__btn {
  flex: 1; text-align: center; padding: 5px 12px;
  font-size: .76rem; font-weight: 700; letter-spacing: .02em;
  color: rgba(255,255,255,.78); text-decoration: none;
  border-radius: 999px; white-space: nowrap;
  transition: background .16s ease, color .16s ease;
}
.lang-switch__btn:hover { color: #fff; background: rgba(255,255,255,.1); }
.lang-switch__btn.active { background: #fff; color: var(--brgy-900); box-shadow: 0 2px 6px rgba(10,20,50,.25); }

/* Light variant for white cards (login / register) */
.lang-switch--light {
  background: #eef2f7; border-color: #dee2e6;
  flex: 0 0 auto;
}
.lang-switch--light .lang-switch__btn { color: #475569; }
.lang-switch--light .lang-switch__btn:hover { background: rgba(30,58,138,.08); color: #1e3a8a; }
.lang-switch--light .lang-switch__btn.active { background: var(--brgy-900); color: #fff; box-shadow: 0 2px 6px rgba(30,58,138,.35); }

@media (max-width: 991.98px) {
  .app-sidebar {
    width: 280px;
    transform: translateX(-105%);
    transition: transform .3s var(--ease-out);
    box-shadow: none;
  }
  body.sb-open .app-sidebar { transform: none; box-shadow: var(--shadow-xl); }
  .app-main { margin-left: 0; padding-top: 3.5rem; }
  .sb-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    position: fixed; top: .85rem; left: .9rem; z-index: 1040;
    width: 46px; height: 46px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #fff; font-size: 1.4rem;
    box-shadow: 0 6px 18px rgba(30, 58, 138, .4);
  }
  .sb-backdrop {
    display: block; position: fixed; inset: 0; z-index: 1029;
    background: rgba(16, 24, 40, .5); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
  }
  body.sb-open .sb-backdrop { opacity: 1; pointer-events: auto; }
  body.sb-open { overflow: hidden; }
}

/* Narrow phones: drawer takes up to 320px of the screen */
@media (max-width: 575.98px) {
  .app-sidebar { width: 100%; max-width: 320px; }
}

/* ---------------------------------------------------------------------------
   21  FOOTER V2  (clear, high-contrast, responsive grid)
--------------------------------------------------------------------------- */
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2.25rem;
  align-items: start;
}
.footer-col { min-width: 0; }
.footer-brand-name {
  color: #fff; font-size: 1.1rem; letter-spacing: .02em;
}
.footer-tag {
  color: rgba(255,255,255,.75); font-size: .88rem; line-height: 1.65;
  max-width: 34ch; margin: .35rem 0 .85rem;
}
.footer-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-size: .72rem; font-weight: 600;
  padding: .32rem .7rem; border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.footer-heading {
  color: #fff; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .16em; font-weight: 700; margin: 0 0 .95rem;
}
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-list li {
  color: rgba(255,255,255,.82); font-size: .9rem; line-height: 1.45;
  display: flex; align-items: flex-start;
}
.footer-list li i { color: #93c5fd; font-size: .95rem; margin-top: .14rem; flex: 0 0 auto; }
.footer-links .footer-link {
  color: rgba(255,255,255,.85) !important; font-weight: 500;
  text-decoration: none; display: inline-flex; align-items: center;
  transition: color .2s ease, transform .2s ease;
}
.footer-links .footer-link:hover { color: #fff !important; transform: translateX(3px); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.16);
  margin-top: 1rem; padding: 1rem 0 .5rem;
  display: flex; align-items: center; justify-content: center;
  gap: .55rem; flex-wrap: wrap;
  color: rgba(255,255,255,.62); font-size: .79rem;
}
.footer-bottom .dot { color: rgba(255,255,255,.35); }
footer.site-footer .footer-top {
  color: rgba(255,255,255,.75); text-decoration: none;
  display: inline-flex; align-items: center; font-weight: 500;
  transition: color .2s ease;
}
footer.site-footer .footer-top:hover { color: #fff; text-decoration: underline; }

/* CTA band */
.footer-cta {
  background: rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.footer-cta__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; flex-wrap: wrap; padding: 1.4rem 0;
}
.footer-cta__title { color: #fff; font-size: 1.15rem; font-weight: 700; }
.footer-cta__sub { color: rgba(255,255,255,.75); font-size: .9rem; }
.footer-cta__btn {
  font-weight: 600; border-radius: 12px; padding: .6rem 1.2rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.2); border: none;
}
.footer-cta__btn:hover { transform: translateY(-1px); }

/* Social icons */
.footer-social-heading {
  color: #fff; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .14em; opacity: .85;
}
.footer-socials { display: flex; gap: .55rem; }
.footer-social {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  color: #fff; font-size: 1rem; text-decoration: none;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.footer-social:hover {
  background: #2563eb; border-color: #2563eb; color: #fff;
  transform: translateY(-2px); text-decoration: none;
}

/* Explore / Services links with chevrons */
.footer-link__arrow { font-size: .6rem; margin-right: .5rem; color: #93c5fd; }
.footer-list .footer-link { gap: 0; }

/* Contact chips */
.footer-contact li { gap: .65rem; }
.footer-contact__icon {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); color: #93c5fd; font-size: .78rem;
  margin-top: .1rem;
}
.footer-contact li i { margin-top: 0; }

@media (max-width: 991.98px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-brand { grid-column: auto; }
}

/* ---------------------------------------------------------------------------
   22  GLOBAL POLISH
--------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .55);
  outline-offset: 2px; border-radius: 6px;
}
::selection { background: #2563eb; color: #fff; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---- Landing: Google Maps embed ---- */
.map-embed {
  height: 100%;
  min-height: 320px;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(10, 20, 50, .12);
  border: 1px solid rgba(15, 23, 42, .08);
}
.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
}