/* ==========================================================================
   SSF ANGADIMUGAR CSS STYLESHEET (Glassmorphism & Light Theme Default)
   ========================================================================== */

@font-face {
    font-family: 'Cooper Black';
    src: url('fonts/Cooper-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.ssf-cooper-text {
    font-family: 'Cooper Black', 'Cooper', serif !important;
    font-weight: normal !important;
    letter-spacing: 0.5px !important;
}

/* Design Tokens & Variables */
:root {
    --font-primary: 'Montserrat', 'Anek Malayalam', sans-serif;
    --font-secondary: 'Montserrat', 'Anek Malayalam', sans-serif;
    --font-malayalam: 'Anek Malayalam', sans-serif;
    --font-cooper: 'Cooper Black', 'Cooper', serif;
    
    /* Light/White Theme Colors (Default) - Pure White Palette */
    --bg-app: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-card: rgba(0, 0, 0, 0.08);
    --bg-agenda-modal: #ffffff;
    
    --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 4px 20px 0 rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(89, 92, 35, 0.25);
    
    /* Brand Accents - Deep Olive Green Palette */
    --emerald-primary: #595c23;
    --emerald-dark: #45481b;
    --emerald-light: #f2f5e4;
    --teal-primary: #595c23;
    --teal-light: #eef1dd;
    --gold-primary: #ca8a04;
    --gold-light: #fef9c3;
    
    --danger-red: #dc2626;
    --danger-light: #fee2e2;
    --blue-primary: #2563eb;
    --blue-light: #dbeafe;
    
    /* Blur filters */
    --glass-blur: blur(12px) saturate(180%);
}

/* Dark Theme Variables Override - White & Yellow Font Palette */
body.dark-theme {
    --bg-app: #080d0b;
    --bg-sidebar: rgba(10, 18, 15, 0.85);
    --bg-card: rgba(18, 30, 26, 0.75);
    --bg-card-hover: rgba(24, 40, 35, 0.85);
    
    --text-primary: #ffffff; /* Crisp Pure White */
    --text-secondary: #facc15; /* Vibrant Yellow */
    --text-muted: #fde047; /* Bright Soft Yellow */
    --border-color: rgba(250, 204, 21, 0.25);
    --border-card: rgba(250, 204, 21, 0.3);
    --bg-agenda-modal: rgba(18, 30, 26, 0.98);
    
    --shadow-main: 0 10px 40px -15px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(250, 204, 21, 0.25);
    
    --emerald-primary: #facc15;
    --emerald-dark: #eab308;
    --emerald-light: rgba(234, 179, 8, 0.2);
    --teal-primary: #facc15;
    --teal-light: rgba(234, 179, 8, 0.2);
    --gold-primary: #facc15;
    --gold-light: rgba(250, 204, 21, 0.25);
    --danger-light: rgba(220, 38, 38, 0.3);
    --blue-light: rgba(37, 99, 235, 0.3);
}

/* Global Dark Theme Font Colors: Pure White & Vibrant Yellow */
body.dark-theme {
    color: #ffffff;
}

body.dark-theme h1, 
body.dark-theme h2, 
body.dark-theme h3, 
body.dark-theme h4, 
body.dark-theme h5, 
body.dark-theme h6,
body.dark-theme .card-title,
body.dark-theme strong,
body.dark-theme b,
body.dark-theme .brand-title,
body.dark-theme .title-text,
body.dark-theme .modal-title,
body.dark-theme th {
    color: #ffffff !important;
}

body.dark-theme p,
body.dark-theme label,
body.dark-theme small,
body.dark-theme .text-muted,
body.dark-theme .text-secondary,
body.dark-theme .current-date,
body.dark-theme .sub-text,
body.dark-theme .card-subtitle,
body.dark-theme .unit-code,
body.dark-theme .unit-sub,
body.dark-theme .stat-label,
body.dark-theme .brand-sub,
body.dark-theme .brand-highlight,
body.dark-theme .header-badge,
body.dark-theme i:not(.btn i) {
    color: #facc15 !important;
}

body.dark-theme td,
body.dark-theme .unit-name,
body.dark-theme .user-name,
body.dark-theme .list-item-title {
    color: #ffffff !important;
}

body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
    background-color: rgba(18, 30, 26, 0.9) !important;
    color: #ffffff !important;
    border-color: rgba(250, 204, 21, 0.35) !important;
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
    color: #fde047 !important;
    opacity: 0.75;
}

/* High-Performance Base Styles & Rendering Engine */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overscroll-behavior-y: none;
    touch-action: pan-y;
    scrollbar-gutter: stable;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Scoped, performant transitions on interactive elements only */
body, 
.glass-card, 
.card, 
.btn, 
.btn-emerald, 
.btn-outline, 
.nav-link, 
.action-card-hover, 
.badge, 
.header-badge, 
input, 
select, 
textarea, 
.theme-btn-nav, 
.membership-unit-row,
.custom-pill {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

body {
    font-family: var(--font-primary);
    background-color: #ffffff;
    background: #ffffff;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    text-rendering: optimizeSpeed;
}

body.dark-theme {
    background-color: var(--bg-app);
    background: var(--bg-app);
    color: #ffffff;
}

/* App Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 10;
    contain: layout style;
}

/* Decorative Mesh Background (Disabled in light mode for pure white background) */
.mesh-background {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

body.dark-theme .mesh-background {
    display: block;
}

.mesh-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
}

.circle-1 {
    top: -10%;
    right: 5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--emerald-primary) 0%, transparent 70%);
}

.circle-2 {
    bottom: -10%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--teal-primary) 0%, transparent 70%);
}

body.dark-theme .mesh-circle {
    opacity: 0.15;
}

/* Top Navigation Bar */
.navbar-top {
    width: 100%;
    background: linear-gradient(135deg, #626629, #595c23); /* Deep Olive Green Gradient */
    border-bottom: 2px solid #45481b;
    padding: 0.45rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(89, 92, 35, 0.25);
    box-sizing: border-box;
}

body.dark-theme .navbar-top {
    background: linear-gradient(135deg, #022c22, #041d18);
    border-bottom: 2px solid #021a15;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.navbar-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 8px;
    box-sizing: border-box;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: #ffffff; /* White background for the logo */
    color: #064e3b; /* Deep emerald crescent and star */
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

body.dark-theme .logo-icon {
    background: rgba(255, 255, 255, 0.08);
    color: #fbbf24;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-sub {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fbbf24; /* Gold subtext */
    text-transform: uppercase;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff; /* White main branding text */
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.brand-title .brand-highlight {
    font-family: "Cooper Black", serif;
    font-size: 1.3rem;
    letter-spacing: 0px;
    margin-right: 6px;
    color: #fbbf24;
}

.nav-menu-horizontal {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
    row-gap: 4px;
}

.nav-menu-horizontal::-webkit-scrollbar {
    display: none;
}

.nav-menu-horizontal .nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    color: rgba(255, 255, 255, 0.88); /* Off-white for inactive links */
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.77rem;
    letter-spacing: -0.01em;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-menu-horizontal .nav-link i {
    font-size: 0.92rem;
}

.nav-menu-horizontal .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.nav-menu-horizontal .nav-link.active {
    background: #f2f5e4; /* Soft olive active link pill */
    color: #595c23; /* Deep olive green text for active link */
    box-shadow: 0 4px 12px rgba(89, 92, 35, 0.25);
}

/* Mobile Drawer Element Defaults (hidden on desktop) */
.mobile-nav-backdrop {
    display: none;
}

.mobile-drawer-header,
.mobile-drawer-footer {
    display: none;
}

.mobile-drawer-body {
    display: contents;
}

.nav-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ssf-nav-svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.izza-nav-icon {
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    filter: brightness(0) saturate(100%) invert(32%) sepia(98%) saturate(2152%) hue-rotate(211deg) brightness(97%) contrast(92%);
}

.action-label {
    display: none;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.navbar-actions .header-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.theme-btn-nav {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.theme-btn-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fbbf24;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
}

.page-header-info {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 15px;
}

#page-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--emerald-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-theme #page-title {
    background: linear-gradient(135deg, #ffffff, var(--emerald-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.current-date {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

body.dark-theme .current-date {
    color: #facc15 !important;
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--emerald-primary);
}

.menu-toggle-btn {
    display: none;
}

/* Tab Viewport & Panel Animations (Snappy 60fps GPU Accelerated) */
.tab-viewport {
    flex-grow: 1;
    position: relative;
    contain: layout style;
}

.tab-pane {
    display: none;
    content-visibility: hidden;
}

.tab-pane.active {
    display: block;
    content-visibility: visible;
    animation: tabFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform: translateZ(0);
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    box-shadow: var(--shadow-main);
    background: var(--bg-card-hover);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    font-size: 1.25rem;
}

.card-title-svg,
.card-title svg,
.section-title svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: inline-block;
    vertical-align: -3px;
    flex-shrink: 0;
    transform-origin: center;
    filter: none !important;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: cardIconDefaultFloat 1.4s ease-in-out infinite;
}

.stat-svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: inline-block;
    flex-shrink: 0;
    transform-origin: center;
    filter: none !important;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: cardIconDefaultFloat 1.4s ease-in-out infinite;
}

/* Card Hover Interactive Icon Animation - Clean, Shadow-Free & Fast */
.glass-card:hover .card-title-svg,
.glass-card:hover .card-title svg,
.stat-card:hover .stat-svg,
.card-title:hover .card-title-svg,
.card-title:hover svg {
    transform: scale(1.15) translate3d(0, -2px, 0);
    filter: none !important;
}

/* Specific Signature Fast Motion Icon Animations */
.card-title-svg.text-amber,
.card-title-svg.text-gold {
    animation: animCalendarTilt 1.3s ease-in-out infinite;
}

.card-title-svg.text-teal,
.card-title-svg.text-sky {
    animation: animBullhornSway 1.4s ease-in-out infinite;
}

.card-title-svg.text-emerald {
    animation: animHeartbeat 1.1s ease-in-out infinite;
}

.card-title-svg.text-blue,
.card-title-svg.text-indigo {
    animation: animChartRise 1.3s ease-in-out infinite;
}

.card-title-svg.text-purple,
.card-title-svg.text-violet {
    animation: animAnalyticsWobble 1.4s ease-in-out infinite;
}

.card-title-svg.text-orange {
    animation: animGalleryZoom 1.3s ease-in-out infinite;
}

.card-title-svg.text-rose,
.card-title-svg.text-red {
    animation: animVideoPop 1.1s ease-in-out infinite;
}

/* Keyframes for Icon Animations - Hardware Accelerated for Smartphones & Desktop */
@keyframes cardIconDefaultFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, -2.5px, 0) scale(1.06);
    }
}

@keyframes animCalendarTilt {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    }
    20% {
        transform: translate3d(0, 0, 0) rotate(-7deg) scale(1.08);
    }
    40% {
        transform: translate3d(0, 0, 0) rotate(7deg) scale(1.08);
    }
    60% {
        transform: translate3d(0, 0, 0) rotate(-3deg) scale(1.04);
    }
    80% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    }
}

@keyframes animBullhornSway {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate3d(0, 0, 0) rotate(-9deg) scale(1.1);
    }
    50% {
        transform: translate3d(0, 0, 0) rotate(5deg) scale(1.06);
    }
    75% {
        transform: translate3d(0, 0, 0) rotate(-4deg) scale(1.04);
    }
}

@keyframes animHeartbeat {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    14% {
        transform: translate3d(0, 0, 0) scale(1.16);
    }
    28% {
        transform: translate3d(0, 0, 0) scale(1.03);
    }
    42% {
        transform: translate3d(0, 0, 0) scale(1.13);
    }
    70% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes animChartRise {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, -3.5px, 0) scale(1.08);
    }
}

@keyframes animAnalyticsWobble {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    }
    40% {
        transform: translate3d(0, 0, 0) rotate(14deg) scale(1.1);
    }
    70% {
        transform: translate3d(0, 0, 0) rotate(-6deg) scale(1.04);
    }
}

@keyframes animGalleryZoom {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    }
    50% {
        transform: translate3d(0, 0, 0) scale(1.12) rotate(-4deg);
    }
}

