/* =============================================================================
   BARANGAY PORTAL PRO — Stylesheet
   Professional public-facing barangay portal with sidebar layout support.
   Uses CSS custom properties for per-barangay theme customization.
   ============================================================================= */

/* ─── CSS Custom Properties (overridable per-barangay) ──────────────────────── */
:root {
    --brgy-primary: #0d6efd;
    --brgy-secondary: #6c757d;
    --brgy-accent: #ffc107;
    --brgy-sidebar-width: 280px;
    --brgy-header-gradient: linear-gradient(135deg, var(--brgy-primary), var(--brgy-secondary));
    --brgy-text-on-primary: #ffffff;
    --brgy-radius: 0.75rem;
    --brgy-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --brgy-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
    --brgy-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================================================
   LAYOUT — Sidebar + Main Content (when use_sidebar_layout is active)
   ============================================================================= */
.brgy-layout {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.brgy-layout-body {
    display: flex;
    flex: 1;
}

.brgy-sidebar {
    width: var(--brgy-sidebar-width);
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 10;
    transition: transform 0.3s ease;
}

.brgy-main {
    flex: 1;
    min-width: 0;
    background: #f8f9fa;
}

@media (max-width: 991.98px) {
    .brgy-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 1050;
    }
    .brgy-sidebar.show {
        transform: translateX(0);
    }
    .brgy-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1049;
    }
    .brgy-sidebar-overlay.show {
        display: block;
    }
}

/* ─── Sidebar brand ─────────────────────────────────────────────────────────── */
.brgy-sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--brgy-header-gradient);
    color: var(--brgy-text-on-primary);
}

.brgy-sidebar-brand .brgy-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.15);
}

.brgy-sidebar-brand .brgy-logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.brgy-sidebar-brand h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.brgy-sidebar-brand small {
    opacity: 0.75;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Sidebar navigation ────────────────────────────────────────────────────── */
.brgy-sidebar-nav {
    padding: 0.75rem 0;
}

.brgy-sidebar-nav .nav-section {
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.brgy-sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 0;
    transition: var(--brgy-transition);
    border-left: 3px solid transparent;
    text-decoration: none;
}

.brgy-sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
    color: #94a3b8;
    transition: color 0.2s;
}

.brgy-sidebar-nav .nav-link:hover {
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.06);
    color: var(--brgy-primary);
    border-left-color: var(--brgy-primary);
}

.brgy-sidebar-nav .nav-link:hover i {
    color: var(--brgy-primary);
}

.brgy-sidebar-nav .nav-link.active {
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.1);
    color: var(--brgy-primary);
    font-weight: 600;
    border-left-color: var(--brgy-primary);
}

.brgy-sidebar-nav .nav-link.active i {
    color: var(--brgy-primary);
}

.brgy-sidebar-nav .nav-badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 700;
}

/* ─── Sidebar widget area ───────────────────────────────────────────────────── */
.brgy-sidebar-widgets {
    padding: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: auto;
}

.brgy-sidebar-widgets .widget-card {
    border: none;
    border-radius: var(--brgy-radius);
    background: #f1f5f9;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.brgy-sidebar-widgets .widget-card:last-child {
    margin-bottom: 0;
}

/* =============================================================================
   BARANGAY HEADER — Full-width hero area
   ============================================================================= */
.brgy-hero {
    background: var(--brgy-header-gradient);
    color: var(--brgy-text-on-primary);
    padding: 2.5rem 0;
    position: relative;
    overflow: hidden;
}

.brgy-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.brgy-hero-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.brgy-hero-logo-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.brgy-hero h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brgy-hero .brgy-subtitle {
    font-size: 0.88rem;
    opacity: 0.85;
}

/* =============================================================================
   BARANGAY NAVIGATION — Horizontal pill nav (classic layout)
   ============================================================================= */