@keyframes animVideoPop {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    40% {
        transform: translate3d(0, 0, 0) scale(1.16);
    }
    60% {
        transform: translate3d(0, 0, 0) scale(1.06);
    }
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg, #ffffff);
    backdrop-filter: var(--glass-blur, blur(12px));
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    border-radius: 18px;
    padding: 1.35rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    transition: all 0.22s ease;
    overflow: hidden;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat-label {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    font-family: 'Outfit', sans-serif;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 900;
    margin: 4px 0 2px;
    color: var(--text-primary, #0f172a);
    font-family: 'Outfit', sans-serif;
    line-height: 1.15;
}

.stat-desc {
    font-size: 0.76rem;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
}

.stat-icon-badge {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.stat-card:hover .stat-icon-badge {
    transform: scale(1.08);
}

.stat-icon-badge.badge-emerald {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.stat-icon-badge.badge-teal {
    background: rgba(13, 148, 136, 0.12);
    color: #0d9488;
}

.stat-icon-badge.badge-amber {
    background: #fef3c7;
    color: #b45309;
}

.stat-icon-badge.badge-yellow {
    background: #fef9c3;
    color: #ca8a04;
}

.stat-icon-badge.badge-blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-badge-p {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1.5px solid #10b981;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 2.5px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.stat-badge-l {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
    border: 1.5px solid #f59e0b;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 2.5px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.stat-badge-a {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1.5px solid #ef4444;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 2.5px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.stat-attendance-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.stat-attendance-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.card-emerald .stat-icon { background: var(--emerald-light); color: var(--emerald-primary); }
.card-teal .stat-icon { background: var(--teal-light); color: var(--teal-primary); }
.card-gold .stat-icon { background: var(--gold-light); color: var(--gold-primary); }
.card-blue .stat-icon { background: var(--blue-light); color: var(--blue-primary); }

/* Layout Grids */
.dashboard-details-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.dashboard-details-grid.margin-top {
    margin-top: 1.5rem;
}

.flex-1 { flex: 1; min-width: 300px; }
.flex-2 { flex: 2; min-width: 350px; }
.flex-column { display: flex; flex-direction: column; }

/* Split Views */
.split-view {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Attendance Interactive Split (PC Right Side, Smartphone Down, No Black Backdrop) */
.attendance-interactive-split {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
}

.attendance-interactive-split > .list-panel {
    flex: 1 1 480px;
    min-width: 300px;
    width: 100%;
}

.attendance-interactive-split > .detail-panel {
    flex: 1 1 420px;
    min-width: 300px;
    max-width: 540px;
    width: 100%;
    position: relative;
    animation: fadeIn 0.2s ease-in-out;
}

@media (max-width: 992px) {
    .attendance-interactive-split {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    .attendance-interactive-split > .list-panel,
    .attendance-interactive-split > .detail-panel {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }
}

.list-panel {
    max-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
}

.detail-panel {
    min-height: 450px;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.scrollable-list {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 4px;
}

/* Custom Scrollbars */
.scrollable-list::-webkit-scrollbar,
.circulars-list-container::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollable-list::-webkit-scrollbar-thumb,
.circulars-list-container::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(6, 78, 59, 0.15);
    border-radius: 10px;
}

.scrollable-list::-webkit-scrollbar-track,
.circulars-list-container::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: transparent;
}

/* Badges (Exact Clean Style matching media_1787161204851 & Perfect Vertical Centering) */
.badge {
    font-size: 0.72rem;
    font-weight: 750;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    height: fit-content !important;
    align-self: center !important;
    white-space: nowrap !important;
    border: none !important;
    box-sizing: border-box !important;
}

/* 1. Present / President / 11 Members: Soft Mint Cream with Dark Emerald Text */
.badge-emerald { 
    background: #dcfce7 !important; 
    color: #15803d !important; 
}
body.dark-theme .badge-emerald {
    background: rgba(34, 197, 94, 0.2) !important;
    color: #4ade80 !important;
}

/* 2. Leave / Finance Secretary: Soft Warm Cream/Yellow with Rich Gold/Amber Text (Exact screenshot style) */
.badge-gold { 
    background: #fef9c3 !important; 
    color: #b45309 !important; 
}
body.dark-theme .badge-gold {
    background: rgba(234, 179, 8, 0.2) !important;
    color: #facc15 !important;
}

/* 3. Absent / Danger: Soft Rose Cream with Red Text */
.badge-red { 
    background: #fee2e2 !important; 
    color: #b91c1c !important; 
}
body.dark-theme .badge-red {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
}

/* 4. General Secretary: Soft Blue Cream with Royal Blue Text */
.badge-blue { 
    background: #dbeafe !important; 
    color: #1d4ed8 !important; 
}
body.dark-theme .badge-blue {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
}

/* 5. Department Secretaries: Soft Purple Cream with Vibrant Purple Text */
.badge-purple { 
    background: #f3e8ff !important; 
    color: #7e22ce !important; 
}
body.dark-theme .badge-purple {
    background: rgba(168, 85, 247, 0.2) !important;
    color: #c084fc !important;
}

/* 6. Executive / 28 Members / Teal: Soft Teal Cream with Teal Text */
.badge-teal { 
    background: #ccfbf1 !important; 
    color: #0f766e !important; 
}
body.dark-theme .badge-teal {
    background: rgba(20, 184, 166, 0.2) !important;
    color: #2dd4bf !important;
}

/* 7. Secretariat Member / General Members: Soft Slate Cream with Slate Text */
.badge-slate { 
    background: #f1f5f9 !important; 
    color: #475569 !important; 
}
body.dark-theme .badge-slate {
    background: rgba(148, 163, 184, 0.2) !important;
    color: #cbd5e1 !important;
}

/* Leaderboards */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

body.dark-theme .leaderboard-item {
    background: rgba(255, 255, 255, 0.02);
}

.leaderboard-item:hover {
    transform: translateX(5px);
    border-color: var(--emerald-primary);
    background: var(--bg-card);
}

.leaderboard-item.active {
    border-color: var(--emerald-primary);
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.05);
}

.leaderboard-rank {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
    font-size: 0.85rem !important;
    font-family: var(--font-primary), sans-serif !important;
    line-height: 1 !important;
    text-align: center !important;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    box-sizing: border-box !important;
}

body.dark-theme .leaderboard-rank {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* Rank Medals styles - Same size & type across all tabs and smartphones */
.rank-1, .leaderboard-rank.rank-1 {
    background: #fef08a !important;
    color: #854d0e !important;
    border: 1px solid #facc15 !important;
}

.rank-2, .leaderboard-rank.rank-2 {
    background: #e2e8f0 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

.rank-3, .leaderboard-rank.rank-3 {
    background: #fed7aa !important;
    color: #9a3412 !important;
    border: 1px solid #fb923c !important;
}

body.dark-theme .rank-1, body.dark-theme .leaderboard-rank.rank-1 {
    background: #854d0e !important;
    color: #fef08a !important;
    border-color: #ca8a04 !important;
}

body.dark-theme .rank-2, body.dark-theme .leaderboard-rank.rank-2 {
    background: #334155 !important;
    color: #f1f5f9 !important;
    border-color: #64748b !important;
}

body.dark-theme .rank-3, body.dark-theme .leaderboard-rank.rank-3 {
    background: #7c2d12 !important;
    color: #ffedd5 !important;
    border-color: #c2410c !important;
}

.leaderboard-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.leaderboard-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.leaderboard-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-secondary);
}

.leaderboard-status {
    margin-left: auto;
}

/* Detail Panel Placeholder */
.detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.detail-placeholder i {
    margin-bottom: 1rem;
}

.detail-placeholder h4 {
    margin-bottom: 6px;
    font-weight: 700;
}

.detail-placeholder p {
    font-size: 0.85rem;
    max-width: 250px;
    line-height: 1.4;
    color: var(--text-muted);
}

.detail-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hidden {
    display: none !important;
}

/* Member Profile Styles */
.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--emerald-light);
    color: var(--emerald-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 2px solid var(--border-color);
}

.profile-avatar-teal {
    background: var(--teal-light);
    color: var(--teal-primary);
}

.profile-meta h3 {
    font-size: 1.3rem;
    font-weight: 800;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* Counters Grid */
.stats-counters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.counter-box {
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid var(--border-color);
}

.counter-val {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-secondary);
}

.counter-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.box-present { background: var(--emerald-light); color: var(--emerald-primary); }
.box-leave { background: var(--gold-light); color: var(--gold-primary); }
.box-absent { background: var(--danger-light); color: var(--danger-red); }

/* Form Elements */
.action-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
}

body.dark-theme .action-card {
    background: rgba(255, 255, 255, 0.01);
}

.action-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.status-buttons-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 1.5rem;
}

.btn {
    font-family: var(--font-primary);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(1px);
}

.btn-status-present { background: transparent; color: var(--emerald-primary); border-color: var(--emerald-primary); }
.btn-status-present:hover, .btn-status-present.active { background: var(--emerald-primary); color: white; }

.btn-status-leave { background: transparent; color: var(--gold-primary); border-color: var(--gold-primary); }
.btn-status-leave:hover, .btn-status-leave.active { background: var(--gold-primary); color: white; }

.btn-status-absent { background: transparent; color: var(--danger-red); border-color: var(--danger-red); }
.btn-status-absent:hover, .btn-status-absent.active { background: var(--danger-red); color: white; }

.btn-emerald { background: var(--emerald-primary); color: white; border: none; }
.btn-emerald:hover { background: var(--emerald-dark); box-shadow: var(--shadow-glow); }

.btn-teal { background: var(--teal-primary); color: white; border: none; }
.btn-teal:hover { background: #0f766e; }

.btn-gold { background: var(--gold-primary); color: white; border: none; }
.btn-gold:hover { background: #b45309; }

.width-full { width: 100%; }
.margin-top { margin-top: 1.25rem; }

.manual-adjustment {
    border-top: 1px dashed var(--border-color);
    padding-top: 1.25rem;
}

.adjustment-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.form-control {
    font-family: var(--font-secondary);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff !important;
    color: var(--text-primary);
    font-size: 0.85rem;
}

body.dark-theme .form-control {
    background: rgba(0, 0, 0, 0.3) !important;
}

.form-control:focus {
    outline: none;
    background: #ffffff !important;
    border-color: var(--emerald-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

input[type="number"].form-control, .adjustment-inputs input, .stepper-input {
    font-family: var(--font-secondary);
    padding: 8px 4px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    text-align: center;
    font-weight: 700;
    width: 100%;
}

body.dark-theme .adjustment-inputs input,
body.dark-theme .stepper-input {
    background: rgba(0, 0, 0, 0.3);
}

/* Count Stepper */
.count-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.6);
}

body.dark-theme .count-stepper {
    background: rgba(0, 0, 0, 0.3);
}

.stepper-btn {
    flex-shrink: 0;
    width: 34px;
    height: 38px;
    background: rgba(16, 185, 129, 0.08);
    border: none;
    border-right: 1px solid var(--border-color);
    color: var(--emerald-primary);
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    user-select: none;
}

.stepper-btn.stepper-inc {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.stepper-btn:hover {
    background: rgba(16, 185, 129, 0.18);
}

.stepper-btn:active {
    background: rgba(16, 185, 129, 0.32);
    transform: scale(0.95);
}

.stepper-input {
    flex: 1;
    min-width: 0;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    padding: 6px 2px;
    -moz-appearance: textfield;
}

.stepper-input::-webkit-inner-spin-button,
.stepper-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.stepper-input:focus {
    outline: none;
    box-shadow: none;
}

/* Executive Search */
.search-bar-container {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 35px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.85rem;
}

body.dark-theme .search-input {
    background: rgba(0, 0, 0, 0.3);
}

.search-input:focus {
    outline: none;
    border-color: var(--teal-primary);
}

/* Unit and Programs Drill-down */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1.5rem;
    align-items: start;
}

.unit-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.unit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.dark-theme .unit-row {
    background: rgba(255, 255, 255, 0.02);
}

.unit-row:hover, .unit-row.active {
    transform: translateX(4px);
    border: none;
    background: var(--bg-card);
}

.unit-row.active {
    background: rgba(16, 185, 129, 0.08);
    border: none;
}

.unit-title-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.unit-name {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.unit-badge {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.programs-sub-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 1.25rem;
}

.program-sub-card {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

body.dark-theme .program-sub-card {
    background: rgba(255, 255, 255, 0.02);
}

.program-sub-card:hover, .program-sub-card.active {
    border-color: var(--emerald-primary);
    background: var(--bg-card);
    transform: translateY(-2px);
}

.program-sub-card.active {
    background: rgba(16, 185, 129, 0.08);
    box-shadow: var(--shadow-glow);
}

.program-sub-name {
    font-weight: 700;
    font-size: 0.85rem;
}

.program-sub-status {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* Leaderboard Tab Buttons & Month Filter Dropdowns (Exact Style matching media_1787161406712) */
#tab-unit-leaderboard-btn,
#tab-prog-leaderboard-btn,
#dash-prog-tab-program,
#dash-prog-tab-unit,
#dash-prog-month-filter,
.custom-month-dropdown-btn {
    font-family: var(--font-primary), 'Montserrat', sans-serif !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    letter-spacing: normal !important;
    padding: 6px 14px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    line-height: 1.2 !important;
    height: 36px !important;
    box-sizing: border-box !important;
}

#unit-leaderboard-month-filter {
    display: none !important;
}

#tab-unit-leaderboard-btn,
#tab-prog-leaderboard-btn,
#dash-prog-tab-program,
#dash-prog-tab-unit {
    justify-content: center !important;
}

#tab-unit-leaderboard-btn:hover,
#tab-prog-leaderboard-btn:hover,
#dash-prog-tab-program:hover,
#dash-prog-tab-unit:hover,
#dash-prog-month-filter:hover,
.custom-month-dropdown-btn:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
}

#tab-unit-leaderboard-btn.active,
#tab-prog-leaderboard-btn.active,
#dash-prog-tab-program.active,
#dash-prog-tab-unit.active {
    background: #ffffff !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
    font-weight: 800 !important;
}

body.dark-theme #tab-unit-leaderboard-btn,
body.dark-theme #tab-prog-leaderboard-btn,
body.dark-theme #dash-prog-tab-program,
body.dark-theme #dash-prog-tab-unit,
body.dark-theme #dash-prog-month-filter,
body.dark-theme .custom-month-dropdown-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    color: #f8fafc !important;
}

body.dark-theme #tab-unit-leaderboard-btn.active,
body.dark-theme #tab-prog-leaderboard-btn.active,
body.dark-theme #dash-prog-tab-program.active,
body.dark-theme #dash-prog-tab-unit.active {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Custom Month Dropdown Component (Clean, Single Border, Zero Browser Popup Glitches) */
.custom-month-dropdown-container {
    position: relative;
    width: 100%;
}

.custom-month-chevron {
    font-size: 0.72rem !important;
    color: #64748b !important;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-left: 6px !important;
    pointer-events: none !important;
}

body.dark-theme .custom-month-chevron {
    color: #94a3b8 !important;
}

.custom-month-dropdown-container.open .custom-month-chevron {
    transform: rotate(180deg) !important;
}

.custom-month-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: 0 !important;
    min-width: 140px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
    z-index: 1050 !important;
    max-height: 280px !important;
    overflow-y: auto !important;
    padding: 4px !important;
    display: none;
    outline: none !important;
    box-sizing: border-box !important;
}

.custom-month-dropdown-container.open .custom-month-dropdown-menu {
    display: block !important;
    animation: fadeInDropdown 0.15s ease-out !important;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.dark-theme .custom-month-dropdown-menu {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.45) !important;
}

.custom-month-option {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    text-transform: uppercase !important;
    font-family: var(--font-primary), 'Montserrat', sans-serif !important;
    user-select: none !important;
    border: none !important;
    margin: 1px 0 !important;
}

.custom-month-option:hover {
    background: #f1f5f9 !important;
    color: #059669 !important;
}

.custom-month-option.active {
    background: #10b981 !important;
    color: #ffffff !important;
}

.custom-month-option.active i {
    color: #ffffff !important;
}

body.dark-theme .custom-month-option {
    color: #f1f5f9 !important;
}

body.dark-theme .custom-month-option:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #34d399 !important;
}

body.dark-theme .custom-month-option.active {
    background: #10b981 !important;
    color: #ffffff !important;
}

.custom-month-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}
.custom-month-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}
.custom-month-dropdown-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
body.dark-theme .custom-month-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-control {
    flex-grow: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.slider-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--emerald-primary);
    cursor: pointer;
}

#prog-progress-val {
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 35px;
}

/* Circulars Styles */
.circulars-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.circular-card {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

body.dark-theme .circular-card {
    background: rgba(255, 255, 255, 0.02);
}

.circular-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--teal-primary);
}

.circular-card.urgent::before {
    background: var(--danger-red);
}

.circular-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.circular-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.circular-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-secondary);
}

.circular-body {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.circular-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

.circular-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-icon:hover {
    color: var(--teal-primary);
}

/* Dashboard dynamic list items */
.mini-circular-item {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    border-radius: 8px;
    border-left: 2px solid var(--teal-primary);
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.mini-circular-item h5 {
    font-weight: 700;
}

.mini-circular-item span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.mini-donation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.mini-donation-name {
    font-weight: 700;
}

.mini-donation-amount {
    font-weight: 800;
    color: var(--emerald-primary);
}

body.dark-theme .mini-circular-item,
body.dark-theme .mini-donation-item {
    background: rgba(255, 255, 255, 0.02);
}

/* Finance Ledger and Tables */
.finance-metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.metric-mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.mini-card-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-card-val {
    font-size: 1.35rem;
    font-weight: 800;
    margin-top: 4px;
    font-family: var(--font-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-red, .text-danger { color: #dc2626 !important; }
.text-rose { color: #e11d48 !important; }
.text-emerald { color: #059669 !important; }
.text-teal { color: #0d9488 !important; }
.text-cyan { color: #0891b2 !important; }
.text-sky { color: #0284c7 !important; }
.text-blue, .text-primary { color: #2563eb !important; }
.text-indigo { color: #4f46e5 !important; }
.text-violet, .text-purple { color: #7c3aed !important; }
.text-fuchsia { color: #c026d3 !important; }
.text-pink { color: #db2777 !important; }
.text-amber, .text-gold { color: #d97706 !important; }
.text-orange { color: #ea580c !important; }
.text-yellow { color: #ca8a04 !important; }
.text-green { color: #16a34a !important; }
.text-slate, .text-muted { color: #64748b !important; }

body.dark-theme .text-red, body.dark-theme .text-danger { color: #f87171 !important; }
body.dark-theme .text-rose { color: #fb7185 !important; }
body.dark-theme .text-emerald { color: #34d399 !important; }
body.dark-theme .text-teal { color: #2dd4bf !important; }
body.dark-theme .text-cyan { color: #22d3ee !important; }
body.dark-theme .text-sky { color: #38bdf8 !important; }
body.dark-theme .text-blue, body.dark-theme .text-primary { color: #60a5fa !important; }
body.dark-theme .text-indigo { color: #818cf8 !important; }
body.dark-theme .text-violet, body.dark-theme .text-purple { color: #a78bfa !important; }
body.dark-theme .text-fuchsia { color: #e879f9 !important; }
body.dark-theme .text-pink { color: #f472b6 !important; }
body.dark-theme .text-amber, body.dark-theme .text-gold { color: #fbbf24 !important; }
body.dark-theme .text-orange { color: #fb923c !important; }
body.dark-theme .text-yellow { color: #facc15 !important; }
body.dark-theme .text-green { color: #4ade80 !important; }

.table-responsive {
    overflow-x: auto;
    max-height: 280px;
}

.finance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
    border: 1px solid #cbd5e1;
}

body.dark-theme .finance-table {
    border-color: rgba(255, 255, 255, 0.15);
}

.finance-table th {
    padding: 8px 6px;
    font-size: 0.76rem;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.03);
    white-space: nowrap;
}

body.dark-theme .finance-table th {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.finance-table td {
    padding: 8px 6px;
    font-size: 0.8rem;
    border: 1px solid #cbd5e1;
}

body.dark-theme .finance-table td {
    border-color: rgba(255, 255, 255, 0.15);
}

.finance-table tbody tr:hover {
    background: rgba(16, 185, 129, 0.04);
}

.text-right { text-align: right; }
.text-center { text-align: center; }

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.status-paid { background: var(--emerald-light); color: var(--emerald-primary); }
.status-pending { background: var(--gold-light); color: var(--gold-primary); }

.unit-balances-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 4px;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
}

body.dark-theme .balance-row {
    background: rgba(255, 255, 255, 0.02);
}

.balance-unit-name {
    font-weight: 700;
}

.balance-unit-val {
    font-weight: 800;
    color: var(--gold-primary);
    font-family: var(--font-secondary);
}
.nav-actions-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-action-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    padding: 4px 7px;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-action-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

@media (max-width: 1366px) and (min-width: 993px) {
    .navbar-top {
        padding: 0.4rem 0.85rem;
    }
    .navbar-container {
        gap: 6px;
    }
    .nav-menu-horizontal {
        gap: 2px;
        row-gap: 4px;
    }
    .nav-menu-horizontal .nav-link {
        padding: 3px 5px;
        font-size: 0.74rem;
        gap: 3px;
    }
    .nav-menu-horizontal .nav-link i {
        font-size: 0.85rem;
    }
    .typewriter-logo-img img {
        height: 30px !important;
        max-width: 165px !important;
    }
    .nav-action-item {
        padding: 3px 5px;
        font-size: 0.85rem;
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    :root {
        --glass-blur: none !important;
    }

    * {
        -webkit-tap-highlight-color: transparent;
    }

    /* Disable GPU-heavy blur shaders across mobile cards to eliminate stutter and frame drops */
    .glass-card, 
    .stat-card, 
    .portal-panel, 
    .agenda-card, 
    .action-meeting-card, 
    .membership-target-card, 
    .welcome-banner-card, 
    .unit-ranking-panel, 
    .meeting-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .split-view {
        grid-template-columns: 1fr;
    }
    
    .grid-2col {
        grid-template-columns: 1fr;
    }

    /* Ensure Top Navbar Stacks Above Backdrop on Mobile */
    .navbar-top {
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
    }

    /* Mobile Hamburger Button in Top Bar */
    .menu-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.18);
        border: 1.5px solid rgba(255, 255, 255, 0.32);
        color: #ffffff;
        cursor: pointer;
        font-size: 1.2rem;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }
    
    .menu-toggle-btn:hover,
    .menu-toggle-btn:active {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.04);
    }

    /* Backdrop Overlay for Mobile Drawer - Ultra-smooth Hardware Accelerated */
    .mobile-nav-backdrop {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: rgba(15, 23, 42, 0.55) !important;
        backdrop-filter: blur(5px) !important;
        -webkit-backdrop-filter: blur(5px) !important;
        z-index: 9998 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        will-change: opacity;
        transition: opacity 0.3s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.3s !important;
    }

    .mobile-nav-backdrop.active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s !important;
    }

    /* Off-Canvas Sliding Navigation Drawer - Pure 60fps/120fps GPU Acceleration */
    .nav-menu-horizontal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 86% !important;
        max-width: 335px !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: #ffffff !important;
        z-index: 10000 !important;
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 24px 24px 0 !important;
        box-shadow: none !important;
        transform: translate3d(-100%, 0, 0) !important;
        -webkit-transform: translate3d(-100%, 0, 0) !important;
        will-change: transform;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        visibility: hidden !important;
        transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 0.32s ease, visibility 0s linear 0.32s !important;
        overflow: hidden !important;
    }

    .nav-menu-horizontal.active {
        transform: translate3d(0, 0, 0) !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
        visibility: visible !important;
        box-shadow: 14px 0 44px rgba(15, 23, 42, 0.22) !important;
        transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.36s ease, visibility 0s linear 0s !important;
    }

    /* Mobile Drawer Header */
    .mobile-drawer-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 20px !important;
        padding: 1.15rem 1.25rem 0.95rem 1.25rem !important;
        background: #ffffff;
        border-bottom: 1px solid #f1f5f9;
        flex-shrink: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .mobile-drawer-title {
        font-size: 1.05rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.5px !important;
        color: #0f172a !important;
        font-family: 'Outfit', sans-serif !important;
        text-transform: uppercase !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex: 1 1 auto !important;
        margin-right: 14px !important;
    }

    .mobile-drawer-close {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        border-radius: 50% !important;
        border: 1px solid #e2e8f0 !important;
        background: #f8fafc !important;
        color: #475569 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.1rem !important;
        cursor: pointer !important;
        transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }

    .mobile-drawer-close:hover,
    .mobile-drawer-close:active {
        background: #fee2e2 !important;
        color: #ef4444 !important;
        border-color: #fca5a5 !important;
        transform: rotate(90deg) scale(1.06) !important;
    }

    /* Drawer Scrollable Body */
    .mobile-drawer-body {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        touch-action: pan-y !important;
        scroll-behavior: smooth !important;
        padding: 0.65rem 0.85rem 2.5rem 0.85rem !important;
        gap: 6px !important;
        scrollbar-width: thin;
        scrollbar-color: rgba(203, 213, 225, 0.6) transparent;
    }

    .mobile-drawer-body::-webkit-scrollbar {
        width: 4px;
    }
    .mobile-drawer-body::-webkit-scrollbar-track {
        background: transparent;
    }
    .mobile-drawer-body::-webkit-scrollbar-thumb {
        background: rgba(203, 213, 225, 0.6);
        border-radius: 10px;
        transition: background 0.2s ease;
    }
    .mobile-drawer-body::-webkit-scrollbar-thumb:hover {
        background: rgba(148, 163, 184, 0.85);
    }

    /* Drawer Links (Matches Clean Modern Mobile UI) */
    .nav-menu-horizontal .nav-link:not(.admin-only) {
        display: flex !important;
        align-items: center !important;
        gap: 13px !important;
        padding: 7px 11px !important;
        border-radius: 14px !important;
        background: transparent !important;
        color: #1e293b !important;
        text-decoration: none !important;
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        box-shadow: none !important;
        transition: all 0.18s ease !important;
        width: 100% !important;
        border: 1px solid transparent;
    }

    body.admin-mode-active .nav-menu-horizontal .nav-link.admin-only {
        display: flex !important;
        align-items: center !important;
        gap: 13px !important;
        padding: 7px 11px !important;
        border-radius: 14px !important;
        background: transparent !important;
        color: #1e293b !important;
        text-decoration: none !important;
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        box-shadow: none !important;
        transition: all 0.18s ease !important;
        width: 100% !important;
        border: 1px solid transparent;
    }

    .nav-menu-horizontal .nav-link:hover {
        background: #f8fafc !important;
        color: #0f172a !important;
    }

    /* Rounded Square Icon Box */
    .nav-icon-box {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        border-radius: 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #f1f5f9 !important;
        color: #475569 !important;
        font-size: 1.1rem !important;
        transition: all 0.18s ease !important;
        flex-shrink: 0 !important;
    }

    .nav-icon-box .ssf-nav-svg {
        width: 22px !important;
        height: 22px !important;
        stroke: currentColor !important;
        stroke-width: 2 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
        display: block !important;
    }

    .nav-icon-box .izza-nav-icon {
        width: 22px !important;
        height: 22px !important;
        max-width: 22px !important;
        max-height: 22px !important;
        object-fit: contain;
        filter: brightness(0) saturate(100%) invert(32%) sepia(98%) saturate(2152%) hue-rotate(211deg) brightness(97%) contrast(92%) !important;
    }

    /* Vibrant Unique Colors for Drawer Icons */
    .nav-menu-horizontal .nav-link[data-tab="dashboard"] .nav-icon-box { background: #ecfdf5 !important; color: #059669 !important; }
    .nav-menu-horizontal .nav-link[data-tab="secretariat"] .nav-icon-box { background: #eff6ff !important; color: #2563eb !important; }
    .nav-menu-horizontal .nav-link[data-tab="executive"] .nav-icon-box { background: #f5f3ff !important; color: #7c3aed !important; }
    .nav-menu-horizontal .nav-link[data-tab="meeting"] .nav-icon-box { background: #fdf2f8 !important; color: #db2777 !important; }
    .nav-menu-horizontal .nav-link[data-tab="program"] .nav-icon-box { background: #fffbeb !important; color: #d97706 !important; }
    .nav-menu-horizontal .nav-link[data-tab="membership"] .nav-icon-box { background: #ecfeff !important; color: #0891b2 !important; }
    .nav-menu-horizontal .nav-link[data-tab="circular"] .nav-icon-box { background: #f0fdfa !important; color: #0d9488 !important; }
    .nav-menu-horizontal .nav-link[data-tab="finance"] .nav-icon-box { background: #fefce8 !important; color: #ca8a04 !important; }
    .nav-menu-horizontal .nav-link[data-tab="office-bearers"] .nav-icon-box { background: #eef2ff !important; color: #4f46e5 !important; }
    .nav-menu-horizontal .nav-link[data-tab="izza-code"] .nav-icon-box { background: #eff6ff !important; color: #2563eb !important; }
    .nav-menu-horizontal .nav-link[data-tab="credentials"] .nav-icon-box { background: #fff7ed !important; color: #ea580c !important; }
    .nav-action-item#theme-toggle .nav-icon-box { background: #f1f5f9 !important; color: #475569 !important; }
    .nav-action-item#admin-console-btn .nav-icon-box { background: #f0f9ff !important; color: #0284c7 !important; }

    /* Active Link in Mobile Drawer: Crisp Pale Mint/Sage Theme */
    .nav-menu-horizontal .nav-link.active {
        background: #f0fdf4 !important;
        color: #15803d !important;
        font-weight: 700 !important;
        box-shadow: 0 2px 8px rgba(21, 128, 61, 0.12) !important;
        border: 1px solid rgba(21, 128, 61, 0.22) !important;
    }

    .nav-menu-horizontal .nav-link.active .nav-icon-box {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    }

    .nav-link-text {
        flex: 1;
        font-size: 0.94rem;
        letter-spacing: -0.01em;
        color: inherit;
    }

    /* Drawer Actions Section (Only Display Icons) */
    .nav-actions-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 16px !important;
        width: 100% !important;
        margin: 10px 0 0 0 !important;
        padding-top: 14px !important;
        border-top: 1px solid #f1f5f9 !important;
    }

    .nav-action-item {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        border-radius: 14px !important;
        background: transparent !important;
        width: auto !important;
        text-decoration: none !important;
        border: none !important;
        box-shadow: none !important;
        cursor: pointer !important;
    }

    .nav-action-item:hover,
    .nav-action-item:active {
        background: transparent !important;
    }

    .action-label,
    .nav-action-item .action-label {
        display: none !important;
    }

    .nav-action-item .nav-icon-box {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        border-radius: 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.2rem !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .nav-action-item:hover .nav-icon-box,
    .nav-action-item:active .nav-icon-box {
        transform: translateY(-2px) scale(1.06) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }

    /* Logout Action - Pure Icon */
    .nav-logout-item {
        background: transparent !important;
        border: none !important;
        margin-top: 0 !important;
        padding: 0 !important;
    }

    .nav-logout-item .logout-icon-box {
        background: #fff1f2 !important;
        color: #e11d48 !important;
        border: 1px solid #fecdd3 !important;
    }

    .nav-logout-item:hover .logout-icon-box,
    .nav-logout-item:active .logout-icon-box {
        background: #ffe4e6 !important;
        border-color: #fda4af !important;
    }

    /* Drawer Footer */
    .mobile-drawer-footer {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0.85rem 1rem;
        border-top: 1px solid #f1f5f9;
        font-size: 0.78rem;
        font-weight: 600;
        color: #94a3b8;
        letter-spacing: 0.3px;
        background: transparent;
        flex-shrink: 0;
    }

    /* Dark Mode Overrides for Drawer */
    body.dark-theme .mobile-nav-backdrop {
        background: rgba(2, 6, 23, 0.75) !important;
    }

    body.dark-theme .nav-menu-horizontal {
        background: #0f172a !important;
        box-shadow: 16px 0 50px rgba(0, 0, 0, 0.6) !important;
    }

    body.dark-theme .mobile-drawer-header {
        background: #0f172a !important;
        border-bottom-color: #1e293b !important;
    }

    body.dark-theme .mobile-drawer-title {
        color: #f8fafc !important;
    }

    body.dark-theme .mobile-drawer-close {
        background: #1e293b !important;
        border-color: #334155 !important;
        color: #94a3b8 !important;
    }

    body.dark-theme .mobile-drawer-close:hover,
    body.dark-theme .mobile-drawer-close:active {
        background: rgba(239, 68, 68, 0.2) !important;
        color: #f87171 !important;
        border-color: rgba(239, 68, 68, 0.4) !important;
        transform: rotate(90deg) scale(1.06) !important;
    }

    body.dark-theme .mobile-drawer-body {
        scrollbar-color: rgba(51, 65, 85, 0.7) transparent;
    }

    body.dark-theme .mobile-drawer-body::-webkit-scrollbar-thumb {
        background: rgba(51, 65, 85, 0.7);
    }
    body.dark-theme .mobile-drawer-body::-webkit-scrollbar-thumb:hover {
        background: rgba(71, 85, 105, 0.9);
    }

    body.dark-theme .nav-menu-horizontal .nav-link,
    body.dark-theme .nav-action-item {
        color: #cbd5e1 !important;
    }

    body.dark-theme .nav-menu-horizontal .nav-link:hover,
    body.dark-theme .nav-action-item:hover {
        background: rgba(255, 255, 255, 0.06) !important;
        color: #ffffff !important;
    }

    body.dark-theme .nav-menu-horizontal .nav-link[data-tab="dashboard"] .nav-icon-box { background: rgba(16, 185, 129, 0.18) !important; color: #34d399 !important; }
    body.dark-theme .nav-menu-horizontal .nav-link[data-tab="secretariat"] .nav-icon-box { background: rgba(37, 99, 235, 0.18) !important; color: #60a5fa !important; }
    body.dark-theme .nav-menu-horizontal .nav-link[data-tab="executive"] .nav-icon-box { background: rgba(124, 58, 237, 0.18) !important; color: #a78bfa !important; }
    body.dark-theme .nav-menu-horizontal .nav-link[data-tab="meeting"] .nav-icon-box { background: rgba(219, 39, 119, 0.18) !important; color: #f472b6 !important; }
    body.dark-theme .nav-menu-horizontal .nav-link[data-tab="program"] .nav-icon-box { background: rgba(217, 119, 6, 0.18) !important; color: #fbbf24 !important; }
    body.dark-theme .nav-menu-horizontal .nav-link[data-tab="membership"] .nav-icon-box { background: rgba(8, 145, 178, 0.18) !important; color: #22d3ee !important; }
    body.dark-theme .nav-menu-horizontal .nav-link[data-tab="circular"] .nav-icon-box { background: rgba(13, 148, 136, 0.18) !important; color: #2dd4bf !important; }
    body.dark-theme .nav-menu-horizontal .nav-link[data-tab="finance"] .nav-icon-box { background: rgba(202, 138, 4, 0.18) !important; color: #facc15 !important; }
    body.dark-theme .nav-menu-horizontal .nav-link[data-tab="office-bearers"] .nav-icon-box { background: rgba(79, 70, 229, 0.18) !important; color: #818cf8 !important; }
    body.dark-theme .nav-menu-horizontal .nav-link[data-tab="izza-code"] .nav-icon-box { background: rgba(37, 99, 235, 0.18) !important; color: #60a5fa !important; }
    body.dark-theme .izza-nav-icon,
    body.dark-theme .nav-icon-box .izza-nav-icon {
        filter: brightness(0) saturate(100%) invert(67%) sepia(42%) saturate(1200%) hue-rotate(185deg) brightness(102%) contrast(98%) !important;
    }
    body.dark-theme .nav-menu-horizontal .nav-link[data-tab="credentials"] .nav-icon-box { background: rgba(234, 88, 12, 0.18) !important; color: #fb923c !important; }
    body.dark-theme .nav-action-item#theme-toggle .nav-icon-box { background: #1e293b !important; color: #94a3b8 !important; }
    body.dark-theme .nav-action-item#admin-console-btn .nav-icon-box { background: rgba(2, 132, 199, 0.2) !important; color: #38bdf8 !important; }

    body.dark-theme .nav-menu-horizontal .nav-link.active {
        background: rgba(16, 185, 129, 0.16) !important;
        border-color: rgba(16, 185, 129, 0.35) !important;
        color: #6ee7b7 !important;
    }

    body.dark-theme .nav-actions-row {
        border-top-color: #1e293b !important;
    }

    body.dark-theme .nav-logout-item {
        background: transparent !important;
        border: none !important;
    }

    body.dark-theme .nav-logout-item .logout-icon-box {
        background: rgba(225, 29, 72, 0.15) !important;
        border: 1px solid rgba(225, 29, 72, 0.3) !important;
        color: #fb7185 !important;
    }

    body.dark-theme .nav-logout-item:hover .logout-icon-box,
    body.dark-theme .nav-logout-item:active .logout-icon-box {
        background: rgba(225, 29, 72, 0.25) !important;
        border-color: rgba(225, 29, 72, 0.5) !important;
    }

    body.dark-theme .mobile-drawer-footer {
        border-top-color: #1e293b !important;
        color: #64748b !important;
    }
}

body.mobile-drawer-open {
    overflow: hidden !important;
    touch-action: none;
    overscroll-behavior: contain;
}

@media (max-width: 768px) {
    .navbar-top {
        padding: 0.8rem 1.2rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
}

.flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.flex-col { flex-direction: column; }
.align-start { align-items: flex-start; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

/* Collection Analytics Custom Chart Styling */
.analytics-card-header {
    margin-bottom: 1rem;
}

.analytics-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.analytics-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-secondary);
    margin-top: 4px;
}

.analytics-sub-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.analytics-sub-tab-btn {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 700;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.analytics-sub-tab-btn:hover {
    color: var(--emerald-primary);
}

.analytics-sub-tab-btn.active {
    background: #fef2f2;
    color: #b91c1c;
}

body.dark-theme .analytics-sub-tab-btn.active {
    background: rgba(185, 28, 28, 0.2);
    color: #fca5a5;
}

/* Admin Mode Visibility Control */
.admin-only,
.nav-menu-horizontal .nav-link.admin-only,
.nav-menu-horizontal .admin-only,
body:not(.admin-mode-active) .admin-only,
body:not(.admin-mode-active) .nav-menu-horizontal .nav-link.admin-only,
body:not(.admin-mode-active) .nav-menu-horizontal .admin-only,
body:not(.admin-mode-active) a.admin-only {
    display: none !important;
}

body.admin-mode-active .admin-only:not(.tab-pane):not(td):not(th) {
    display: block !important;
}

body.admin-mode-active .tab-pane.admin-only.active {
    display: block !important;
}

body.admin-mode-active td.admin-only,
body.admin-mode-active th.admin-only {
    display: table-cell !important;
}

body.admin-mode-active .admin-only.flex-container {
    display: flex !important;
}

body.admin-mode-active button.admin-only {
    display: inline-flex !important;
}
body.admin-mode-active a.admin-only.nav-link,
body.admin-mode-active .nav-menu-horizontal .nav-link.admin-only,
body.admin-mode-active .nav-menu-horizontal a.nav-link.admin-only {
    display: flex !important;
}
/* Admin Console Navbar Button Styles */
#admin-console-btn {
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#admin-console-btn:hover, body.admin-mode-active #admin-console-btn {
    background: #fbbf24 !important;
    color: #595c23 !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.45);
}

/* Website Notification Popup / Capsule Toast */
.app-toast-container {
    position: fixed;
    bottom: 30px;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    max-width: min(520px, calc(100vw - 32px));
    width: max-content;
    box-sizing: border-box;
    padding: 0 8px;
}

.app-toast {
    pointer-events: auto;
    background: #383d44 !important;
    background-color: #383d44 !important;
    color: #ffffff !important;
    padding: 9px 20px;
    border-radius: 26px !important;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    text-shadow: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
    opacity: 0;
    transform: translateY(14px) scale(0.95);
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: min(520px, calc(100vw - 32px));
    box-sizing: border-box;
    user-select: none;
    cursor: pointer;
    line-height: 1.4;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.app-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.app-toast.hide {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
}

.app-toast.app-toast-error {
    background: #452424 !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.app-toast.app-toast-warning {
    background: #42321e !important;
    color: #fde68a !important;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.app-toast.app-toast-info {
    background: #1e3345 !important;
    color: #bae6fd !important;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.toast {
    display: none !important;
    visibility: hidden !important;
}

/* Program Leaderboard Styles */
.program-leaderboard-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
}

body.dark-theme .program-leaderboard-card {
    background: rgba(0, 0, 0, 0.2);
}

.mini-unit-status-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-right: 4px;
}

.mini-unit-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.mini-unit-status-item .unit-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-unit-status-item .unit-status-icon {
    font-size: 0.95rem;
}

/* ── Square Tables & Containers ── */
table,
.data-table,
.data-table-report,
.finance-table,
.table-container,
.table-responsive,
.data-table-container,
.units-table-wrapper,
.agenda-table-wrapper,
.data-table th,
.data-table td,
.data-table-report th,
.data-table-report td,
.finance-table th,
.finance-table td,
table th,
table td,
thead,
tbody,
tr {
    border-radius: 0 !important;
}

/* ── Universal Center Alignment for Table Headings ── */
table th,
table thead th,
.data-table th,
.data-table-report th,
.finance-table th,
.agenda-table th,
.receipts-table th,
.table th,
thead th,
th {
    text-align: center !important;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 0 !important;
}

body.dark-theme .data-table {
    border-color: rgba(255, 255, 255, 0.15);
}

.data-table th {
    padding: 12px 16px;
    text-align: center !important;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    white-space: nowrap;
    border: 1px solid #cbd5e1;
    background: rgba(0, 0, 0, 0.03);
}

body.dark-theme .data-table th {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.data-table td {
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    color: var(--text-primary);
    vertical-align: middle;
    font-family: var(--font-primary);
}

body.dark-theme .data-table td {
    border-color: rgba(255, 255, 255, 0.15);
}

.data-table tbody tr:hover {
    background: rgba(0, 93, 83, 0.04);
    transition: background 0.15s ease;
}

/* --- Portal Footer --- */
.portal-footer {
    width: 100%;
    margin-top: auto;
    padding: 1.5rem 2.5rem;
    background: linear-gradient(135deg, #626629, #595c23);
    border-top: 2px solid #45481b;
    text-align: center;
    transition: background 0.3s, border-color 0.3s;
}

body.dark-theme .portal-footer {
    background: linear-gradient(135deg, #022c22, #041d18);
    border-top: 2px solid #021a15;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.footer-copyright {
    font-size: 0.88rem;
    color: #ffffff;
    margin: 0;
}

.footer-tagline {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    font-style: italic;
    margin: 0;
    letter-spacing: 0.05em;
}

.footer-developer {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    margin-top: 4px;
}

.developer-highlight {
    color: #34d399;
    font-weight: 700;
}

.footer-logo {
    max-height: 48px;
    width: auto;
    object-fit: contain;
    margin-bottom: 12px;
    display: inline-block;
}

.footer-social-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    justify-content: center;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: #34d399;
    color: #34d399;
}

/* --- Interactive Micro-Animations & Hover Effects --- */

/* 1. Navbar Brand Logo Smooth & Slow Infinite Loop Typing Animation (No cursor bar) */
.typewriter-logo-img {
    overflow: hidden;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    width: 0;
    max-width: 190px;
    vertical-align: middle;
    border-right: none !important;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    animation: typewrite-smooth-loop 6.5s cubic-bezier(0.25, 1, 0.4, 1) infinite;
}

.typewriter-logo-img:hover {
    transform: scale(1.04);
    filter: brightness(1.1) drop-shadow(0 4px 12px rgba(255, 255, 255, 0.25));
}

@keyframes typewrite-smooth-loop {
    0%, 3% {
        width: 0;
        opacity: 0.6;
    }
    45%, 82% {
        width: 190px;
        opacity: 1;
    }
    94%, 100% {
        width: 0;
        opacity: 0.6;
    }
}

@media (max-width: 480px) {
    .typewriter-logo-img {
        max-width: 165px;
        animation: typewrite-smooth-loop-mobile 6.5s cubic-bezier(0.25, 1, 0.4, 1) infinite;
    }
}

@keyframes typewrite-smooth-loop-mobile {
    0%, 3% {
        width: 0;
        opacity: 0.6;
    }
    45%, 82% {
        width: 165px;
        opacity: 1;
    }
    94%, 100% {
        width: 0;
        opacity: 0.6;
    }
}

/* 2. Navigation Link Icon Bounce */
@keyframes navIconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.nav-menu-horizontal .nav-link:hover i {
    animation: navIconBounce 0.45s ease infinite;
}

/* 3. Card Floating Elevation hover effects */
.glass-card, .stat-card {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

/* Smartphone Responsiveness Enhancements */
@media (max-width: 576px) {
    .app-toast-container {
        bottom: 20px !important;
        max-width: calc(100vw - 24px) !important;
        width: auto !important;
        padding: 0 !important;
    }

    .app-toast {
        padding: 9px 18px !important;
        font-size: 0.78rem !important;
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        max-width: calc(100vw - 24px) !important;
        border-radius: 24px !important;
        line-height: 1.38 !important;
        letter-spacing: 0.1px !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    .main-content {
        padding: 0.8rem !important;
    }
    
    .glass-card {
        padding: 1rem !important;
    }

    .finance-metrics-row {
        gap: 8px !important;
        margin-bottom: 1rem !important;
    }
    
    .metric-mini-card {
        padding: 10px 8px !important;
        border-radius: 10px !important;
    }

    .mini-card-label {
        font-size: 0.64rem !important;
        letter-spacing: 0.2px !important;
    }

    .mini-card-val {
        font-size: 1.05rem !important;
        margin-top: 2px !important;
    }
    
    .stats-grid {
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .dashboard-details-grid {
        gap: 1rem !important;
    }
    
    .flex-1, .flex-2 {
        min-width: 100% !important;
        width: 100% !important;
        flex: 1 1 100% !important;
    }
    
    /* Center text inside stats card and adjust details */
    .stat-card {
        padding: 1rem !important;
    }
    
    /* Make detail panel card header stack cleaner */
    .panel-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    /* Attendance card header: title on left, members badge & action buttons firmly on RIGHT */
    .attendance-header-top-row {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        gap: 8px !important;
    }

    /* Prevent card title from squishing the action buttons, allow clean 2-line wrap */
    .attendance-header-top-row h3.card-title,
    .panel-header h3.card-title {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        white-space: normal !important;
        font-size: 0.88rem !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
    }

    /* Keep buttons and badge container pinned to the right on all screens */
    .attendance-actions-wrap {
        flex-shrink: 0 !important;
        margin-left: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        text-align: right !important;
        gap: 4px !important;
        overflow: visible !important;
    }

    .attendance-actions-wrap .badge,
    .panel-header > div:last-child .badge {
        align-self: flex-end !important;
        font-size: 0.70rem !important;
        padding: 3px 8px !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }

    .attendance-actions-wrap > div,
    .attendance-actions-wrap .header-action-group,
    .header-action-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
    }

    /* Action cards and manual adjustment spacing */
    .adjustment-inputs {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    .brand-logo img {
        width: 175px !important;
        height: 32px !important;
    }
    
    /* Smooth out table headers and text size */
    .data-table th, .data-table td {
        padding: 10px 8px !important;
        font-size: 0.8rem !important;
    }
    
    /* Adjust chart height slightly on very small phones to prevent layout push */
    .chart-container {
        height: 260px !important;
    }

    /* Fix: glass-card has overflow:hidden which clips the share button on narrow phones */
    .attendance-interactive-split > .list-panel.glass-card {
        overflow: visible !important;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Leaderboard Controls: Flexbox Mobile-First
   - Smartphone & Mobile (<= 992px): Line 1 = Unit & Program (50% each), Line 2 = Month Filter (100% full width)
   - Desktop (> 992px): All 3 controls on 1 single line
*/
.leaderboard-tabs-wrapper {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px 6px !important;
    margin-top: 6px !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding-bottom: 12px !important;
    box-sizing: border-box !important;
}

#tab-unit-leaderboard-btn,
#tab-prog-leaderboard-btn {
    flex: 1 1 calc(50% - 3px) !important;
    width: calc(50% - 3px) !important;
    max-width: calc(50% - 3px) !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.leaderboard-tabs-wrapper > .custom-month-dropdown-container,
#unit-leaderboard-month-container {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: 36px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.tab-label-short {
    display: none !important;
}
.tab-label-full {
    display: inline !important;
}

.leaderboard-tabs-wrapper > button,
.leaderboard-tabs-wrapper > select,
.leaderboard-tabs-wrapper .custom-month-dropdown-btn,
#tab-unit-leaderboard-btn,
#tab-prog-leaderboard-btn,
#unit-leaderboard-month-btn {
    font-family: var(--font-primary), 'Montserrat', sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    padding: 0 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
}

.custom-month-dropdown-btn,
#unit-leaderboard-month-btn {
    width: 100% !important;
    justify-content: center !important;
    gap: 8px !important;
}

#unit-leaderboard-month-label {
    font-family: var(--font-primary), 'Montserrat', sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: normal !important;
}

/* Desktop & Large Screens (> 992px): All 3 on ONE single line */
@media (min-width: 993px) {
    .leaderboard-tabs-wrapper {
        flex-wrap: nowrap !important;
        gap: 6px !important;
    }
    #tab-unit-leaderboard-btn,
    #tab-prog-leaderboard-btn,
    .leaderboard-tabs-wrapper > .custom-month-dropdown-container,
    #unit-leaderboard-month-container {
        flex: 1 1 0 !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
    }
}

@media (max-width: 360px) {
    .tab-label-full {
        display: none !important;
    }
    .tab-label-short {
        display: inline !important;
    }
}

/* Dashboard Program & Unit Performance Scroll Tabs: Consistent 6px spacing */
.scroll-tabs-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.scroll-tabs-wrapper > div {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.scroll-tabs-wrapper button,
.scroll-tabs-wrapper select {
    margin: 0 !important;
}

/* ==========================================
   NEW PORTAL LOGIN DESIGN (V2 ULTRA-PREMIUM)
   ========================================== */
#portal-login-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 10% 20%, #041e18 0%, #020a08 90%);
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
    padding: 20px;
}

/* Ambient glow points in background */
.glow-spot-1 {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(217, 145, 22, 0.08) 0%, rgba(217, 145, 22, 0) 70%);
    top: -200px;
    left: -200px;
    pointer-events: none;
}

.glow-spot-2 {
    position: absolute;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(0, 233, 106, 0.06) 0%, rgba(0, 233, 106, 0) 70%);
    bottom: -200px;
    right: -200px;
    pointer-events: none;
}

/* Card layout */
.login-card-v2 {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1.5px solid rgba(217, 145, 22, 0.15);
    border-radius: 24px;
    padding: 40px 35px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    text-align: center;
    z-index: 10;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-card-v2:hover {
    border-color: rgba(217, 145, 22, 0.25);
    box-shadow: 0 30px 70px rgba(217, 145, 22, 0.05);
}

/* Logo and text */
.logo-outer-glow {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(217, 145, 22, 0.05);
    border: 1px solid rgba(217, 145, 22, 0.25);
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(217, 145, 22, 0.1);
    transition: all 0.3s ease;
}

.logo-outer-glow:hover {
    transform: scale(1.05);
    border-color: rgba(217, 145, 22, 0.4);
    box-shadow: 0 0 35px rgba(217, 145, 22, 0.2);
}

.logo-outer-glow img {
    height: 48px;
    width: 48px;
    object-fit: contain;
    display: block;
}

.login-title-v2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.login-subtitle-v2 {
    font-size: 0.88rem;
    color: #94a3b8;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

/* Input Fields styling */
.login-form-v2 {
    display: flex;
    flex-direction: column;
    gap: 22px;
    text-align: left;
}

.input-group-v2 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label-v2 {
    font-size: 0.82rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.input-wrapper-v2 {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-v2 {
    position: absolute;
    left: 18px;
    color: rgba(0, 0, 0, 0.4);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.field-v2 {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 13px 45px 13px 48px;
    color: #000000;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    outline: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.field-v2::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

.field-v2:focus {
    border-color: #d99116;
    background: #ffffff;
    box-shadow: 0 0 15px rgba(217, 145, 22, 0.15);
}

.field-v2:focus + .password-toggle-v2,
.field-v2:focus ~ .input-icon-v2 {
    color: #d99116;
}

.password-toggle-v2 {
    position: absolute;
    right: 18px;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.password-toggle-v2:hover {
    color: #000000 !important;
}

/* Submit Button & Error text */
.submit-btn-v2 {
    background: linear-gradient(135deg, #d99116 0%, #f59e0b 100%);
    border: none;
    border-radius: 12px;
    color: #703a04;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 14px 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(217, 145, 22, 0.2);
}

.submit-btn-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 145, 22, 0.3);
    filter: brightness(1.08);
}

.submit-btn-v2:active {
    transform: translateY(0);
}

.error-msg-v2 {
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 10px 14px;
    border-radius: 8px;
}

.login-footer-v2 {
    margin-top: 30px;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.5px;
}

/* Blinking Badge Style */
.badge-new-blink {
    background: red !important;
    color: white !important;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 4px;
    margin-left: 6px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    animation: badge-blink 1.2s infinite;
}

@keyframes badge-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}


.indicator-bullet.active {
    background: var(--emerald-primary) !important;
    width: 24px !important;
    border-radius: 5px !important;
}
.slider-control:hover {
    background: rgba(0, 0, 0, 0.7) !important;
    transform: translateY(-50%) scale(1.1) !important;
}

/* --- Pill Custom Copy & Share Buttons --- */
.btn-custom-share {
    background: #b45309 !important; /* Gold/Brown */
    color: #ffffff !important;
    border: none !important;
    border-radius: 9999px !important;
    padding: 8px 20px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: background 0.2s ease, transform 0.1s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}
.btn-custom-share:hover {
    background: #92400e !important;
    transform: translateY(-1px);
}
.btn-custom-share:active {
    transform: translateY(0);
}

.btn-custom-copy {
    background: #fff1f2 !important; /* Light rose/pink */
    color: #be123c !important;      /* Rose-700/red */
    border: 1px solid #fda4af !important; /* Rose-300 border */
    border-radius: 9999px !important;
    padding: 8px 20px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease, transform 0.1s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}
.btn-custom-copy:hover {
    background: #ffe4e6 !important; /* Slightly darker pink hover */
    border-color: #f43f5e !important; /* Rose-500 border on hover */
    color: #9f1239 !important;      /* Rose-800 on hover */
    transform: translateY(-1px);
}
.btn-custom-copy:active {
    transform: translateY(0);
}

/* Small Versions for Table Headers & Cards */
.btn-custom-share-sm {
    background: #b45309 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    height: 26px !important;
    width: 26px !important;
    min-width: 26px !important;
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 0.78rem !important;
    padding: 0 !important;
}
.btn-custom-share-sm:hover {
    background: #92400e !important;
    transform: translateY(-1px);
}
.btn-custom-share-sm:active {
    transform: translateY(0);
}

.btn-custom-days-sm {
    background: #e6f9f0 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
    border-radius: 6px !important;
    height: 26px !important;
    width: 26px !important;
    min-width: 26px !important;
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 0.78rem !important;
    padding: 0 !important;
}
.btn-custom-days-sm:hover {
    background: #d1fae5 !important;
    border-color: #6ee7b7 !important;
    color: #065f46 !important;
    transform: translateY(-1px);
}
.btn-custom-days-sm:active {
    transform: translateY(0);
}

.btn-custom-copy-sm {
    background: #fff1f2 !important;
    color: #be123c !important;
    border: 1px solid #fda4af !important;
    border-radius: 6px !important;
    height: 26px !important;
    width: 26px !important;
    min-width: 26px !important;
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 0.78rem !important;
    padding: 0 !important;
}
.btn-custom-copy-sm:hover {
    background: #ffe4e6 !important;
    border-color: #f43f5e !important;
    color: #9f1239 !important;
    transform: translateY(-1px);
}
.btn-custom-copy-sm:active {
    transform: translateY(0);
}

.btn-custom-pdf-sm {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fca5a5 !important;
    border-radius: 6px !important;
    height: 26px !important;
    width: 26px !important;
    min-width: 26px !important;
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 0.8rem !important;
    padding: 0 !important;
}
.btn-custom-pdf-sm:hover {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
    transform: translateY(-1px);
}
.btn-custom-pdf-sm:active {
    transform: translateY(0);
}

.btn-pdf-download {
    background: #ffffff;
    color: #dc2626;
    border: 1.5px solid #f87171;
    border-radius: 8px;
    width: 35px;
    height: 35px;
    min-width: 35px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.08);
    box-sizing: border-box;
    flex-shrink: 0;
}
.btn-pdf-download:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #b91c1c;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.18);
    transform: translateY(-1px);
}
.btn-pdf-download:active {
    transform: translateY(0);
}
.btn-pdf-download i {
    font-size: 1.15rem;
    color: #dc2626;
    line-height: 1;
}

/* --- Attendance Report Grid Table --- */
.data-table-report {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.data-table-report th, 
.data-table-report td {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    vertical-align: middle;
}
.data-table-report th {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}
.data-table-report td.text-center,
.data-table-report th.text-center {
    text-align: center;
}
.data-table-report td.text-left,
.data-table-report th.text-left {
    text-align: left;
}

/* ==========================================================================
   SMARTPHONE USER FRIENDLY (MOBILE OPTIMIZATIONS <= 768px & <= 480px)
   ========================================================================== */
@media (max-width: 768px) {
    .app-container {
        overflow-x: hidden;
    }
    
    .main-content {
        padding: 1rem 0.65rem !important;
    }

    .glass-card {
        padding: 1.1rem 0.85rem !important;
        border-radius: 16px !important;
        margin-bottom: 1rem !important;
    }

    /* Top Navbar on Smartphone */
    .navbar-top {
        padding: 0.6rem 1rem !important;
    }

    .typewriter-logo-img img {
        height: 34px !important;
        width: 190px !important;
    }

    /* Stats Grid on Mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    /* Dashboard grids on Smartphone */
    .dashboard-details-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 1rem !important;
    }

    .dashboard-details-grid > * {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Split views & Card containment on Mobile */
    .split-view, .grid-2col {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .glass-card,
    .flex-column,
    .detail-content,
    .scrollable-list,
    .programs-grid-wrapper,
    #program-details-card,
    #sector-program-detail-view,
    #unit-detail-content {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Modals & Dialogs on Mobile */
    #edit-program-modal,
    .modal-backdrop,
    .modal {
        box-sizing: border-box !important;
        padding: 12px !important;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    #edit-program-modal > div,
    .modal-backdrop > div,
    .modal-card {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 520px !important;
        margin: auto !important;
        padding: 20px 14px !important;
        overflow-x: hidden !important;
    }

    #edit-prog-targets-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    @media (max-width: 480px) {
        #edit-prog-targets-grid {
            grid-template-columns: 1fr !important;
            gap: 7px !important;
            padding: 8px !important;
        }
    }

    /* Tables on Smartphone */
    .table-container, .table-responsive, .data-table-container {
        overflow-x: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 0 !important;
        margin: 0;
        box-sizing: border-box !important;
    }

    .data-table {
        min-width: 420px !important;
        width: 100% !important;
    }

    .data-table th,
    .data-table td,
    .data-table-report th, 
    .data-table-report td {
        padding: 8px 6px !important;
        font-size: 0.78rem !important;
    }

    /* Action buttons touch optimization */
    .leaderboard-actions {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .btn-custom-copy, .btn-custom-share {
        min-height: 42px !important;
        font-size: 0.85rem !important;
        padding: 8px 10px !important;
        min-width: 0 !important;
    }

    /* Modals Smartphone Experience */
    .modal-overlay > div {
        width: 95vw !important;
        max-height: 90vh !important;
        padding: 1.25rem 1rem !important;
        border-radius: 20px !important;
    }

    /* Gallery Slider on Mobile */
    #dash-slider-card {
        padding: 1rem !important;
    }

    .slider-container {
        max-height: 400px !important;
        border-radius: 12px !important;
    }

    .slider-control {
        width: 36px !important;
        height: 36px !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .typewriter-logo-img img {
        height: 30px !important;
        width: 170px !important;
    }
}

/* Modern Action Icon Buttons */
.action-btn-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    outline: none;
    box-sizing: border-box;
}

.action-btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn-icon:active {
    transform: translateY(0);
}

/* WhatsApp Icon Button */
.action-btn-wa {
    background: rgba(37, 211, 102, 0.12);
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.35);
}
.action-btn-wa:hover {
    background: #25D366;
    color: #ffffff;
    border-color: #25D366;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

/* Call/Phone Icon Button */
.action-btn-call {
    background: rgba(161, 98, 7, 0.12);
    color: #a16207;
    border-color: rgba(161, 98, 7, 0.35);
}
.action-btn-call:hover {
    background: #a16207;
    color: #ffffff;
    border-color: #a16207;
    box-shadow: 0 4px 14px rgba(161, 98, 7, 0.35);
}

/* Edit Icon Button */
.action-btn-edit {
    background: rgba(202, 138, 4, 0.12);
    color: #ca8a04;
    border-color: rgba(202, 138, 4, 0.35);
}
.action-btn-edit:hover {
    background: #ca8a04;
    color: #ffffff;
    border-color: #ca8a04;
    box-shadow: 0 4px 14px rgba(202, 138, 4, 0.35);
}

/* Delete Icon Button */
.action-btn-delete {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.35);
}
.action-btn-delete:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

/* Responsive Izza Code Filter Controls for Mobile */
.izza-filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.izza-search-input {
    width: 220px;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.izza-unit-select {
    width: 170px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 576px) {
    .izza-filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        margin-top: 10px;
    }

    .izza-search-input,
    .izza-unit-select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .izza-filter-bar .btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Mobile Smartphone Global Responsiveness Optimizations */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
}

@media (max-width: 576px) {
    /* Prevent Safari & Chrome mobile input auto-zoom */
    input.form-control, 
    select.form-control, 
    textarea.form-control {
        font-size: 16px !important;
    }

    /* Mobile Smartphone optimizations for Spiritual Card & Sub-Cards */
    .spiritual-subcard {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 10px 14px !important;
        gap: 10px !important;
    }
    .spiritual-subcard-title {
        font-size: 0.88rem !important;
        font-weight: 700 !important;
        line-height: 1.35 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        flex: 1 !important;
        min-width: 0 !important;
        width: auto !important;
        max-width: 100% !important;
        display: block !important;
        margin-bottom: 0 !important;
    }
    .spiritual-subcard-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
        width: auto !important;
        padding-top: 0 !important;
        border-top: none !important;
    }

    /* Admin View with 3 buttons (Open, Edit, Delete) stacks vertically on smartphones */
    .spiritual-subcard.has-admin-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    .spiritual-subcard.has-admin-actions .spiritual-subcard-title {
        width: 100% !important;
        flex: none !important;
        margin-bottom: 2px !important;
    }
    .spiritual-subcard.has-admin-actions .spiritual-subcard-actions {
        width: 100% !important;
        flex-wrap: wrap !important;
        padding-top: 6px !important;
        border-top: 1px dashed rgba(0,0,0,0.08) !important;
    }
    .open-btn-responsive {
        padding: 5px 12px !important;
        font-size: 0.78rem !important;
        border-radius: 16px !important;
    }

    /* Modal Form Responsive Grid Layout on Mobile */
    #izza-member-modal > div,
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 20px 16px !important;
        margin: 10px auto !important;
        max-height: 92vh !important;
    }

    #izza-member-form div[style*="display: grid"],
    #izza-member-form div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Modal Action Buttons for Easy Finger Tapping */
    #izza-member-modal button,
    .modal-content button {
        min-height: 44px !important;
    }

    .action-btn-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
    }
}

/* Interactive Action Cards for Modals */
.action-card-hover {
    transition: all 0.25s ease !important;
}
.action-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16) !important;
    border-color: var(--emerald-primary) !important;
}

/* ==========================================================================
   CIRCULAR PROGRESS CARD ANIMATIONS
   ========================================================================== */
@keyframes progCardPopIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.94);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.prog-donut-card {
    animation: progCardPopIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.28s ease !important;
}

.prog-donut-card:hover {
    transform: translateY(-5px) scale(1.02) !important;
}

.prog-donut-svg {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.prog-donut-card:hover .prog-donut-svg {
    transform: rotate(-90deg) scale(1.08) !important;
}

.prog-donut-arc {
    transition: stroke-dashoffset 1s cubic-bezier(0.34, 1.25, 0.64, 1) !important;
}

/* Smooth Fade Entrance for Welcome Greeting */
@keyframes fadeInWelcome {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-fade-in {
    animation: fadeInWelcome 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   HARDWARE ACCELERATION & PERFORMANCE OPTIMIZATIONS
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

/* Webpage Performance & Speed Optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    content-visibility: auto;
}

.tab-content:not(.active),
.tab-pane:not(.active) {
    display: none !important;
    content-visibility: hidden;
}

/* Hardware acceleration & layout containment for fast rendering */
.card,
.stat-card,
.home-slider-track,
.carousel-track,
.prog-donut-card,
.action-card-hover,
#banner-slider {
    contain: layout style paint;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Full Viewport Width Header Banner Breakout (Fits screen left and right sides without white margins) */
#banner-slider {
    position: relative !important;
    width: 100vw !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 0.5rem !important;
    margin-bottom: 1.5rem !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
    box-shadow: none !important;
}

#banner-slider img {
    width: 100vw !important;
    height: auto !important;
    display: block !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    object-fit: fill !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
}

/* Hide header banner slider navigation arrows & dots */
#banner-slider button,
#banner-slider-dots {
    display: none !important;
}

/* Modern Model Action Buttons */
.btn-action-model {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.73rem;
    font-weight: 700;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    letter-spacing: 0.02em;
    white-space: nowrap;
    font-family: var(--font-primary);
}

.btn-action-model.action-pending {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}

.btn-action-model.action-pending:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.btn-action-model.action-completed {
    background: rgba(225, 29, 72, 0.08);
    color: #e11d48;
    border: 1.5px solid rgba(225, 29, 72, 0.25);
}

.btn-action-model.action-completed:hover {
    background: rgba(225, 29, 72, 0.16);
    transform: translateY(-1px);
}

.btn-action-model.action-numeric {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
}

.btn-action-model.action-numeric:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* ==========================================================================
   SMARTPHONE TABLE HORIZONTAL LEFT-RIGHT TOUCH SCROLL CONTROLS
   ========================================================================== */
.table-container,
.table-responsive,
.data-table-container,
.units-table-wrapper,
.agenda-table-wrapper {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
    touch-action: pan-x pan-y !important;
    position: relative;
    margin-top: 8px;
    margin-bottom: 1rem;
    border-radius: 0 !important;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-primary, #ca8a04) rgba(0,0,0,0.06);
}

/* Ensure data tables force horizontal scroll when screen width is smaller than table */
.table-container > table,
.table-responsive > table,
.data-table-container > table,
.data-table {
    min-width: 540px !important;
    width: 100% !important;
    border-collapse: collapse;
}

/* Touch Smartphone Visible Horizontal Scrollbar Styling */
.table-container::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.data-table-container::-webkit-scrollbar,
.units-table-wrapper::-webkit-scrollbar,
.agenda-table-wrapper::-webkit-scrollbar {
    height: 6px !important;
    display: block !important;
}

.table-container::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
.data-table-container::-webkit-scrollbar-track,
.units-table-wrapper::-webkit-scrollbar-track,
.agenda-table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06) !important;
    border-radius: 10px !important;
}

body.dark-theme .table-container::-webkit-scrollbar-track,
body.dark-theme .table-responsive::-webkit-scrollbar-track,
body.dark-theme .data-table-container::-webkit-scrollbar-track,
body.dark-theme .units-table-wrapper::-webkit-scrollbar-track,
body.dark-theme .agenda-table-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08) !important;
}

.table-container::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
.data-table-container::-webkit-scrollbar-thumb,
.units-table-wrapper::-webkit-scrollbar-thumb,
.agenda-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--gold-primary, #ca8a04) !important;
    border-radius: 10px !important;
}

/* Scroll hint indicator header for mobile smartphones disabled */
@media (max-width: 768px) {
    .programs-sub-list {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding-bottom: 8px !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
    }

    .program-sub-card {
        flex: unset !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 12px 10px !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
        touch-action: manipulation !important;
    }

    .programs-grid-wrapper button[title="Scroll Left"],
    .programs-grid-wrapper button[title="Scroll Right"] {
        display: none !important;
    }

    #unit-program-modal > div {
        padding: 20px 16px !important;
        border-radius: 16px !important;
    }

    #unit-program-modal [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

/* Splide Slider Custom Styling for Header Banner */
#header-banner-splide .splide__track {
    border-radius: 0;
    overflow: hidden;
}
#header-banner-splide .splide__pagination {
    bottom: 8px;
    gap: 6px;
    z-index: 10;
}
#header-banner-splide .splide__pagination__page {
    background: rgba(255, 255, 255, 0.45);
    border: none;
    width: 8px;
    height: 8px;
    transition: all 0.3s ease;
    opacity: 0.7;
}
#header-banner-splide .splide__pagination__page.is-active {
    background: var(--emerald-primary, #10b981);
    transform: scale(1.25);
    opacity: 1;
    border-radius: 10px;
    width: 18px;
}

/* ==========================================================================
   FEATURED VIDEOS PREMIUM HORIZONTAL CAROUSEL / SLIDER
   ========================================================================== */
#featured-videos-splide {
    width: 100%;
    position: relative;
    padding-bottom: 0;
    margin: 0;
}

#featured-videos-splide.has-pagination {
    padding-bottom: 22px;
}

#featured-videos-splide .splide__track {
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 16px;
}

#featured-videos-splide .splide__slide {
    transition: opacity 0.35s ease;
    opacity: 1;
    transform: none;
}

#featured-videos-splide .splide__slide.is-active {
    opacity: 1;
    transform: none;
}

.featured-video-card-inner {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    margin: 0;
    line-height: 0;
}

#featured-videos-splide .splide__slide.is-active .featured-video-card-inner {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}

.featured-video-card-inner:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15), 0 4px 15px rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
}

.featured-video-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a0a0a;
    overflow: hidden;
    display: block;
    line-height: 0;
    margin: 0;
    padding: 0;
}

.featured-video-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
    display: block;
    margin: 0;
    padding: 0;
}

.featured-video-card-inner:hover .featured-video-thumb-wrap img {
    transform: scale(1.05);
}

.featured-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.65);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    z-index: 2;
}

.featured-video-card-inner:hover .featured-video-play-btn,
.featured-video-card-inner:active .featured-video-play-btn,
.featured-video-card-inner:focus-within .featured-video-play-btn {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1.1);
    background: #dc2626;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.85);
}

.featured-video-info-box {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--card-bg, #ffffff);
}

.featured-video-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.35;
    font-family: 'Outfit', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#featured-videos-splide .splide__arrows {
    display: none !important;
}

#featured-videos-splide .splide__pagination {
    bottom: 0px;
    gap: 8px;
}

#featured-videos-splide .splide__pagination__page {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    width: 8px;
    height: 8px;
    transition: all 0.25s ease;
}

#featured-videos-splide .splide__pagination__page.is-active {
    background: #ef4444;
    transform: scale(1.35);
    width: 22px;
    border-radius: 10px;
}

/* --- Gallery & Highlights Horizontal Splide Carousel --- */
#gallery-highlights-splide {
    width: 100%;
    position: relative;
    padding-bottom: 0;
}

/* --- Gallery & Highlights Horizontal Slider (1:1 Square Format) --- */
.gallery-slider-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: var(--card-bg, #ffffff);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.gallery-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    margin: 0;
    padding: 0;
}

.gallery-slider-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    max-width: 100%;
    background: transparent;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    line-height: 0;
    margin: 0;
    padding: 0;
}

.gallery-slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.4s ease;
    display: block;
    margin: 0;
    padding: 0;
}

.gallery-slider-slide:hover img {
    transform: scale(1.03);
}

.gallery-slider-dots {
    position: relative;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 5;
    padding: 4px 0;
    background: transparent;
}

.gallery-slider-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-muted, #94a3b8);
    opacity: 0.4;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border: none;
    padding: 0;
    margin: 0;
    display: inline-block;
}

.gallery-slider-dot:hover {
    opacity: 0.8;
    transform: scale(1.2);
}

.gallery-slider-dot.active {
    background: var(--emerald-primary, #10b981) !important;
    transform: scale(1.2);
    width: 24px;
    border-radius: 12px;
    opacity: 1;
}

/* Gallery Prev/Next Navigation Buttons (<>) */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 25;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    outline: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    opacity: 0.85;
}

.gallery-nav-btn:hover {
    background: var(--emerald-primary, #10b981);
    border-color: var(--emerald-primary, #10b981);
    color: #ffffff;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
    opacity: 1;
}

.gallery-nav-btn.prev {
    left: 14px;
}

.gallery-nav-btn.next {
    right: 14px;
}

@media (max-width: 576px) {
    .gallery-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    .gallery-nav-btn.prev {
        left: 10px;
    }
    .gallery-nav-btn.next {
        right: 10px;
    }
}

/* ==========================================================================
   SMARTPHONE ULTRA-USER-FRIENDLY RESPONSIVE MOBILE STYLING
   ========================================================================== */
@media (max-width: 576px) {
    /* Touch Target & General Container Optimizations */
    body {
        font-size: 14px !important;
        overflow-x: hidden !important;
    }

    .main-container,
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .glass-card, 
    .card {
        padding: 14px 12px !important;
        border-radius: 14px !important;
        margin-top: 1rem !important;
    }

    .stat-attendance-row {
        gap: 4px !important;
        flex-wrap: nowrap !important;
    }
    .stat-attendance-row .stat-badge-p,
    .stat-attendance-row .stat-badge-l,
    .stat-attendance-row .stat-badge-a {
        font-size: 0.73rem !important;
        padding: 2px 5px !important;
    }

    /* Form Fields & Touch-Friendly Control Inputs */
    input.form-control, 
    select.form-control, 
    textarea.form-control {
        font-size: 15px !important;
        padding: 10px 12px !important;
        border-radius: 10px !important;
        min-height: 42px !important;
        box-sizing: border-box !important;
    }

    /* Buttons One-Tap Finger Targets */
    .btn, 
    button.btn, 
    .btn-emerald, 
    .btn-teal, 
    .btn-gold, 
    .btn-outline {
        min-height: 42px !important;
        padding: 8px 14px !important;
        border-radius: 10px !important;
        font-size: 0.85rem !important;
        font-weight: 800 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        touch-action: manipulation !important;
    }

    /* Leaderboard Tab Controls & Month Filter on Mobile: Preserve compact height and padding */
    .leaderboard-tabs-wrapper > button,
    .leaderboard-tabs-wrapper .custom-month-dropdown-btn,
    #tab-unit-leaderboard-btn,
    #tab-prog-leaderboard-btn,
    #unit-leaderboard-month-btn {
        min-height: 36px !important;
        height: 36px !important;
        max-height: 36px !important;
        padding: 0 6px !important;
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
    }

    /* Split Views Vertical Stacking for Smartphones */
    .split-view {
        flex-direction: column !important;
        gap: 16px !important;
    }

    .flex-1, .flex-2, .flex-3 {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }

    /* Header Nav Bar Touch Horizontal Scroll */
    .nav-tabs,
    .tab-navigation,
    .nav-bar-container {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        white-space: nowrap !important;
        gap: 8px !important;
        padding-bottom: 6px !important;
    }

    .nav-tabs::-webkit-scrollbar,
    .tab-navigation::-webkit-scrollbar {
        display: none !important;
    }

    /* Modal Responsive Touch Viewport Fit */
    .modal-backdrop > div,
    .modal-content {
        width: 94vw !important;
        max-width: 94vw !important;
        max-height: 90vh !important;
        padding: 16px 12px !important;
        border-radius: 16px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Active Circulars & Table Controls Stack */
    .panel-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .panel-header > div {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    #circular-type-filter,
    #circular-search {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Keep SSF Membership card headers clean and responsive on smartphones */
    .membership-target-card:not(.membership-chart-card) .panel-header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .membership-chart-card .panel-header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .membership-target-card .panel-header > div:first-child {
        width: auto !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 8px !important;
        flex: 1 !important;
        min-width: 0 !important;
    }

    .membership-target-card .panel-header h3.card-title {
        white-space: nowrap !important;
        font-size: clamp(0.85rem, 3.8vw, 1.05rem) !important;
    }

    .membership-target-card .panel-header .btn-membership-copy {
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }
}

/* --- Anek Malayalam Semi-Bold Utility --- */
.font-anek-semibold {
    font-family: 'Anek Malayalam', sans-serif !important;
    font-stretch: normal !important;
    font-variation-settings: 'wdth' 100, 'wght' 600 !important;
    font-weight: 600 !important;
}

/* --- Right-to-Left Ticker Text Animation --- */
@keyframes ticker-right-to-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.ticker-container-rtl {
    overflow: hidden;
    width: 100%;
    white-space: nowrap;
    position: relative;
    box-sizing: border-box;
}

.ticker-text-rtl {
    display: inline-block;
    white-space: nowrap;
    animation: ticker-right-to-left 11s linear infinite;
    will-change: transform;
}

.ticker-container-rtl:hover .ticker-text-rtl {
    animation-play-state: paused;
}

/* --- Modern Interactive Accordion Card --- */
.accordion-interactive-card {
    background: var(--bg-card, #ffffff);
    backdrop-filter: var(--glass-blur, blur(12px));
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    border-radius: 16px;
    margin-top: 14px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.accordion-interactive-card:hover {
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.accordion-interactive-header {
    cursor: pointer;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    user-select: none;
    transition: background 0.2s ease;
}

.accordion-interactive-header:hover {
    background: rgba(16, 185, 129, 0.04);
}

.accordion-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.accordion-icon-box.emerald {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.08));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.accordion-icon-box.teal {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.15), rgba(15, 118, 110, 0.08));
    color: #0d9488;
    border: 1px solid rgba(13, 148, 136, 0.2);
}

.accordion-icon-box.blue {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(29, 78, 216, 0.08));
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.accordion-icon-box.amber {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.15), rgba(180, 83, 9, 0.08));
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.accordion-interactive-header:hover .accordion-icon-box {
    transform: scale(1.05);
}

.accordion-title-group h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

.accordion-title-group p {
    margin: 3px 0 0 0;
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    font-weight: 500;
}

.accordion-chevron-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #64748b);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.accordion-interactive-header:hover .accordion-chevron-btn {
    background: #059669;
    color: #ffffff;
    transform: translateX(2px);
}

/* --- Attendance Stat Grid & Cards (Modern Left-Accent Model) --- */
.attendance-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 1.25rem;
    width: 100%;
}

.att-stat-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 12px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color, #e2e8f0);
    border-left-width: 5px;
    border-left-style: solid;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.att-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.att-stat-card.att-stat-present {
    border-left-color: #10b981;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.08);
}

.att-stat-card.att-stat-leave {
    border-left-color: #f59e0b;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.08);
}

.att-stat-card.att-stat-absent {
    border-left-color: #ef4444;
    box-shadow: 0 3px 12px rgba(239, 68, 68, 0.08);
}

.att-stat-card .stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.06em;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.att-stat-present .stat-value {
    color: #047857;
}

.att-stat-leave .stat-value {
    color: #d97706;
}

.att-stat-absent .stat-value {
    color: #dc2626;
}

.att-stat-card .stat-label-col {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    overflow: hidden;
}

.att-stat-card .stat-label-col span {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.15;
    white-space: nowrap;
}

.att-stat-present .stat-label-col .label-top { color: #047857; }
.att-stat-present .stat-label-col .label-bottom { color: #10b981; }

.att-stat-leave .stat-label-col .label-top { color: #d97706; }
.att-stat-leave .stat-label-col .label-bottom { color: #f59e0b; }

.att-stat-absent .stat-label-col .label-top { color: #dc2626; }
.att-stat-absent .stat-label-col .label-bottom { color: #ef4444; }

/* --- Unified Action Card & Accordion Icons --- */
.action-card-icon,
.accordion-icon-box {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    border-radius: 13px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.25rem !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    transition: transform 0.2s ease !important;
}

/* Meeting Tab Distinct Colorful Action Cards */
.action-meeting-card {
    border-radius: 14px !important;
    overflow: hidden !important;
    transition: all 0.25s ease !important;
}

.action-meeting-card.emerald {
    background: #ffffff !important;
    border: 1.5px solid rgba(16, 185, 129, 0.4) !important;
}
.action-meeting-card.emerald:hover {
    border-color: #10b981 !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15) !important;
}
.action-meeting-card.emerald .action-card-icon {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
    border: none !important;
}
.action-meeting-card.emerald .action-card-chevron {
    color: #10b981 !important;
}

.action-meeting-card.sky {
    background: #ffffff !important;
    border: 1.5px solid rgba(14, 165, 233, 0.4) !important;
}
.action-meeting-card.sky:hover {
    border-color: #0ea5e9 !important;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.15) !important;
}
.action-meeting-card.sky .action-card-icon {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35) !important;
    border: none !important;
}
.action-meeting-card.sky .action-card-chevron {
    color: #0ea5e9 !important;
}

.action-meeting-card.amber {
    background: #ffffff !important;
    border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
}
.action-meeting-card.amber:hover {
    border-color: #f59e0b !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15) !important;
}
.action-meeting-card.amber .action-card-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35) !important;
    border: none !important;
}
.action-meeting-card.amber .action-card-chevron {
    color: #f59e0b !important;
}

.action-meeting-card.indigo {
    background: #ffffff !important;
    border: 1.5px solid rgba(99, 102, 241, 0.4) !important;
}
.action-meeting-card.indigo:hover {
    border-color: #6366f1 !important;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15) !important;
}
.action-meeting-card.indigo .action-card-icon {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35) !important;
    border: none !important;
}
.action-meeting-card.indigo .action-card-chevron {
    color: #6366f1 !important;
}

.action-meeting-card.purple {
    background: #ffffff !important;
    border: 1.5px solid rgba(168, 85, 247, 0.4) !important;
}
.action-meeting-card.purple:hover {
    border-color: #a855f7 !important;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15) !important;
}
.action-meeting-card.purple .action-card-icon {
    background: linear-gradient(135deg, #a855f7, #7e22ce) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35) !important;
    border: none !important;
}
.action-meeting-card.purple .action-card-chevron {
    color: #a855f7 !important;
}

.action-meeting-card.rose {
    background: #ffffff !important;
    border: 1.5px solid rgba(244, 63, 94, 0.4) !important;
}
.action-meeting-card.rose:hover {
    border-color: #f43f5e !important;
    box-shadow: 0 8px 24px rgba(244, 63, 94, 0.15) !important;
}
.action-meeting-card.rose .action-card-icon {
    background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35) !important;
    border: none !important;
}
.action-meeting-card.rose .action-card-chevron {
    color: #f43f5e !important;
}

.action-card-icon.emerald,
.accordion-icon-box.emerald {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.08)) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.action-card-icon.teal,
.accordion-icon-box.teal {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.15), rgba(15, 118, 110, 0.08)) !important;
    color: #0d9488 !important;
    border: 1px solid rgba(13, 148, 136, 0.2) !important;
}

.action-card-icon.gold,
.accordion-icon-box.gold,
.accordion-icon-box.amber {
    background: linear-gradient(135deg, rgba(202, 138, 4, 0.15), rgba(161, 98, 7, 0.08)) !important;
    color: #ca8a04 !important;
    border: 1px solid rgba(202, 138, 4, 0.2) !important;
}

.action-card-icon.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(109, 40, 217, 0.08)) !important;
    color: #8b5cf6 !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

.action-card-icon.rose {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(225, 29, 72, 0.08)) !important;
    color: #f43f5e !important;
    border: 1px solid rgba(244, 63, 94, 0.2) !important;
}

.action-card-icon.blue,
.accordion-icon-box.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.08)) !important;
    color: #3b82f6 !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

.action-card-hover:hover .action-card-icon,
.accordion-interactive-header:hover .accordion-icon-box {
    transform: scale(1.05);
}

/* Smartphone Adjustments (<= 576px / 480px) */
@media (max-width: 576px) {
    .action-card-hover {
        padding: 13px 14px !important;
        gap: 12px !important;
    }
    .action-card-icon,
    .accordion-icon-box {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        border-radius: 11px !important;
        font-size: 1.15rem !important;
    }
    .action-card-hover h4,
    .accordion-title-group h3 {
        font-size: 0.94rem !important;
        line-height: 1.25 !important;
        margin-bottom: 2px !important;
    }
    .action-card-hover p,
    .accordion-title-group p {
        font-size: 0.73rem !important;
        line-height: 1.3 !important;
    }
    .action-card-hover > i.fa-chevron-right,
    .accordion-chevron-btn {
        font-size: 0.82rem !important;
        flex-shrink: 0 !important;
    }
    .attendance-stat-grid {
        gap: 6px !important;
        margin-bottom: 1rem !important;
    }
    .att-stat-card {
        padding: 8px 4px 8px 6px !important;
        border-radius: 10px !important;
        border-left-width: 3.5px !important;
        gap: 4px !important;
        min-width: 0 !important;
    }
    .att-stat-card .stat-value {
        font-size: 1.25rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.05em !important;
        font-variant-numeric: tabular-nums !important;
        font-feature-settings: "tnum" !important;
    }
    .att-stat-card .stat-label-col {
        gap: 0px !important;
    }
    .att-stat-card .stat-label-col span {
        font-size: 0.52rem !important;
        letter-spacing: 0 !important;
        line-height: 1.1 !important;
    }
    .accordion-interactive-header {
        padding: 12px 14px !important;
        gap: 10px !important;
    }
    .accordion-chevron-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.8rem !important;
    }
    #sec-attendance-logs-wrapper,
    #sec-attendance-summary-wrapper,
    #exec-attendance-logs-wrapper,
    #exec-attendance-summary-wrapper {
        padding: 0 8px 14px 8px !important;
    }
    .attendance-filter-bar {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        margin: 12px 0 12px 0 !important;
        width: 100% !important;
    }
    .attendance-filter-bar input[type="date"] {
        flex: 0 0 130px !important;
        max-width: 130px !important;
        min-width: 110px !important;
        margin: 0 !important;
        padding: 7px 8px !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }
    .attendance-filter-bar input[type="text"] {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 7px 10px !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
    }
}

@media (max-width: 380px) {
    .attendance-stat-grid {
        gap: 4px !important;
    }
    .att-stat-card {
        padding: 6px 3px 6px 4px !important;
        border-left-width: 3px !important;
        gap: 3px !important;
    }
    .att-stat-card .stat-value {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.04em !important;
        font-variant-numeric: tabular-nums !important;
        font-feature-settings: "tnum" !important;
    }
    .att-stat-card .stat-label-col span {
        font-size: 0.46rem !important;
    }
}



/* Reusable Mini Dual Ring Spinner for Buttons & Uploaders */
.mini-dual-spinner {
    display: inline-block;
    position: relative;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}

.mini-dual-spinner .mini-outer-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #2dd4bf;
    border-left-color: #2dd4bf;
    border-bottom-color: #ff2d55;
    border-right-color: #ff2d55;
    animation: spinDualRingOuter 1.1s linear infinite;
}

.mini-dual-spinner .mini-inner-ring {
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    border-top-color: currentColor;
    border-right-color: currentColor;
    border-left-color: currentColor;
    animation: spinDualRingInner 0.8s linear infinite reverse;
}

/* ==========================================
   PERFORMANCE & SPEED OPTIMIZATIONS
   ========================================== */
* {
    -webkit-tap-highlight-color: transparent;
}

.scrollable-list,
.unit-leaderboard-list,
.member-list,
.attendance-log-list,
.tab-content,
.table-responsive {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.glass-card,
.leaderboard-item,
.program-item,
.circular-item {
    contain: layout paint style;
    transform: translateZ(0);
}

.leaderboard-list {
    content-visibility: auto;
    contain-intrinsic-size: 0 400px;
}

img {
    content-visibility: auto;
    decoding: async;
}

.banner-slider-container,
.home-slider-wrapper {
    will-change: transform;
    transform: translateZ(0);
}

/* Light Subtle Backdrop Overlay - Remove Dark Black Overlay */
.modal-backdrop,
.modal-overlay,
div[id$="-modal"] {
    background: rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(3px) !important;
}

.modal-backdrop,
.modal-content {
    will-change: opacity, transform;
}

/* Meeting Days Modal Smartphone Responsiveness */
/* Meeting Days Modal Smartphone Responsiveness */
@media (max-width: 576px) {
    .meeting-days-modal-card {
        padding: 20px 14px !important;
        border-radius: 18px !important;
        max-width: 96% !important;
    }
    .meeting-days-tab-nav {
        gap: 3px !important;
        padding: 3px !important;
        margin-bottom: 14px !important;
    }
    .meeting-days-tab-nav button {
        padding: 7px 6px !important;
        font-size: 0.78rem !important;
        gap: 4px !important;
    }
    .meeting-tab-badge {
        padding: 1px 5px !important;
        font-size: 0.72rem !important;
    }

    /* Chart Containers & Filter Popovers on Mobile */
    .dashboard-charts-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .chart-card {
        padding: 14px 12px !important;
        border-radius: 14px !important;
    }
    .chart-card-header {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .chart-wrapper {
        min-height: 240px !important;
        height: 250px !important;
    }
    #dash-radar-filter-popover,
    #dash-analytics-filter-popover {
        width: 260px !important;
        max-width: calc(100vw - 32px) !important;
    }

    /* Mobile Touch Tables */
    .data-table th,
    .data-table td,
    .data-table-report th,
    .data-table-report td,
    .finance-table th,
    .finance-table td {
        padding: 8px 6px !important;
        font-size: 0.8rem !important;
    }

    /* Unit Programs Slider Mobile Optimization */
    .unit-slider-wrapper {
        padding: 0 4px !important;
    }
    .program-sub-card {
        padding: 12px 8px !important;
        min-width: 130px !important;
    }

    /* Safe Bottom Inset for Mobile Navigation */
    .main-content {
        padding-bottom: max(2rem, env(safe-area-inset-bottom, 24px)) !important;
    }
}

/* Performance & Rendering Acceleration Optimizations */
html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    -webkit-tap-highlight-color: transparent;
}

.tab-pane:not(.active) {
    display: none !important;
    content-visibility: hidden;
}

.tab-pane.active {
    content-visibility: visible;
    animation: fadeInTab 0.22s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes fadeInTab {
    0% { opacity: 0; transform: translateY(4px); }
    100% { opacity: 1; transform: translateY(0); }
}

.glass-card,
.stat-card,
.metric-mini-card,
.action-meeting-card {
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform, box-shadow;
}

.scrollable-list,
.table-responsive,
.table-container,
.programs-sub-list,
.leaderboard-list,
.gallery-slider-track {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    transform: translateZ(0);
}

.leaderboard-item,
.attendance-row,
.mini-circular-item,
.mini-donation-item {
    contain: layout style;
}

/* Modal Smooth Entrance Optimization */
.modal.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.modal .glass-card,
.modal .izza-cash-modal-card {
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
}

/* Izza Cash Status Details Modal Responsiveness & Styling */
.izza-cash-modal-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    width: 100%;
    max-width: 680px;
    padding: 22px 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    animation: slideUp 0.22s ease;
    font-family: 'Montserrat', sans-serif;
}

.izza-cash-modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    align-items: center;
    width: 100%;
}

.izza-cash-tab-btn {
    flex: 1 1 0;
    min-width: 0;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    padding: 7px 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.izza-cash-tab-btn.izza-cash-tab-hidden {
    display: none !important;
}

.izza-cash-tab-badge {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 9999px;
    min-width: 20px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.izza-cash-modal-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
    width: 100%;
}

.izza-cash-modal-search-box {
    position: relative;
    flex: 1;
    min-width: 0;
}

.izza-cash-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 2;
}

#izza-cash-modal-search {
    padding-left: 38px !important;
    font-size: 0.82rem;
    height: 38px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.izza-cash-modal-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

#izza-cash-modal-unit-filter {
    width: auto;
    max-width: 140px;
    font-size: 0.8rem;
    height: 38px;
    border-radius: 8px;
    box-sizing: border-box;
}

.izza-cash-copy-btn {
    height: 38px;
    font-weight: 700;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Smartphone View Adjustments (<= 576px) */
@media (max-width: 576px) {
    #izza-cash-status-modal {
        padding: 10px !important;
    }
    .izza-cash-modal-card {
        padding: 16px 12px !important;
        border-radius: 16px !important;
        max-height: 94vh !important;
    }
    #izza-cash-status-modal-title {
        font-size: 1.05rem !important;
    }
    .izza-cash-modal-tabs {
        gap: 5px !important;
        margin-bottom: 12px !important;
    }
    .izza-cash-tab-btn {
        padding: 7px 4px !important;
        font-size: 0.70rem !important;
        gap: 4px !important;
        min-height: 38px !important;
    }
    .izza-cash-tab-badge {
        font-size: 0.68rem !important;
        padding: 1px 5px !important;
        min-width: 18px !important;
    }
    .izza-cash-modal-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }
    .izza-cash-modal-search-box {
        width: 100% !important;
    }
    #izza-cash-modal-search {
        width: 100% !important;
        padding-left: 38px !important;
        height: 40px !important;
        min-height: 40px !important;
        font-size: 0.84rem !important;
    }
    .izza-cash-modal-filter-actions {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }
    #izza-cash-modal-unit-filter {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: none !important;
        height: 40px !important;
        min-height: 40px !important;
        font-size: 0.82rem !important;
    }
    .izza-cash-copy-btn {
        flex: 0 0 auto !important;
        height: 40px !important;
        min-height: 40px !important;
        font-size: 0.80rem !important;
        padding: 0 16px !important;
    }
    .izza-cash-table-wrap table {
        min-width: 440px !important;
    }
    .izza-cash-modal-footer {
        margin-top: 10px !important;
        padding-top: 10px !important;
    }
    .izza-cash-modal-footer-actions {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }
    .izza-cash-modal-footer-actions button {
        flex: 1 !important;
        justify-content: center !important;
    }
}

@media (max-width: 380px) {
    .izza-cash-tab-btn {
        font-size: 0.65rem !important;
        padding: 6px 2px !important;
        gap: 3px !important;
    }
    .izza-cash-tab-btn i {
        font-size: 0.65rem !important;
    }
    .izza-cash-tab-badge {
        font-size: 0.62rem !important;
        padding: 1px 4px !important;
        min-width: 16px !important;
    }
}

/* Dashboard Calendar Touch Swipe Transitions & Animations */
#dash-calendar-container {
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
}

#dash-calendar-days-grid {
    will-change: transform, opacity;
}

@keyframes calSlideInFromRight {
    0% {
        opacity: 0.15;
        transform: translateX(42px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes calSlideInFromLeft {
    0% {
        opacity: 0.15;
        transform: translateX(-42px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.cal-slide-to-left {
    animation: calSlideInFromRight 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cal-slide-to-right {
    animation: calSlideInFromLeft 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Membership Tab - Montserrat Typography */
#membership,
#membership *:not(i):not([class*="fa-"]),
#unit-target-count-modal,
#unit-target-count-modal *:not(i):not([class*="fa-"]) {
    font-family: 'Montserrat', sans-serif !important;
}

#unit-target-count-modal {
    background: #ffffff !important;
    background-color: #ffffff !important;
    opacity: 1 !important;
}

#membership i[class*="fa-"],
#unit-target-count-modal i[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

#membership .stat-label {
    letter-spacing: 0.5px !important;
    font-weight: 600 !important;
}

#membership .stat-value {
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
}

#membership table th {
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    padding: 7px 8px !important;
    font-size: 0.82rem !important;
}

#membership table td,
#membership table tfoot td {
    font-variant-numeric: tabular-nums;
    padding: 6px 8px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
}

#membership table tbody tr {
    height: 38px !important;
}

#membership table tr.unit-detail-drawer {
    height: auto !important;
}

#membership table th.unit-col-header,
#membership table td.unit-col-cell,
#membership table tfoot td.unit-col-cell {
    text-align: left !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
}

#membership table th.amount-col-header,
#membership table td.amount-col-cell,
#membership table tfoot td.amount-col-cell {
    text-align: center !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}

/* ==========================================================================
   MEMBERSHIP REACTIVE MICRO-INTERACTIONS & PRESS/HOVER EFFECTS
   ========================================================== */
.membership-metric-card {
    background: #ffffff;
    border: 1.5px solid #f1f5f9;
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 14px;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.2s ease;
    cursor: default;
    user-select: none;
}

.membership-metric-card:hover {
    transform: translateY(-3px);
    border-color: #cbd5e1 !important;
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.07), 0 4px 10px -2px rgba(0, 0, 0, 0.03) !important;
}