.brgy-nav {
    background: #fff;
    border-bottom: 2px solid var(--brgy-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.brgy-nav .nav-link {
    color: #475569;
    padding: 0.7rem 1rem;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    border-radius: 0.375rem;
    transition: var(--brgy-transition);
}

.brgy-nav .nav-link:hover {
    color: var(--brgy-primary);
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.08);
}

.brgy-nav .nav-link.active {
    color: #fff;
    background: var(--brgy-primary);
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb, 13, 110, 253), 0.3);
}

.brgy-nav .nav-link i {
    margin-right: 0.35rem;
    font-size: 0.8rem;
}

/* =============================================================================
   CARDS — Consistent barangay content cards
   ============================================================================= */
.brgy-card {
    border: none;
    border-radius: var(--brgy-radius);
    box-shadow: var(--brgy-shadow);
    transition: var(--brgy-transition);
    overflow: hidden;
    background: #fff;
}

.brgy-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--brgy-shadow-hover);
}

.brgy-card .card-img-top {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.brgy-card .card-body {
    padding: 1.25rem;
}

.brgy-card .card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.brgy-card .card-text {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ─── Stats cards ───────────────────────────────────────────────────────────── */
.brgy-stat-card {
    border: none;
    border-radius: var(--brgy-radius);
    padding: 1.25rem;
    text-align: center;
    background: #fff;
    box-shadow: var(--brgy-shadow);
    transition: var(--brgy-transition);
}

.brgy-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--brgy-shadow-hover);
}

.brgy-stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.brgy-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.brgy-stat-card .stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

/* =============================================================================
   OFFICIALS — Professional official card
   ============================================================================= */
.brgy-official-card {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: var(--brgy-radius);
    background: #fff;
    box-shadow: var(--brgy-shadow);
    transition: var(--brgy-transition);
}

.brgy-official-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--brgy-shadow-hover);
}

.brgy-official-card .official-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--brgy-primary);
    margin-bottom: 0.75rem;
}

.brgy-official-card .official-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #64748b;
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.brgy-official-card h6 {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.brgy-official-card .official-position {
    font-size: 0.75rem;
    color: var(--brgy-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* =============================================================================
   SECTIONS — Content section styling
   ============================================================================= */
.brgy-section {
    padding: 3rem 0;
}

.brgy-section:nth-child(even) {
    background: #f1f5f9;
}

.brgy-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
}

.brgy-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--brgy-primary);
    margin-top: 0.5rem;
    border-radius: 2px;
}

.brgy-section-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* =============================================================================
   FOOTER — Professional barangay portal footer
   ============================================================================= */
.brgy-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #e2e8f0;
    padding: 3rem 0 0;
    margin-top: 2rem;
}

.brgy-footer h6 {
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.brgy-footer a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.brgy-footer a:hover {
    color: #fff;
}

.brgy-footer-divider {
    border-color: rgba(255, 255, 255, 0.08);
    margin: 1.5rem 0;
}

.brgy-footer-copyright {
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.78rem;
    color: #64748b;
}

/* =============================================================================
   ALERTS & UTILITY STRIP
   ============================================================================= */
.brgy-utility-strip {
    background: #1e293b;
    color: #94a3b8;
    font-size: 0.78rem;
    padding: 0.35rem 0;
    letter-spacing: 0.01em;
}

.brgy-utility-strip a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.brgy-utility-strip a:hover {
    color: #fff;
}

.brgy-alert-strip {
    background: linear-gradient(90deg, #dc3545, #b91c1c);
    color: #fff;
    font-size: 0.82rem;
    padding: 0.5rem 0;
    animation: brgyAlertPulse 3s infinite;
}

@keyframes brgyAlertPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.92; }
}

/* =============================================================================
   RESPONSIVE UTILITIES
   ============================================================================= */
.brgy-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 1048;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--brgy-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--brgy-transition);
}

.brgy-sidebar-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