.membership-metric-card:active {
    transform: scale(0.97) translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.08s ease;
}

.membership-side-icon-badge {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.28rem !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.membership-metric-card .membership-side-icon-badge,
.membership-metric-card > div:first-child {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.membership-metric-card:hover .membership-side-icon-badge,
.membership-metric-card:hover > div:first-child {
    transform: scale(1.08) rotate(3deg);
}

/* Modal Unit Stat Cards Interactive Reactions */
.unit-stat-card {
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.2s ease !important;
    user-select: none;
}

.unit-stat-card:hover {
    transform: translateY(-3px) !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.07), 0 4px 8px -2px rgba(0, 0, 0, 0.02) !important;
}

.unit-stat-card:active {
    transform: scale(0.97) translateY(0) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.08s ease !important;
}

.unit-stat-card .unit-stat-icon-badge {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.unit-stat-card:hover .unit-stat-icon-badge {
    transform: scale(1.08) rotate(3deg);
}

/* Button & Trigger Tap Reactions */
.btn-membership-copy,
#btn-copy-membership-graph,
.unit-update-btn,
#btn-copy-selected-membership,
#btn-copy-unit-field-confirm {
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, background 0.15s ease !important;
}

.btn-membership-copy:hover,
#btn-copy-membership-graph:hover {
    transform: translateY(-2px) scale(1.05) !important;
}

.btn-membership-copy:active,
#btn-copy-membership-graph:active,
.unit-update-btn:active,
#btn-copy-selected-membership:active,
#btn-copy-unit-field-confirm:active {
    transform: scale(0.93) !important;
    transition: transform 0.08s ease !important;
}

/* SSF Membership Table Row Interactive Reactions */
.membership-modern-table tbody tr {
    transition: background-color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

.membership-modern-table tbody tr:hover {
    background-color: #f8fafc !important;
}

.membership-modern-table tbody tr:active {
    transform: scale(0.995);
    background-color: #f1f5f9 !important;
}

/* ==========================================================================
   SSF MEMBERSHIP CARD & TABLE MODERN WHITE DESIGN
   ========================================================================== */
.membership-target-card {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.dark-theme .membership-target-card {
    background: #0d1b18 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.35) !important;
}

.membership-target-card:not(.membership-chart-card) .panel-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 100% !important;
}

.membership-chart-card .panel-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    width: 100% !important;
}

.membership-target-card .panel-header > div:first-child {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: auto !important;
    flex: 1 !important;
    min-width: 0 !important;
}

.membership-target-card .panel-header h3.card-title {
    margin: 0 !important;
    white-space: nowrap !important;
    font-size: clamp(0.85rem, 3.8vw, 1.05rem) !important;
}