@media (max-width: 991.98px) {
    .brgy-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* =============================================================================
   HAZARD PROFILE WIDGET
   ============================================================================= */
.brgy-hazard-widget {
    border-radius: var(--brgy-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--brgy-shadow);
}

.brgy-hazard-widget .hazard-header {
    background: linear-gradient(135deg, #dc3545, #b91c1c);
    color: #fff;
    padding: 1rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.brgy-hazard-widget .hazard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}

.brgy-hazard-widget .hazard-item:last-child {
    border-bottom: none;
}

.brgy-hazard-level {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hazard-level-high   { background: #fee2e2; color: #991b1b; }
.hazard-level-medium { background: #fef3c7; color: #92400e; }
.hazard-level-low    { background: #dcfce7; color: #166534; }
.hazard-level-none   { background: #f1f5f9; color: #475569; }

/* =============================================================================
   EMERGENCY CONTACTS WIDGET
   ============================================================================= */
.brgy-emergency-widget {
    border-radius: var(--brgy-radius);
    border: 2px solid #dc3545;
    overflow: hidden;
}

.brgy-emergency-widget .emergency-header {
    background: #dc3545;
    color: #fff;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
}

.brgy-emergency-widget .emergency-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}

.brgy-emergency-widget .emergency-item:last-child {
    border-bottom: none;
}

.brgy-emergency-widget .emergency-phone {
    margin-left: auto;
    font-weight: 700;
    color: #dc3545;
    white-space: nowrap;
}

/* =============================================================================
   ANIMATION CLASSES
   ============================================================================= */
[data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */
@media print {
    .brgy-sidebar,
    .brgy-nav,
    .brgy-sidebar-toggle,
    .brgy-admin-bar,
    .brgy-utility-strip,
    .brgy-alert-strip {
        display: none !important;
    }
    .brgy-main {
        width: 100% !important;
    }
    .brgy-card {
        box-shadow: none !important;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* =============================================================================
   DARK MODE — Bootstrap 5 data-bs-theme="dark" overrides
   ============================================================================= */
[data-bs-theme="dark"] .brgy-sidebar {
    background: #1e293b;
    border-right-color: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .brgy-sidebar-nav .nav-section {
    color: #64748b;
}

[data-bs-theme="dark"] .brgy-sidebar-nav .nav-link {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .brgy-sidebar-nav .nav-link i {
    color: #64748b;
}

[data-bs-theme="dark"] .brgy-sidebar-nav .nav-link:hover {
    background: rgba(99, 155, 255, 0.1);
    color: #93c5fd;
    border-left-color: #93c5fd;
}

[data-bs-theme="dark"] .brgy-sidebar-nav .nav-link:hover i {
    color: #93c5fd;
}

[data-bs-theme="dark"] .brgy-sidebar-nav .nav-link.active {
    background: rgba(99, 155, 255, 0.15);
    color: #93c5fd;
    border-left-color: #60a5fa;
}

[data-bs-theme="dark"] .brgy-sidebar-nav .nav-link.active i {
    color: #60a5fa;
}

[data-bs-theme="dark"] .brgy-sidebar-widgets {
    border-top-color: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .brgy-sidebar-widgets .widget-card {
    background: #334155;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .brgy-main {
    background: #0f172a;
}

[data-bs-theme="dark"] .brgy-card {
    background: #1e293b;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .brgy-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .brgy-card .card-text {
    color: #94a3b8;
}

[data-bs-theme="dark"] .brgy-stat-card {
    background: #1e293b;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .brgy-stat-card .stat-label {
    color: #64748b;
}

[data-bs-theme="dark"] .brgy-official-card {
    background: #1e293b;
}

[data-bs-theme="dark"] .brgy-official-card .official-photo-placeholder {
    background: linear-gradient(135deg, #334155, #475569);
    color: #94a3b8;
}

[data-bs-theme="dark"] .brgy-section:nth-child(even) {
    background: #1e293b;
}

[data-bs-theme="dark"] .brgy-nav {
    background: #1e293b;
    border-bottom-color: var(--brgy-primary);
}

[data-bs-theme="dark"] .brgy-nav .nav-link {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .brgy-nav .nav-link:hover {
    color: #93c5fd;
    background: rgba(99, 155, 255, 0.1);
}

[data-bs-theme="dark"] .brgy-hazard-widget {
    background: #1e293b;
}

[data-bs-theme="dark"] .brgy-hazard-widget .hazard-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .brgy-emergency-widget {
    background: #1e293b;
}

[data-bs-theme="dark"] .brgy-emergency-widget .emergency-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

/* =============================================================================
   OFFCANVAS NAVIGATION — Mobile menu enhancements
   ============================================================================= */
@media (max-width: 991.98px) {
    .offcanvas-end {
        width: min(85vw, 360px);
    }

    .offcanvas .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .offcanvas .navbar-nav .dropdown-toggle::after {
        margin-left: auto;
    }

    .offcanvas .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        background: rgba(0, 0, 0, 0.02);
    }

    .offcanvas .mega-menu {
        position: static !important;
        width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .offcanvas .mega-menu .row {
        flex-direction: column;
    }

    .offcanvas .mega-menu .mega-promo {
        display: none;
    }

    .offcanvas .mega-heading {
        font-size: 0.7rem;
        padding: 0.5rem 1rem 0.25rem;
        margin-top: 0.5rem;
    }
}

/* =============================================================================
   PUBLIC PAGE ENHANCEMENTS — Professional styling for public-facing pages
   ============================================================================= */

/* Page headers inside sidebar layout */
.brgy-page-header {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.9));
    border-bottom: 2px solid var(--brgy-primary);
    padding: 1.25rem 1.5rem;
    margin: -1rem -1rem 1.5rem -1rem;
    border-radius: 0;
}

.brgy-page-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.brgy-page-header h2 i {
    color: var(--brgy-primary);
    margin-right: 0.5rem;
}

[data-bs-theme="dark"] .brgy-page-header {
    background: linear-gradient(135deg, rgba(30,41,59,0.95), rgba(15,23,42,0.9));
    border-bottom-color: var(--brgy-primary);
}

[data-bs-theme="dark"] .brgy-page-header h2 {
    color: #f1f5f9;
}

/* Content typography */
.brgy-main .brgy-content,
.brgy-main .container-fluid {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #334155;
}

[data-bs-theme="dark"] .brgy-main .brgy-content,
[data-bs-theme="dark"] .brgy-main .container-fluid {
    color: #cbd5e1;
}

/* Section dividers */
.brgy-divider {
    height: 3px;
    width: 60px;
    background: var(--brgy-primary);
    border-radius: 2px;
    margin: 0.5rem 0 1.5rem;
}

/* Info badges */
.brgy-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.1);
    color: var(--brgy-primary);
}

/* Table improvements */
.brgy-main .table {
    font-size: 0.88rem;
}

.brgy-main .table thead th {
    background: #f8fafc;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    border-bottom-width: 2px;
}

[data-bs-theme="dark"] .brgy-main .table thead th {
    background: #334155;
    color: #94a3b8;
}

/* Empty state */
.brgy-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.brgy-empty-state i {
    font-size: 3rem;
    opacity: 0.4;
    margin-bottom: 1rem;
    display: block;
}

.brgy-empty-state p {
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Loading skeleton */
.brgy-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: brgySkeletonPulse 1.5s ease-in-out infinite;
    border-radius: 0.25rem;
}

@keyframes brgySkeletonPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Widget sidebar (right column) */
.brgy-widget-sidebar .card {
    border: none;
    border-radius: var(--brgy-radius);
    box-shadow: var(--brgy-shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.brgy-widget-sidebar .card-header {
    background: var(--brgy-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.75rem 1rem;
    border: none;
}

.brgy-widget-sidebar .card .list-group-item {
    font-size: 0.88rem;
    padding: 0.65rem 1rem;
    border-left: none;
    border-right: none;
    transition: background 0.2s;
}

.brgy-widget-sidebar .card .list-group-item:hover {
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.04);
}

[data-bs-theme="dark"] .brgy-widget-sidebar .card {
    background: #1e293b;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* =============================================================================
   ACCESSIBILITY FOCUS STYLES
   ============================================================================= */
.brgy-sidebar-nav .nav-link:focus-visible {
    outline: 2px solid var(--brgy-primary);
    outline-offset: -2px;
    box-shadow: none;
}

.brgy-nav .nav-link:focus-visible {
    outline: 2px solid var(--brgy-primary);
    outline-offset: -2px;
}

.brgy-sidebar-toggle:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* =============================================================================
   ICON CIRCLES — Standardized circular icon containers
   Replaces 130+ inline width/height styles with 7 reusable classes.
   Usage: <div class="icon-circle icon-circle-md bg-primary bg-opacity-10">
              <i class="fa fa-users text-primary"></i>
          </div>
   ============================================================================= */
.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-circle:hover {
    transform: scale(1.05);
}

/* ─── Size tokens ───────────────────────────────────────────────────────────── */
.icon-circle-xs  { width: 32px;  height: 32px;  font-size: 0.75rem; }
.icon-circle-sm  { width: 40px;  height: 40px;  font-size: 0.875rem; }
.icon-circle-md  { width: 48px;  height: 48px;  font-size: 1rem; }
.icon-circle-lg  { width: 64px;  height: 64px;  font-size: 1.25rem; }
.icon-circle-xl  { width: 80px;  height: 80px;  font-size: 1.5rem; }

/* ─── Special sizes for avatars ─────────────────────────────────────────────── */
.icon-circle-avatar    { width: 96px;  height: 96px;  font-size: 2rem; }
.icon-circle-avatar-lg { width: 160px; height: 160px; font-size: 4rem; }
.icon-circle-hero      { width: 64px;  height: 64px;  font-size: 1.5rem; }

/* ─── Process step circles (numbered) ───────────────────────────────────────── */
.step-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 1.25rem;
    width: 56px;
    height: 56px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.step-circle:hover {
    transform: scale(1.08);
}

/* ─── Page header icon (rounded square, not circle) ─────────────────────────── */
.page-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

/* ─── Card hover effects ────────────────────────────────────────────────────── */
.card-hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.card-link-shadow {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-link-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.08) !important;
}

/* ─── Quick action cards (for certificate_info, etc.) ───────────────────────── */
.quick-action-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent !important;
}

.quick-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
    border-color: var(--brgy-primary) !important;
}

/* ─── Fade-in animation for page content ────────────────────────────────────── */
@keyframes brgyFadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.brgy-animate-in {
    animation: brgyFadeInUp 0.4s ease-out both;
}

.brgy-animate-in:nth-child(1) { animation-delay: 0s; }
.brgy-animate-in:nth-child(2) { animation-delay: 0.06s; }
.brgy-animate-in:nth-child(3) { animation-delay: 0.12s; }
.brgy-animate-in:nth-child(4) { animation-delay: 0.18s; }
.brgy-animate-in:nth-child(5) { animation-delay: 0.24s; }
.brgy-animate-in:nth-child(6) { animation-delay: 0.30s; }

/* ─── Empty state styling ───────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state .icon-circle {
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state h4 {
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #94a3b8;
    max-width: 400px;
    margin: 0 auto;
}

/* ─── Back navigation bar ───────────────────────────────────────────────────── */
.back-nav {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.back-nav .btn {
    font-weight: 500;
}

/* ─── Print styles ──────────────────────────────────────────────────────────── */
@media print {
    .brgy-sidebar,
    .brgy-sidebar-toggle,
    .brgy-utility-strip,
    .brgy-alert-strip,
    .brgy-sidebar-overlay,
    .back-nav,
    .brgy-footer {
        display: none !important;
    }
    .brgy-main {
        margin: 0 !important;
        padding: 0 !important;
    }
    .icon-circle {
        border: 1px solid #ccc;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