.btn-membership-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-membership-copy:hover {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-membership-copy:active {
    transform: translateY(0);
}

body.dark-theme .btn-membership-copy {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

body.dark-theme .btn-membership-copy:hover {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

.membership-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible !important;
    max-height: none !important;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    background: #ffffff;
}

body.dark-theme .membership-table-wrapper {
    border-color: rgba(255, 255, 255, 0.08);
    background: transparent;
}

#membership table.membership-modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: transparent;
    border: none !important;
    min-width: 0 !important;
}

#membership table.membership-modern-table thead tr {
    background: #f8fafc !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
    height: auto !important;
}

body.dark-theme #membership table.membership-modern-table thead tr {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

#membership table.membership-modern-table th {
    padding: 11px 14px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    border: none !important;
    background: transparent !important;
}

body.dark-theme #membership table.membership-modern-table th {
    color: #94a3b8 !important;
}

#membership table.membership-modern-table tr.membership-unit-row {
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f1f5f9 !important;
    height: 46px !important;
    background: transparent;
}

body.dark-theme #membership table.membership-modern-table tr.membership-unit-row {
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

#membership table.membership-modern-table tr.membership-unit-row:last-child {
    border-bottom: none !important;
}

#membership table.membership-modern-table tr.membership-unit-row:hover {
    background: #f8fafc !important;
}

body.dark-theme #membership table.membership-modern-table tr.membership-unit-row:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

#membership table.membership-modern-table tr.membership-unit-row:hover .membership-row-arrow {
    color: #059669 !important;
    transform: translateX(2px);
}

#membership table.membership-modern-table tr.membership-unit-row:hover .membership-sl-badge {
    background: rgba(5, 150, 105, 0.12) !important;
    color: #059669 !important;
}

#membership table.membership-modern-table td {
    border: none !important;
    padding: 10px 12px !important;
    vertical-align: middle;
}

.membership-sl-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 0.78rem;
    transition: all 0.15s ease;
}

body.dark-theme .membership-sl-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.membership-row-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

body.dark-theme .membership-row-arrow {
    color: rgba(255, 255, 255, 0.2);
}

#membership table.membership-modern-table tfoot tr {
    background: #f8fafc !important;
    border-top: 1.5px solid #e2e8f0 !important;
}

body.dark-theme #membership table.membership-modern-table tfoot tr {
    background: rgba(255, 255, 255, 0.03) !important;
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

#membership table.membership-modern-table tfoot td {
    border: none !important;
    padding: 12px 16px !important;
    font-weight: 800 !important;
}

/* User Welcome Notification Button & Indicator */
.welcome-notification-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-card, #ffffff);
    border: 1.5px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary, #64748b);
    font-size: 0.82rem;
    cursor: pointer;
    position: relative;
    padding: 0;
    margin-left: 3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.welcome-notification-btn:hover {
    color: var(--gold-primary, #ca8a04);
    background: rgba(202, 138, 4, 0.1);
    border-color: rgba(202, 138, 4, 0.35);
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 3px 8px rgba(202, 138, 4, 0.18);
}

.welcome-notification-btn:active {
    transform: scale(0.95);
}

.welcome-notification-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #ef4444;
    border: 1.5px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3);
    animation: pulseNotificationDot 2s infinite;
    font-size: 0.60rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

body.dark-theme .welcome-notification-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

body.dark-theme .welcome-notification-btn:hover {
    color: #facc15;
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.35);
    box-shadow: 0 3px 8px rgba(250, 204, 21, 0.2);
}

body.dark-theme .welcome-notification-dot {
    border-color: #1e293b;
}

#user-welcome-display {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 3px;
    margin-bottom: 2px;
    font-family: 'Outfit', sans-serif;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.dark-theme #user-welcome-display {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.welcome-greeting-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.2;
    margin: 0;
}

#welcome-time-greeting {
    margin: 0;
    color: #8d5d39;
    letter-spacing: 0.9px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
    display: inline-block;
}

body.dark-theme #welcome-time-greeting {
    color: #e09f67 !important;
}

.welcome-back-label {
    margin: 0;
    color: var(--text-primary, #1e293b);
    font-weight: 400;
    font-size: 0.90rem;
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
    letter-spacing: -0.2px;
    display: inline-block;
}

body.dark-theme .welcome-back-label {
    color: #f1f5f9 !important;
}

.welcome-user-name-row {
    line-height: 1.2;
    margin: 0;
}

.welcome-user-name-highlight {
    color: #165b1d;
    font-weight: 700;
    font-size: 1.15rem;
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
    letter-spacing: -0.3px;
    display: inline-block;
}

body.dark-theme .welcome-user-name-highlight {
    color: #22c55e !important;
}

/* Smartphone View: Decreased Compact Font Sizes & Minimal Spacing */
@media (max-width: 768px) {
    #user-welcome-display {
        border: none !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        margin-top: 2px !important;
        margin-bottom: 2px !important;
        gap: 1px !important;
    }

    body.dark-theme #user-welcome-display {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .welcome-greeting-row {
        gap: 4px !important;
    }

    #welcome-time-greeting {
        font-size: 0.76rem !important;
        letter-spacing: 0.6px !important;
        line-height: 1.2 !important;
    }

    .welcome-back-label {
        font-size: 0.80rem !important;
        line-height: 1.2 !important;
    }

    .welcome-user-name-highlight {
        font-size: 1.02rem !important;
        line-height: 1.2 !important;
    }

    .page-header-info {
        margin-bottom: 0.65rem !important;
    }

    .current-date {
        margin-top: 2px !important;
        margin-bottom: 6px !important;
        font-size: 0.74rem !important;
    }
}

@media (max-width: 420px) {
    .welcome-greeting-row {
        gap: 3px !important;
    }

    #welcome-time-greeting {
        font-size: 0.70rem !important;
        letter-spacing: 0.4px !important;
    }

    .welcome-back-label {
        font-size: 0.74rem !important;
    }

    .welcome-user-name-highlight {
        font-size: 0.92rem !important;
    }

    .current-date {
        font-size: 0.70rem !important;
    }
}


@keyframes pulseNotificationDot {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* System Notification Toggle Button */
#sys-notif-toggle-btn.is-enabled {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4) !important;
}
#sys-notif-toggle-btn.is-enabled i,
#sys-notif-toggle-btn.is-enabled span {
    color: #ffffff !important;
}

/* High-Speed Rendering Optimization Rules (Zero Jank & Smooth 60fps) */
img {
    content-visibility: auto;
}

.membership-unit-row,
.finance-table tbody tr,
.attendance-grid,
.media-card,
.circular-item,
.leaderboard-unit-row {
    contain: layout style;
    content-visibility: auto;
    contain-intrinsic-size: 48px;
}

.modal-backdrop {
    will-change: opacity;
    transform: translateZ(0);
}

.action-card-hover {
    will-change: transform;
}

/* ==========================================================================
   PORTAL-WIDE REACTIVE MICRO-INTERACTIONS & TACTILE UI FEEDBACK (ALL SIDES)
   ========================================================================== */

/* 1. Global Cards & Widgets (Dashboard, Programs, Milestones, Modals, Finance) */
.glass-card,
.stat-card,
.metric-card,
.metric-mini-card,
.prog-card,
.milestone-card,
.quick-action-card,
.media-card,
.notice-card,
.agenda-card,
.drive-card {
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.2s ease !important;
}

.glass-card:hover,
.stat-card:hover,
.metric-card:hover,
.metric-mini-card:hover,
.prog-card:hover,
.milestone-card:hover,
.quick-action-card:hover,
.media-card:hover,
.notice-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.03) !important;
}

.glass-card:active,
.stat-card:active,
.metric-card:active,
.metric-mini-card:active,
.prog-card:active,
.milestone-card:active,
.quick-action-card:active,
.media-card:active {
    transform: scale(0.98) translateY(0) !important;
    transition: transform 0.08s ease !important;
}

/* Icon Badges within Cards */
.stat-icon-badge,
.card-icon,
.stat-svg,
.card-title-svg,
.metric-icon {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.glass-card:hover .stat-icon-badge,
.glass-card:hover .card-title-svg,
.stat-card:hover .stat-icon-badge,
.stat-card:hover .stat-svg,
.prog-card:hover .stat-icon-badge {
    transform: scale(1.08) rotate(3deg) !important;
}

/* 2. Global Buttons & Action Triggers */
.btn,
.btn-emerald,
.btn-teal,
.btn-gold,
.btn-primary,
.btn-danger,
.btn-outline,
.btn-sm,
.btn-icon,
.icon-btn,
.btn-custom-copy-sm,
.btn-membership-copy,
.welcome-notification-btn,
.theme-toggle,
.pdf-dl-btn,
.unit-update-btn,
.btn-status-present,
.btn-status-leave,
.btn-status-absent,
.btn-status-late {
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
}

.btn:hover,
.btn-emerald:hover,
.btn-teal:hover,
.btn-gold:hover,
.btn-primary:hover,
.btn-outline:hover,
.btn-sm:hover,
.btn-icon:hover,
.icon-btn:hover,
.welcome-notification-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1) !important;
}

.btn:active,
.btn-emerald:active,
.btn-teal:active,
.btn-gold:active,
.btn-primary:active,
.btn-outline:active,
.btn-sm:active,
.btn-icon:active,
.icon-btn:active,
.btn-custom-copy-sm:active,
.btn-membership-copy:active,
.welcome-notification-btn:active,
.unit-update-btn:active,
.btn-status-present:active,
.btn-status-leave:active,
.btn-status-absent:active,
.btn-status-late:active {
    transform: scale(0.93) translateY(0) !important;
    transition: transform 0.06s ease !important;
}

/* 3. Navigation Tabs & Pill Selectors */
.nav-link,
.nav-tab,
.tab-btn,
.dash-prog-tab,
.chart-subtab-btn,
.chart-filter-btn,
.filter-btn,
.category-pill,
.status-tab {
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease, color 0.15s ease, box-shadow 0.18s ease !important;
}

.nav-link:hover,
.nav-tab:hover,
.tab-btn:hover,
.dash-prog-tab:hover,
.chart-subtab-btn:hover,
.category-pill:hover {
    transform: translateY(-1.5px) !important;
}

.nav-link:active,
.nav-tab:active,
.tab-btn:active,
.dash-prog-tab:active,
.chart-subtab-btn:active,
.category-pill:active {
    transform: scale(0.94) !important;
    transition: transform 0.06s ease !important;
}

/* 4. Table Rows & List Items */
.finance-table tbody tr,
.attendance-table tbody tr,
.circular-item,
.attendance-user-card,
.agenda-item,
.leaderboard-unit-row {
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
    cursor: pointer;
}

.finance-table tbody tr:hover,
.attendance-table tbody tr:hover,
.circular-item:hover,
.attendance-user-card:hover,
.leaderboard-unit-row:hover {
    background-color: rgba(16, 185, 129, 0.05) !important;
}

.finance-table tbody tr:active,
.attendance-table tbody tr:active,
.circular-item:active,
.attendance-user-card:active,
.leaderboard-unit-row:active {
    transform: scale(0.995) !important;
    transition: transform 0.06s ease !important;
}

/* 5. Inputs & Selects Focus Reactions */
input.form-control,
select.form-control,
textarea.form-control,
.form-select,
.input-group input {
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease !important;
}

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus,
.form-select:focus,
.input-group input:focus {
    transform: scale(1.005);
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18) !important;
}

/* 6. Modal Close Buttons & Popups */
.modal-close-btn,
.btn-close,
.modal-backdrop button[onclick*="close"],
.modal-backdrop button[onclick*="Close"] {
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease !important;
}

.modal-close-btn:hover,
.btn-close:hover,
.modal-backdrop button[onclick*="close"]:hover,
.modal-backdrop button[onclick*="Close"]:hover {
    transform: scale(1.15) rotate(90deg) !important;
}

.modal-close-btn:active,
.btn-close:active,
.modal-backdrop button[onclick*="close"]:active,
.modal-backdrop button[onclick*="Close"]:active {
    transform: scale(0.9) rotate(90deg) !important;
    transition: transform 0.06s ease !important;
}

/* ==========================================================================
   FINAL SMARTPHONE & TABLET VIEW ENFORCEMENT: LEADERBOARD TABS & MONTH FILTER (<= 992px)
   - Line 1: [ Unit Leaderboard ]  [ Program Leaderboard ] (2 equal columns, 50% each)
   - Line 2: [ OCTOBER ⌵ ] (100% full width dropdown)
   - Exactly identical fonts (Montserrat, 0.78rem, 700 weight) across all 3 controls
   - Zero text clipping or overflow
   ========================================================================== */
@media (max-width: 992px) {
    .leaderboard-tabs-wrapper {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px 6px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    #tab-unit-leaderboard-btn,
    #tab-prog-leaderboard-btn {
        flex: 1 1 calc(50% - 3px) !important;
        width: calc(50% - 3px) !important;
        max-width: calc(50% - 3px) !important;
        min-width: 0 !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        font-family: var(--font-primary), 'Montserrat', sans-serif !important;
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        padding: 0 6px !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        letter-spacing: -0.1px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
    }

    .leaderboard-tabs-wrapper > .custom-month-dropdown-container,
    #unit-leaderboard-month-container {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        height: 36px !important;
        box-sizing: border-box !important;
    }

    #unit-leaderboard-month-btn {
        width: 100% !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        font-family: var(--font-primary), 'Montserrat', sans-serif !important;
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    #unit-leaderboard-month-label {
        font-family: var(--font-primary), 'Montserrat', sans-serif !important;
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        letter-spacing: normal !important;
    }
}


