/* ==============================================================================
   మావుడి వారి సంక్రాంతి సంబరాలు-2027 (Mavudi Vari Sankranti Sambaralu - 2027)
   Official Master Stylesheet - Festive Telugu Sankranti Theme
   ============================================================================== */

:root {
    --maroon-deep: #2a0309;
    --maroon-main: #4a0511;
    --maroon-light: #6e1021;
    --maroon-accent: #8b182e;
    --gold-deep: #92400e;
    --gold-main: #d97706;
    --gold-light: #fef3c7;
    --gold-shimmer: #fbbf24;
    --turmeric: #f59e0b;
    --turmeric-light: #fef08a;
    --gold-gradient: linear-gradient(135deg, #fff7ed 0%, #fef08a 25%, #f59e0b 55%, #d97706 85%, #b45309 100%);
    --gold-foil: linear-gradient(135deg, #fef3c7 0%, #fde047 30%, #f59e0b 60%, #fbbf24 85%, #d97706 100%);
    --maroon-velvet: linear-gradient(160deg, #1b0106 0%, #2f030b 40%, #4a0512 85%, #30020a 100%);
    --rangoli-orange: #ea580c;
    --rangoli-green: #059669;
    --rangoli-blue: #0284c7;
    --silver-main: #94a3b8;
    --silver-light: #f8fafc;
    --silver-border: #cbd5e1;
    --bg-warm: #faf7f2;
    --bg-pearl: #faf7f2;
    --card-bg: rgba(255, 255, 255, 0.98);
    --text-dark: #1e1b18;
    --text-muted: #57534e;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-soft: 0 4px 20px rgba(42, 3, 9, 0.06);
    --shadow-gold: 0 8px 28px rgba(217, 119, 6, 0.22);
    --shadow-bold: 0 14px 40px rgba(0, 0, 0, 0.14);
    --luxury-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 10px 25px -4px rgba(42, 3, 9, 0.06), 0 0 0 1px rgba(245, 158, 11, 0.12);
    --luxury-shadow-hover: 0 14px 35px -4px rgba(42, 3, 9, 0.14), 0 0 0 1.5px rgba(245, 158, 11, 0.42);
}

html {
    overflow-x: hidden;
    max-width: 100vw;
    scroll-behavior: smooth;
}

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

body.festive-theme {
    font-family: 'Outfit', 'Poppins', 'Noto Sans Telugu', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background-color: var(--bg-pearl);
    background-image: 
        radial-gradient(ellipse at 15% 15%, rgba(245, 158, 11, 0.09) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 25%, rgba(74, 5, 17, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 75%, rgba(245, 158, 11, 0.06) 0%, transparent 60%);
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Top Emergency / Priority Banner
   -------------------------------------------------------------------------- */
.emergency-banner {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.4);
    animation: pulseAlert 2s infinite alternate;
}
.emergency-banner.priority-mode {
    background: linear-gradient(135deg, #d97706, #b45309);
    animation: none;
}
@keyframes pulseAlert {
    0% { opacity: 0.95; }
    100% { opacity: 1; filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.7)); }
}
.banner-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.banner-icon { font-size: 1.5rem; }
.banner-text { flex: 1; font-weight: 600; font-size: 0.95rem; }
.banner-telugu { display: block; font-family: 'Noto Sans Telugu'; }
.banner-english { font-size: 0.85rem; opacity: 0.9; }
.banner-close {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    font-size: 1.1rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.main-header {
    background: linear-gradient(165deg, #1b0106 0%, #2f030b 40%, #4a0512 85%, #30020a 100%);
    color: #ffffff;
    padding: 16px 20px 12px 20px;
    box-shadow: 0 10px 35px rgba(27, 1, 6, 0.45);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #b45309 0%, #fde047 30%, #f59e0b 50%, #fde047 70%, #b45309 100%) 1;
    position: relative;
    overflow: hidden;
}

/* Background Muggu / Rangoli Pattern Overlay */
.header-muggu-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.28;
    background-image: radial-gradient(circle at 50% 50%, rgba(254, 240, 138, 0.5) 0%, transparent 75%);
}

.muggu-pattern {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Corner Rangoli Mandalas */
.corner-muggu {
    position: absolute;
    width: 160px;
    height: 160px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.22;
    animation: slowRotateMuggu 60s linear infinite;
}
.corner-muggu.left { top: -35px; left: -35px; }
.corner-muggu.right { top: -35px; right: -35px; animation-direction: reverse; }

@keyframes slowRotateMuggu {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Top Toranam (Mango Leaves & Marigold Garland - 100% full width across entire screen) */
.header-toranam {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 18px;
    z-index: 3;
    pointer-events: none;
}

.header-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 1400px;
    margin: 0 auto 10px auto;
    padding: 6px 12px 2px 12px;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.brand-group {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 22px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

/* Festive Mascot SVGs (Sugarcane Pot & Bhogi Mantalu) */
.festive-mascot {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
    transition: transform 0.3s ease;
    animation: subtleFloat 3.5s ease-in-out infinite alternate;
}
.festive-mascot.left-mascot {
    animation-delay: 0s;
}
.festive-mascot.right-mascot {
    animation-delay: 1.5s;
}
.festive-mascot:hover {
    transform: scale(1.1) rotate(2deg);
}

.sugarcane-mascot {
    width: 105px;
    height: 115px;
}

.bhogi-mascot {
    width: 110px;
    height: 115px;
    filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.65)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
    transition: transform 0.3s ease;
    animation: flameFlicker 2.8s infinite alternate ease-in-out;
}

@keyframes flameFlicker {
    0%, 100% { filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.65)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)); }
    50% { filter: drop-shadow(0 0 24px rgba(234, 88, 12, 0.9)) drop-shadow(0 0 10px rgba(254, 240, 138, 0.8)); }
}

.gangireddu-mascot {
    width: 105px;
    height: 105px;
}
.rangoli-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
    animation: subtleFloat 3s ease-in-out infinite alternate;
}
@keyframes subtleFloat {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}
.title-wrap {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.header-badge-row {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}
.festive-mini-badge {
    background: linear-gradient(135deg, rgba(254, 240, 138, 0.22) 0%, rgba(245, 158, 11, 0.15) 100%);
    border: 1px solid rgba(250, 204, 21, 0.7);
    color: #fef08a;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.title-wrap .main-title {
    font-size: clamp(2rem, 3.2vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -0.3px;
    font-family: 'Noto Sans Telugu', 'Cinzel', 'Poppins', sans-serif;
    line-height: 1.25;
    margin: 5px 0 3px 0;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #fef08a 25%, #f59e0b 55%, #fbbf24 80%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(245, 158, 11, 0.35));
}
.title-wrap .sub-title {
    font-size: 0.98rem;
    font-weight: 500;
    color: #fef3c7;
    opacity: 0.95;
    margin-top: 2px;
    text-align: center;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}
.lang-toggle, .kiosk-launch-btn, .dates-config-btn {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1.2px solid rgba(250, 204, 21, 0.6);
    color: #ffffff;
    padding: 7px 16px;
    border-radius: 22px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
}
.lang-toggle:hover, .kiosk-launch-btn:hover, .dates-config-btn:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #2a0309;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5), inset 0 1px 0 #ffffff;
    text-shadow: none;
}
.kiosk-launch-btn {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.45) 100%);
    border: 1.5px solid #fde047;
    color: #fef08a;
}
.broadcast-trigger-btn {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(185, 28, 28, 0.35) 100%);
    border: 1.2px solid #f87171;
    color: #fef2f2;
    padding: 7px 16px;
    border-radius: 22px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.22s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
}
.broadcast-trigger-btn:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border-color: #fef08a;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.55);
}
.broadcast-trigger-btn:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border-color: #fef08a;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
}
.broadcast-trigger-btn.active-alert {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border-color: #fef08a;
    color: #ffffff;
    animation: alertBtnPulse 1.8s infinite;
}
@keyframes alertBtnPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(239, 68, 68, 0.6); }
    50% { box-shadow: 0 0 18px rgba(239, 68, 68, 0.9), 0 0 4px #ffffff; }
}

@media (max-width: 600px) {
    .main-header {
        padding: 8px 10px 8px 10px;
    }
    .header-top {
        padding: 4px 6px;
        gap: 6px;
    }
    .brand-group {
        gap: 8px;
    }
    .sugarcane-mascot {
        width: 58px;
        height: 64px;
    }
    .bhogi-mascot {
        width: 62px;
        height: 66px;
    }
    .corner-muggu {
        width: 90px;
        height: 90px;
    }
    .rangoli-icon {
        font-size: 1.4rem;
    }
    .title-wrap .main-title {
        font-size: clamp(1.3rem, 5vw, 1.55rem);
    }
    .title-wrap .sub-title {
        font-size: 0.78rem;
    }
    .header-controls {
        gap: 6px;
    }
    .lang-toggle, .kiosk-launch-btn, .dates-config-btn, .admin-mode-btn, .broadcast-trigger-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    .nav-bar {
        border-radius: 20px;
        padding: 3px 5px;
        margin: 6px auto 2px auto;
    }
    .nav-item {
        padding: 5px 11px;
        font-size: 0.78rem;
        border-radius: 16px;
        gap: 4px;
    }
    .content-container {
        padding: 0 8px;
    }
    .modal-overlay {
        padding: 10px;
    }
    .modal-dialog {
        padding: 16px 12px;
    }
}

/* Nav Bar Festive Dock & Glowing Capsule Buttons */
.nav-bar {
    max-width: 1400px;
    margin: 10px auto 6px auto;
    background: rgba(22, 2, 7, 0.88);
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 32px;
    padding: 6px 10px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px) saturate(180%);
}
.nav-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 4px 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-main) rgba(0, 0, 0, 0.3);
    -webkit-overflow-scrolling: touch;
}
.nav-scroll::-webkit-scrollbar { height: 4px; }
.nav-scroll::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 4px; }
.nav-scroll::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #f59e0b, #fbbf24); border-radius: 4px; }

.nav-item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(254, 240, 138, 0.35);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: 'Outfit', 'Poppins', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 7px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}
.nav-item:hover:not(.active) {
    color: #fef08a;
    background: linear-gradient(180deg, rgba(254, 240, 138, 0.28) 0%, rgba(245, 158, 11, 0.18) 100%);
    border-color: #fde047;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}
.nav-item.active {
    background: linear-gradient(135deg, #fff7ed 0%, #fef08a 25%, #f59e0b 55%, #d97706 100%) !important;
    color: #2a0309 !important;
    border: 1.5px solid #ffffff !important;
    font-weight: 800;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.65), inset 0 1px 0 #ffffff !important;
    transform: translateY(-1px) scale(1.02);
    text-shadow: none;
}

/* --------------------------------------------------------------------------
   Layout & Tabs
   -------------------------------------------------------------------------- */
.app-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.content-container {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 8px auto 20px auto;
    padding: 0 16px;
}

/* --------------------------------------------------------------------------
   Festive Toranam Garland (Compact Decorative Trim)
   -------------------------------------------------------------------------- */
.toranam-garland {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px 4px 10px;
    font-size: 0.95rem;
    user-select: none;
    opacity: 0.85;
    border-bottom: 1px dashed rgba(245, 158, 11, 0.3);
    margin-bottom: 8px;
    overflow: hidden;
    height: 20px;
}
.garland-item {
    display: inline-block;
    transition: transform 0.3s ease;
    animation: toranamSway 3s ease-in-out infinite alternate;
}
.garland-item:nth-child(even) {
    animation-delay: 0.5s;
    animation-duration: 2.7s;
}
.garland-item:nth-child(3n) {
    animation-delay: 1s;
    animation-duration: 3.2s;
}
.garland-item.floral {
    font-size: 0.95rem;
    filter: drop-shadow(0 1px 3px rgba(245, 158, 11, 0.3));
}
@keyframes toranamSway {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(2px) rotate(3deg); }
    100% { transform: translateY(0) rotate(-3deg); }
}

/* --------------------------------------------------------------------------
   Festival Highlight Pulse Strip (Compact Quick Navigator)
   -------------------------------------------------------------------------- */
.festival-pulse-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.pulse-card {
    flex: 1;
    min-width: 160px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(74, 5, 17, 0.04);
}
.pulse-card:hover {
    transform: translateY(-2px);
    background: #ffffff;
    border-color: var(--gold-main);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.18);
}
.pulse-card.active-pulse {
    border-color: var(--gold-main);
    background: linear-gradient(135deg, rgba(255, 253, 245, 0.98), #ffffff);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}
.pulse-icon-box {
    font-size: 1.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-warm);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    flex-shrink: 0;
}
.pulse-icon-box.gold-glow-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: var(--gold-main);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.35);
}
.pulse-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.pulse-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.1;
}
.pulse-val {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--maroon-deep);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* --------------------------------------------------------------------------
   Elite Patrons Spotlight Carousel (Compact Dashboard Spotlight)
   -------------------------------------------------------------------------- */
.patrons-spotlight-carousel {
    background: linear-gradient(135deg, #2b040c 0%, #460614 45%, #61091b 100%);
    border: 2.5px solid #f59e0b;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    box-shadow: 0 10px 30px rgba(43, 4, 12, 0.35), 0 0 24px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(254, 240, 138, 0.35);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.patrons-spotlight-carousel.collapsed .carousel-body-wrap {
    max-height: 0;
    opacity: 0;
    padding: 0;
    overflow: hidden;
}
.carousel-header {
    background: linear-gradient(90deg, #1d0208 0%, #3e0511 50%, #1d0208 100%);
    color: #ffffff;
    padding: 8px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f59e0b;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.carousel-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.live-pulse-badge {
    background: rgba(34, 197, 94, 0.25);
    border: 1px solid #22c55e;
    color: #4ade80;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.6px;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}
.pulse-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
}
@keyframes livePulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; filter: drop-shadow(0 0 4px #22c55e); }
    100% { transform: scale(0.9); opacity: 0.8; }
}
.carousel-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: #fef08a;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Sans Telugu', 'Poppins', sans-serif;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.carousel-badge-tag {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.4));
    border: 1px solid #facc15;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    color: #fef08a;
    letter-spacing: 0.5px;
}
.carousel-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.gold-sm-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 5px 14px;
    border: 1.5px solid #fef08a;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.5);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.gold-sm-btn:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.65);
}
.carousel-toggle-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(254, 240, 138, 0.4);
    color: #fef08a;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    transition: all 0.2s ease;
}
.carousel-toggle-btn:hover {
    background: rgba(245, 158, 11, 0.35);
    border-color: #f59e0b;
}

.carousel-body-wrap {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 260px;
    opacity: 1;
}
.carousel-track-viewport {
    position: relative;
    padding: 10px 48px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.12) 0%, transparent 75%);
}
.carousel-track {
    width: 100%;
}
.patron-slide {
    display: none;
    width: 100%;
    animation: slideFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.patron-slide.active {
    display: block;
}
@keyframes slideFadeIn {
    from { opacity: 0; transform: translateY(6px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.slide-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    position: relative;
    width: 100%;
    transition: all 0.2s ease;
}
.slide-card-inner.silver-glow {
    border: 2px solid #94a3b8;
    border-left: 6px solid #475569;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #e2e8f0 100%);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 14px rgba(148, 163, 184, 0.25);
}
.slide-card-inner.gold-glow {
    border: 2px solid #f59e0b;
    border-left: 6px solid #d97706;
    background: linear-gradient(135deg, #ffffff 0%, #fffdf2 55%, #fef3c7 100%);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), 0 0 18px rgba(245, 158, 11, 0.35);
}
.slide-emblem-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: auto;
}
.slide-avatar-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    background: #ffffff;
}
.slide-avatar-wrap.gold-avatar {
    border: 2.5px solid #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}
.slide-avatar-wrap.silver-avatar {
    border: 2.5px solid #94a3b8;
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.4);
}
.slide-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.slide-emblem {
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
.slide-tier-tag {
    font-size: 0.74rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
}
.silver-tag {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #1e293b;
    border: 1.5px solid #94a3b8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}
.gold-tag {
    background: linear-gradient(135deg, #fef08a, #fde047);
    color: #713f12;
    border: 1.5px solid #ca8a04;
    box-shadow: 0 1px 6px rgba(202, 138, 4, 0.3);
    animation: goldShine 2s infinite alternate;
}
@keyframes goldShine {
    0% { box-shadow: 0 0 4px rgba(245, 158, 11, 0.3); }
    100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.7); }
}

.slide-details {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 14px;
}
.slide-patron-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #4a0410;
    margin-bottom: 0;
    font-family: 'Noto Sans Telugu', 'Poppins', sans-serif;
    white-space: normal;
    word-break: break-word;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.gold-shimmer-text {
    background: linear-gradient(135deg, #92400e 0%, #d97706 50%, #78350f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}
.slide-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0;
}
.slide-branch {
    font-weight: 700;
    color: #1e293b;
}
.slide-amount {
    background: #fef3c7;
    border: 1.5px solid #d97706;
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.85rem;
    color: #92400e;
    box-shadow: 0 1px 4px rgba(217, 119, 6, 0.15);
}
.slide-status {
    font-size: 0.8rem;
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #16a34a;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.slide-citation {
    background: rgba(254, 243, 199, 0.95);
    border: 1.5px solid #f59e0b;
    border-radius: 6px;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #78350f;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
    margin-left: auto;
    font-style: italic;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}
.silver-slide .slide-citation {
    background: rgba(241, 245, 249, 0.95);
    border: 1.5px solid #94a3b8;
    color: #1e293b;
    box-shadow: 0 2px 6px rgba(148, 163, 184, 0.15);
}
.slide-action-btn {
    margin-left: auto;
    font-size: 0.78rem;
    padding: 5px 12px;
    white-space: nowrap;
}

/* Nav Buttons (Left/Right) */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: 2px solid #fef08a;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 10px rgba(245, 158, 11, 0.6);
    transition: all 0.2s ease;
    z-index: 5;
}
.carousel-nav-btn:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #451a03;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 14px rgba(245, 158, 11, 0.8);
}
.carousel-nav-btn.prev-btn { left: 8px; }
.carousel-nav-btn.next-btn { right: 8px; }

/* Carousel Footer Bar (Dots & Counter) */
.carousel-footer-bar {
    background: rgba(20, 2, 6, 0.78);
    border-top: 1.5px solid rgba(245, 158, 11, 0.35);
    padding: 5px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.carousel-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
}
.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(245, 158, 11, 0.6);
    cursor: pointer;
    transition: all 0.25s ease;
}
.carousel-dot.active {
    width: 22px;
    border-radius: 8px;
    background: #f59e0b;
    box-shadow: 0 0 10px #f59e0b, 0 0 4px #ffffff;
    border-color: #fef08a;
}
.carousel-controls-sub {
    display: flex;
    align-items: center;
    gap: 10px;
}
.carousel-play-btn {
    background: none;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.85;
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6));
    transition: all 0.2s ease;
}
.carousel-play-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}
.carousel-counter {
    font-size: 0.76rem;
    font-weight: 800;
    color: #fef08a;
    letter-spacing: 0.5px;
}
.carousel-loading {
    text-align: center;
    padding: 16px;
    color: #fef08a;
    font-weight: 700;
    font-size: 0.88rem;
}

/* Mobile responsive for carousel */
@media (max-width: 768px) {
    .carousel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px 12px;
    }
    .carousel-title-group {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
    }
    .carousel-title {
        font-size: clamp(0.92rem, 3.8vw, 1.05rem);
        line-height: 1.3;
        flex: 1;
        min-width: 0;
    }
    .carousel-badge-tag {
        display: none; /* Hide subtitle badge on mobile screens to save space */
    }
    .carousel-top-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
    }
    .gold-sm-btn {
        font-size: 0.74rem;
        padding: 5px 10px;
        flex: 1;
        justify-content: center;
        white-space: nowrap;
    }
    .carousel-toggle-btn {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }
    .carousel-body-wrap {
        max-height: none !important;
        overflow: visible;
    }
    .patrons-spotlight-carousel.collapsed .carousel-body-wrap {
        max-height: 0 !important;
        overflow: hidden;
        padding: 0;
    }
    .carousel-track-viewport {
        padding: 8px 36px;
        min-height: unset;
    }
    .slide-card-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        gap: 8px;
        padding: 10px 12px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }
    .slide-emblem-wrap {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    .slide-details {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .slide-patron-name {
        white-space: normal !important;
        word-break: break-word;
        font-size: 1.05rem;
        line-height: 1.35;
        width: 100%;
    }
    .slide-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        font-size: 0.76rem;
        width: 100%;
        justify-content: flex-start;
    }
    .slide-citation {
        width: 100%;
        box-sizing: border-box;
        white-space: normal;
        word-break: break-word;
        margin: 4px 0 0 0;
        font-size: 0.78rem;
        line-height: 1.35;
        text-align: left;
        justify-content: flex-start;
    }
    .slide-action-btn {
        margin: 4px 0 0 0;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .slide-invite-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 6px;
    }
    .slide-invite-actions .festive-btn {
        font-size: 0.76rem !important;
        padding: 4px 8px !important;
        flex: 1;
        min-width: 120px;
        text-align: center;
        justify-content: center;
    }
    .carousel-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    .carousel-nav-btn.prev-btn { left: 4px; }
    .carousel-nav-btn.next-btn { right: 4px; }
    .carousel-footer-bar {
        padding: 5px 10px;
    }
    .carousel-indicators {
        max-width: 62%;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 4px;
        padding: 2px 0;
    }
    .carousel-indicators::-webkit-scrollbar {
        display: none;
    }
    .carousel-dot {
        width: 6px;
        height: 6px;
        flex-shrink: 0;
    }
    .carousel-dot.active {
        width: 16px;
        border-radius: 6px;
    }
    .carousel-counter {
        font-size: 0.72rem;
    }
    .carousel-play-btn {
        font-size: 0.8rem;
    }
}
.tab-pane {
    display: none;
    animation: fadeIn 0.25s ease-out;
}
.tab-pane.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, rgba(217, 119, 6, 0.4) 0%, rgba(245, 158, 11, 0.8) 25%, rgba(254, 240, 138, 0.4) 60%, transparent 100%) 1;
    padding-bottom: 10px;
}
.section-header-row h2 {
    font-size: 1.38rem;
    color: #2a0309;
    font-weight: 800;
    font-family: 'Cinzel', 'Noto Sans Telugu', serif;
    letter-spacing: 0.2px;
}
.section-desc {
    color: #64748b;
    font-size: 0.84rem;
    margin-top: 2px;
    font-weight: 500;
}
.action-btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Festive Buttons (Super Rich Pill Style) */
.festive-btn {
    padding: 7px 18px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 0.84rem;
    font-family: 'Outfit', 'Noto Sans Telugu', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    letter-spacing: 0.2px;
}
.festive-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.gold-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    color: #ffffff;
    border: 1px solid rgba(254, 240, 138, 0.5);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.gold-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #b45309 100%);
    box-shadow: 0 6px 22px rgba(245, 158, 11, 0.52), inset 0 1px 0 #ffffff;
}
.green-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: #ffffff;
    border: 1px solid rgba(167, 243, 208, 0.5);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.green-btn:hover {
    background: linear-gradient(135deg, #34d399 0%, #059669 60%, #065f46 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}
.red-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
    color: #ffffff;
    border: 1px solid rgba(254, 202, 202, 0.4);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

/* Day & Category Filter Bars (Luxury Segmented Capsule Bar) */
.day-filter-bar, .category-pills, .contests-filter-bar, .candid-tags-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding: 4px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03), inset 0 1px 2px rgba(0, 0, 0, 0.02);
}
.schedule-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.schedule-view-toggle {
    display: inline-flex;
    background: rgba(241, 245, 249, 0.9);
    border-radius: 24px;
    padding: 3px;
    border: 1px solid #cbd5e1;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}
.view-toggle-pill {
    background: transparent;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.view-toggle-pill:hover {
    color: #2a0309;
}
.view-toggle-pill.active {
    background: linear-gradient(135deg, #3d050f 0%, #6e1021 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(61, 5, 15, 0.3);
}

.day-pill, .cat-pill {
    background: transparent;
    border: 1px solid transparent;
    color: #4a0511;
    padding: 6px 14px;
    border-radius: 22px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'Outfit', 'Noto Sans Telugu', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.22s ease;
}
.day-pill:hover, .cat-pill:hover {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(254, 243, 199, 0.5);
    color: #2a0309;
    transform: translateY(-1px);
}
.day-pill.active, .cat-pill.active {
    background: linear-gradient(135deg, #2a0309 0%, #4a0511 60%, #6e1021 100%);
    color: #fef08a !important;
    border: 1px solid #fde047;
    box-shadow: 0 3px 12px rgba(42, 3, 9, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* KPI Counters (Luxury Executive Metric Tiles) */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.kpi-card {
    background: linear-gradient(145deg, #ffffff 0%, #fffdfa 100%);
    padding: 12px 16px;
    border-radius: 16px;
    box-shadow: 0 4px 15px -2px rgba(42, 3, 9, 0.05), 0 0 0 1px rgba(245, 158, 11, 0.16);
    display: flex;
    flex-direction: column;
    position: relative;
    border-top: 3.5px solid #2a0309;
    transition: all 0.25s ease;
}
.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px -2px rgba(42, 3, 9, 0.12), 0 0 0 1.5px rgba(245, 158, 11, 0.35);
}
.kpi-card.gold-border { border-top-color: #f59e0b; }
.kpi-card.green-border { border-top-color: #10b981; }
.kpi-card.amber-border { border-top-color: #d97706; }
.kpi-card.purple-border { border-top-color: #8b5cf6; }
.kpi-icon { font-size: 1.3rem; margin-bottom: 4px; }
.kpi-num {
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2a0309 0%, #5c0717 50%, #92400e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    letter-spacing: -0.5px;
}
.kpi-label { font-size: 0.76rem; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 3px; }

/* --------------------------------------------------------------------------
   Cards: Schedule, Games, Food, Cultural (Super Rich High-End Hospitality Design)
   -------------------------------------------------------------------------- */
.timeline-container, .games-grid, .food-grid, .cultural-grid, .committee-grid, .wishes-grid, .contests-grid {
    display: grid;
    gap: 14px;
}
.timeline-container { grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); }
.games-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.food-grid { grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); }
.cultural-grid { grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); }
.committee-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.wishes-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.contests-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.festive-card {
    background: linear-gradient(180deg, #ffffff 0%, #fffdfa 100%);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02), 0 8px 24px -4px rgba(42, 3, 9, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-top: 3.5px solid #f59e0b;
    position: relative;
    transition: all 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
.festive-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -4px rgba(42, 3, 9, 0.14), 0 0 0 1.5px rgba(245, 158, 11, 0.45);
    border-color: #f59e0b;
}
.festive-card.completed-card {
    border-left: 4px solid #10b981;
}
.festive-card.pending-card {
    border-left: 4px solid #f59e0b;
}
.card-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.76rem;
}
.tag-badge {
    padding: 3px 9px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.badge-game { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-food { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-cultural { background: #fdf2f8; color: #be185d; border: 1px solid #fbcfe8; }
.badge-ceremony { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.status-pill {
    padding: 3px 9px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 700;
}
.status-completed { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.status-pending { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #2a0309;
    margin-bottom: 6px;
    line-height: 1.3;
    font-family: 'Outfit', 'Noto Sans Telugu', sans-serif;
}
.card-desc {
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.5;
    margin-bottom: 10px;
    flex: 1;
}
.card-coordinator-badge {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
    margin-top: auto;
}
.phone-dial-link {
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 3px 9px;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.74rem;
    transition: all 0.2s ease;
}
.phone-dial-link:hover {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.3);
}

/* Committee Numbered Members & Cards */
.committee-card {
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-top: 4px solid var(--turmeric);
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--luxury-shadow);
    display: flex;
    flex-direction: column;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.committee-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--luxury-shadow-hover);
    border-color: var(--turmeric);
}
.committee-members-wrap {
    margin: 10px 0;
    padding: 10px 12px;
    background: linear-gradient(135deg, #fffcf6 0%, #fef8ee 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 12px;
}
.committee-members-heading {
    font-size: 0.76rem;
    font-weight: 800;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.committee-members-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.committee-member-row {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #ffffff;
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}
.committee-member-row:hover {
    border-color: var(--turmeric);
    background: #fffdfa;
    transform: translateX(3px);
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.12);
}
.committee-num-badge {
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: linear-gradient(135deg, #d97706, #92400e);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(180, 83, 9, 0.35);
}
.committee-member-name {
    font-size: 0.94rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
}
.committee-duty-box {
    margin: 8px 0 12px 0;
    font-size: 0.82rem;
    color: #334155;
    line-height: 1.4;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-left: 3.5px solid #2563eb;
    padding: 8px 10px;
    border-radius: 8px;
}
.committee-duty-label {
    font-weight: 800;
    color: #1e3a8a;
    margin-right: 5px;
}

/* Schedule Interactive Tiles */
.festive-card.schedule-card-tile {
    cursor: pointer;
    border: 1px solid rgba(245, 158, 11, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.festive-card.schedule-card-tile:hover {
    transform: translateY(-3px);
    border-color: var(--gold-main);
    box-shadow: 0 6px 16px rgba(180, 83, 9, 0.18);
}
.tile-detail-hint {
    margin-top: 8px;
    padding: 5px 8px;
    background: #fffbeb;
    border: 1px dashed #fde68a;
    border-radius: var(--radius-sm);
    color: #b45309;
    font-size: 0.74rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}
.festive-card.schedule-card-tile:hover .tile-detail-hint {
    background: var(--maroon-main);
    border-color: var(--maroon-main);
    color: #ffffff;
}

/* Full List View Mode */
.timeline-container.list-mode {
    grid-template-columns: 1fr !important;
    gap: 14px;
}
.festive-card.detailed-list-card {
    border-left: 5px solid var(--maroon-main);
    padding: 14px 16px;
}
.detailed-list-card .inline-agenda-container {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

/* Schedule Time-Table Mode (Full Width, No Cramped Boxes) */
.timeline-container.table-mode {
    display: block !important;
    width: 100% !important;
    grid-template-columns: none !important;
}
.timetable-master-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.timetable-day-section {
    background: #ffffff;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 6px rgba(74, 5, 17, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.25);
    overflow: hidden;
    width: 100%;
}
.timetable-day-header {
    background: linear-gradient(135deg, var(--maroon-main), var(--maroon-deep));
    color: #ffffff;
    padding: 8px 14px;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--gold-main);
}
.day-events-count {
    font-size: 0.76rem;
    background: rgba(255, 255, 255, 0.18);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}
.schedule-table-wrap {
    width: 100%;
    overflow-x: auto;
}
.festive-timetable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.86rem;
    text-align: left;
}
.festive-timetable th {
    background: linear-gradient(135deg, #1f0207 0%, #3d030c 100%);
    color: #fef08a;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 2px solid var(--gold-main);
    font-family: 'Outfit', sans-serif;
}
.festive-timetable th.col-time { width: 170px; }
.festive-timetable th.col-incharge { width: 180px; }
.festive-timetable th.col-action { width: 120px; }
.festive-timetable td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}
.festive-timetable tbody tr {
    transition: all 0.15s ease;
    cursor: pointer;
}
.festive-timetable tbody tr:hover {
    background: #fefce8;
}
.festive-timetable tbody tr:nth-child(even) {
    background: #fcfbfa;
}
.festive-timetable tbody tr:nth-child(even):hover {
    background: #fefce8;
}
.time-slot-badge {
    font-weight: 800;
    color: #92400e;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.76rem;
    white-space: nowrap;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(180, 83, 9, 0.08);
}
.timetable-prog-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: #2a0309;
    line-height: 1.3;
    font-family: 'Outfit', 'Noto Sans Telugu', sans-serif;
}
.timetable-prog-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    flex-wrap: wrap;
}
.timetable-venue-tag {
    font-size: 0.76rem;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}
.timetable-notes-text {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.4;
}
.timetable-action-btn {
    font-size: 0.74rem;
    padding: 4px 10px;
    width: 100%;
    justify-content: center;
}

/* Responsive Timetable on Mobile Screens */
@media (max-width: 768px) {
    .festive-timetable, .festive-timetable tbody, .festive-timetable tr, .festive-timetable td {
        display: block;
        width: 100%;
    }
    .festive-timetable thead {
        display: none;
    }
    .festive-timetable tr {
        padding: 10px 12px;
        border-bottom: 1px solid #e2e8f0;
        position: relative;
    }
    .festive-timetable td {
        padding: 4px 0;
        border: none;
    }
    .festive-timetable td.col-time {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
    }
    .festive-timetable td.col-action {
        display: flex;
        gap: 8px;
        margin-top: 8px;
        padding-top: 6px;
        border-top: 1px dashed #cbd5e1;
    }
    .festive-timetable td.col-action .timetable-action-btn {
        flex: 1;
        margin-top: 0 !important;
    }
}

/* --------------------------------------------------------------------------
   GAMES & CONTESTS LIST/TABLE VIEW
   -------------------------------------------------------------------------- */
.games-container.table-mode {
    display: block !important;
    width: 100% !important;
    grid-template-columns: none !important;
}
.games-container.tiles-mode {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)) !important;
    gap: 10px;
}
.games-controls-bar {
    margin-bottom: 10px;
}
.games-master-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.games-day-section {
    background: #ffffff;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 6px rgba(74, 5, 17, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.25);
    overflow: hidden;
    width: 100%;
}
.games-day-header {
    background: linear-gradient(135deg, var(--maroon-main), var(--maroon-deep));
    color: #ffffff;
    padding: 8px 14px;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--gold-main);
}
.games-table-wrap {
    width: 100%;
    overflow-x: auto;
}
.festive-games-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
    text-align: left;
}
.festive-games-table th {
    background: #f8fafc;
    color: #475569;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}
.festive-games-table th.col-sno { width: 45px; text-align: center; }
.festive-games-table th.col-time { width: 170px; }
.festive-games-table th.col-incharge { width: 180px; }
.festive-games-table th.col-status { width: 180px; }
.festive-games-table th.col-action { width: 150px; text-align: center; }

.festive-games-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}
.festive-games-table tbody tr {
    transition: background 0.15s ease;
}
.festive-games-table tbody tr:hover {
    background: #fffbeb;
}
.festive-games-table tbody tr:nth-child(even) {
    background: #fafafa;
}
.festive-games-table tbody tr:nth-child(even):hover {
    background: #fffbeb;
}

.game-row-sno {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-main));
    color: #78350f;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    margin: 0 auto;
    border: 1px solid #f59e0b;
}
.game-table-time-badge {
    font-weight: 700;
    color: #92400e;
    background: #fef3c7;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.78rem;
    white-space: nowrap;
    display: inline-block;
}
.game-table-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--maroon-deep);
    line-height: 1.3;
}
.game-table-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.game-table-prop {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 3px;
    line-height: 1.35;
}
.game-table-coord-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
}
.table-winners-mini {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 4px 8px;
    margin-top: 4px;
    font-size: 0.76rem;
    color: #166534;
    line-height: 1.4;
}
.table-action-btn-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

/* Responsive Games Table on Mobile Screens */
@media (max-width: 768px) {
    .festive-games-table, .festive-games-table tbody, .festive-games-table tr, .festive-games-table td {
        display: block;
        width: 100%;
    }
    .festive-games-table thead {
        display: none;
    }
    .festive-games-table tr {
        padding: 10px 12px;
        border-bottom: 1px solid #e2e8f0;
        position: relative;
        background: #ffffff;
    }
    .festive-games-table td {
        padding: 4px 0;
        border: none;
    }
    .festive-games-table td.col-sno {
        display: inline-block;
        width: auto;
        margin-right: 6px;
    }
    .festive-games-table td.col-time {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
    }
    .festive-games-table td.col-action {
        margin-top: 8px;
        padding-top: 6px;
        border-top: 1px dashed #cbd5e1;
    }
    .festive-games-table td.col-action .table-action-btn-group {
        flex-direction: row;
        width: 100%;
    }
    .festive-games-table td.col-action .festive-btn {
        flex: 1;
        width: auto !important;
    }
}

/* Winners Box (Celebratory & Royal) */
.winners-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #fefce8 100%);
    border: 1px solid #86efac;
    border-left: 4px solid #16a34a;
    border-radius: 10px;
    padding: 7px 10px;
    margin: 6px 0 8px 0;
    font-size: 0.8rem;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.08);
}
.winner-line {
    margin: 3px 0;
    font-weight: 700;
    color: #14532d;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Sound Deck */
.sound-deck {
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-top: 10px;
}
.sound-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sound-controls button {
    background: var(--maroon-main);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
.track-info { font-size: 0.8rem; color: #831843; font-weight: 600; margin-bottom: 6px; }

/* --------------------------------------------------------------------------
   Patrons: Gold & Silver Circle
   -------------------------------------------------------------------------- */
.patron-tier-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
}
.gold-tier-box {
    border: 2px solid var(--gold-main);
    background: linear-gradient(180deg, #fffdf5 0%, #ffffff 100%);
}
.silver-tier-box {
    border: 2px solid var(--silver-border);
}
.tier-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.tier-badge-icon { font-size: 2.2rem; }
.tier-title { font-size: 1.35rem; font-weight: 800; color: var(--maroon-deep); }
.tier-subtitle { font-size: 0.88rem; color: var(--text-muted); }

/* Motivating Gold Empty Invite */
.gold-empty-invite {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.5), rgba(253, 230, 138, 0.3));
    border: 2px dashed var(--gold-main);
    border-radius: var(--radius-md);
}
.gold-empty-invite .crown-icon { font-size: 3rem; margin-bottom: 8px; animation: bounceCrown 2s infinite; }
@keyframes bounceCrown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.gold-empty-invite h4 { font-size: 1.2rem; color: var(--gold-deep); margin-bottom: 6px; font-weight: 700; }
.gold-empty-invite p { color: var(--text-muted); font-size: 0.92rem; max-width: 600px; margin: 0 auto 16px auto; }

.patron-welcome-notice-card {
    background: linear-gradient(135deg, #fffdf2 0%, #fef3c7 60%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-left: 6px solid #d97706;
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}
.patron-welcome-notice-card .notice-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
    line-height: 1;
}
.patron-welcome-notice-card .notice-content {
    flex: 1;
}
.patron-welcome-notice-card .notice-quote {
    font-size: 1.05rem;
    font-weight: 800;
    color: #78350f;
    letter-spacing: -0.2px;
    margin-bottom: 4px;
    font-style: italic;
}
.patron-welcome-notice-card .notice-telugu {
    font-size: 0.88rem;
    color: #92400e;
    line-height: 1.45;
    margin-bottom: 8px;
    font-family: 'Noto Sans Telugu', 'Poppins', sans-serif;
}
.patron-welcome-notice-card .notice-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
@media (max-width: 600px) {
    .patron-welcome-notice-card {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 12px;
    }
    .patron-welcome-notice-card .notice-actions {
        justify-content: center;
    }
}

.patrons-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.patron-card {
    background: linear-gradient(145deg, #ffffff 0%, #fffdf8 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.28);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 10px 25px -4px rgba(42, 3, 9, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.patron-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px -4px rgba(42, 3, 9, 0.15), 0 0 0 1.5px rgba(245, 158, 11, 0.5);
    border-color: #f59e0b;
}
.patron-card.silver-card { border-top: 4.5px solid var(--silver-main); }
.patron-card.gold-card { border-top: 4.5px solid var(--gold-main); }
.patron-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}
.patron-avatar-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #ffffff;
    transition: transform 0.25s ease;
}
.patron-card:hover .patron-avatar-wrap {
    transform: scale(1.06);
}
.patron-avatar-wrap.gold-avatar {
    border: 3px solid #f59e0b;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
    background: #fffdf0;
}
.patron-avatar-wrap.silver-avatar {
    border: 3px solid #94a3b8;
    box-shadow: 0 0 12px rgba(148, 163, 184, 0.35);
    background: #f8fafc;
}
.patron-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.patron-avatar-emoji {
    font-size: 1.6rem;
    line-height: 1;
}
.patron-card-info {
    flex: 1;
    min-width: 0;
}
.tv-patron-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #cbd5e1;
    box-shadow: 0 0 14px rgba(203, 213, 225, 0.4);
    flex-shrink: 0;
    background: #ffffff;
}
.patron-name { font-size: 1.12rem; font-weight: 800; color: #2a0309; font-family: 'Outfit', 'Noto Sans Telugu', sans-serif; }
.patron-branch { font-size: 0.84rem; color: #64748b; margin-bottom: 8px; font-weight: 500; }
.patron-badge-ribbon {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #cbd5e1;
    color: #1e293b;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.gold-card .patron-badge-ribbon {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    color: #78350f;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* --------------------------------------------------------------------------
   RSVP Layout
   -------------------------------------------------------------------------- */
.rsvp-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}
@media (max-width: 860px) {
    .rsvp-layout { grid-template-columns: 1fr; }
}
.rsvp-form-card, .rsvp-summary-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; color: var(--maroon-deep); }
.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none;
    border-color: var(--gold-main);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.form-row-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}
@media (max-width: 520px) {
    .form-row-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
.rsvp-age-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
@media (max-width: 680px) {
    .rsvp-age-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
.rsvp-age-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-md, 12px);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.rsvp-age-card:focus-within {
    border-color: var(--gold-main);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}
.rsvp-age-icon {
    font-size: 1.6rem;
    margin-bottom: 4px;
    line-height: 1;
}
.rsvp-age-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--maroon-deep);
    margin-bottom: 8px;
    min-height: 38px;
    justify-content: center;
    line-height: 1.25;
    text-align: center;
}
.rsvp-age-label small {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
}
.rsvp-age-input {
    width: 100% !important;
    max-width: 84px;
    height: 42px;
    text-align: center;
    font-size: 1.15rem !important;
    font-weight: 800;
    color: var(--maroon-deep);
    background: #ffffff;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 4px 8px !important;
    box-sizing: border-box !important;
}
.rsvp-age-input:focus {
    outline: none;
    border-color: var(--gold-main) !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25) !important;
}
.checkbox-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.88rem;
    font-weight: 600;
}
.submit-btn { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; }

.rsvp-stats-box {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
}
.stat-item.total-highlight {
    background: var(--gold-light);
    border: 2px solid var(--gold-main);
    font-weight: 800;
    color: var(--maroon-deep);
    font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Tabletop QR Tent Cards
   -------------------------------------------------------------------------- */
.tent-cards-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}
.tent-card-item {
    background: #ffffff;
    border: 2px solid var(--gold-main);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}
.card-header-festive {
    font-weight: 700;
    color: var(--maroon-main);
    font-size: 0.95rem;
    margin-bottom: 8px;
}
.tent-card-item h3 {
    font-size: 1.2rem;
    color: var(--maroon-deep);
    margin-bottom: 16px;
}
.qr-box {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px auto;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-instruction {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Private Finance Vault (Super Rich Executive Swiss Treasury Theme)
   -------------------------------------------------------------------------- */
.finance-vault-wrapper {
    background: linear-gradient(180deg, #ffffff 0%, #fffdfa 100%);
    border-radius: 24px;
    padding: 26px 28px;
    box-shadow: 0 15px 45px -10px rgba(42, 3, 9, 0.12), 0 0 0 1px rgba(217, 119, 6, 0.2);
    border-top: 5px solid #b45309;
    margin-bottom: 24px;
}
.vault-top-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #1f0207 0%, #3d030c 50%, #2a0309 100%);
    border-radius: 18px;
    padding: 18px 24px;
    box-shadow: 0 8px 24px rgba(31, 2, 7, 0.35);
    border: 1px solid rgba(245, 158, 11, 0.4);
    flex-wrap: wrap;
    gap: 16px;
}
.vault-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.vault-lock-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.5));
}
.vault-brand h2 {
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 800;
    font-family: 'Cinzel', 'Noto Sans Telugu', serif;
    margin: 0;
    letter-spacing: 0.2px;
    background: linear-gradient(135deg, #ffffff 0%, #fef08a 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.vault-warning {
    color: #fef08a;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 3px;
    opacity: 0.9;
}

.treasury-kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.treasury-card {
    padding: 20px 22px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.treasury-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
}
.treasury-card .kpi-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
}
.treasury-card .kpi-num {
    font-size: 2.1rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 6px;
}
.treasury-card .kpi-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.35;
}

.treasury-card.in-card {
    background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid #86efac;
    color: #14532d;
}
.treasury-card.in-card .kpi-num { color: #15803d; }
.treasury-card.in-card .kpi-label { color: #166534; }

.treasury-card.out-card {
    background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 100%);
    border: 1.5px solid #fca5a5;
    color: #7f1d1d;
}
.treasury-card.out-card .kpi-num { color: #b91c1c; }
.treasury-card.out-card .kpi-label { color: #991b1b; }

.treasury-card.net-card {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 40%, #fef08a 100%);
    border: 2px solid #f59e0b;
    color: #78350f;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.22);
}
.treasury-card.net-card .kpi-num {
    color: #92400e;
    font-size: 2.3rem;
}
.treasury-card.net-card .kpi-label { color: #92400e; font-weight: 800; }

.treasury-card.dues-card {
    background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%);
    border: 1.5px solid #fdba74;
    color: #7c2d12;
}
.treasury-card.dues-card .kpi-num { color: #c2410c; }
.treasury-card.dues-card .kpi-label { color: #9a3412; }

/* Subtabs Segmented Pill Bar */
.finance-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    background: rgba(241, 245, 249, 0.95);
    padding: 6px;
    border-radius: 18px;
    border: 1px solid #cbd5e1;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    box-sizing: border-box;
}
.subtab-btn {
    background: transparent;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.88rem;
    font-family: 'Outfit', 'Noto Sans Telugu', sans-serif;
    cursor: pointer;
    color: #64748b;
    transition: all 0.22s ease;
    white-space: normal;
    text-align: center;
}
.subtab-btn:hover {
    color: #1e293b;
}
.subtab-btn.active {
    background: linear-gradient(135deg, #1f0207 0%, #4a0511 100%);
    color: #fef08a;
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 4px 12px rgba(31, 2, 7, 0.3);
}

.fin-pane { display: none; }
.fin-pane.active { display: block; animation: modalSlideUp 0.2s ease; }

/* Action Row Alignment Fix */
.fin-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 14px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}
.fin-action-row h3 {
    font-family: 'Cinzel', 'Noto Sans Telugu', serif;
    font-size: 1.18rem;
    font-weight: 800;
    color: #2a0309;
    letter-spacing: 0.2px;
    margin: 0;
}
.fin-btns-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Luxury Finance Ledger Table */
.table-responsive {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 8px;
    border-radius: 14px;
    border: 1px solid rgba(217, 119, 6, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
#fin-subtab-multiyear {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}
.festive-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.86rem;
    background: #ffffff;
}
.festive-table th {
    background: linear-gradient(135deg, #1f0207 0%, #3d030c 100%);
    color: #fef08a;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border: none;
    border-bottom: 2px solid var(--gold-main);
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}
.festive-table td {
    padding: 11px 14px;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}
.festive-table tbody tr {
    transition: all 0.15s ease;
}
.festive-table tbody tr:hover {
    background: #fffbeb !important;
}
.festive-table tbody tr:nth-child(even) {
    background: #fafaf9;
}
.festive-table th.col-num,
.festive-table td.col-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: 'Outfit', sans-serif;
}

/* --------------------------------------------------------------------------
   Finance Vault Analytics, Multi-Year Benchmarks & Charts
   -------------------------------------------------------------------------- */
.fin-benchmark-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.benchmark-kpi-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 18px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}
.benchmark-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.benchmark-kpi-card.gold-border { border-color: #f59e0b; background: linear-gradient(145deg, #ffffff 0%, #fffdf5 100%); }
.benchmark-kpi-card.red-border { border-color: #f87171; background: linear-gradient(145deg, #ffffff 0%, #fffafa 100%); }
.benchmark-kpi-card.amber-border { border-color: #fb923c; background: linear-gradient(145deg, #ffffff 0%, #fffaf5 100%); }
.benchmark-kpi-card.green-border { border-color: #34d399; background: linear-gradient(145deg, #ffffff 0%, #f7fdfa 100%); }

.benchmark-icon { font-size: 1.4rem; margin-bottom: 4px; }
.benchmark-val {
    font-size: 1.65rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #1e293b;
    line-height: 1.15;
    margin-bottom: 4px;
}
.benchmark-kpi-card.gold-border .benchmark-val { color: #b45309; }
.benchmark-kpi-card.red-border .benchmark-val { color: #b91c1c; }
.benchmark-kpi-card.amber-border .benchmark-val { color: #c2410c; }
.benchmark-kpi-card.green-border .benchmark-val { color: #15803d; }
.benchmark-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.4px;
}

.fin-charts-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}
@media (max-width: 900px) {
    .fin-charts-grid-2 { grid-template-columns: 1fr; }
}

.fin-chart-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px;
    border: 1px solid rgba(217, 119, 6, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}
.fin-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 10px;
}
.fin-chart-header h4 {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Outfit', 'Noto Sans Telugu', sans-serif;
}
.fin-chart-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.fin-canvas-wrapper {
    position: relative;
    width: 100%;
    min-height: 260px;
    height: 260px;
}
.donut-canvas-wrap {
    min-height: 220px;
    height: 220px;
}
.fin-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #f1f5f9;
    font-size: 0.76rem;
}
.fin-legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 3px 9px;
    font-weight: 600;
    color: #334155;
}
.fin-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.fin-chart-subtext {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 10px;
    line-height: 1.4;
    font-style: italic;
}

/* 6-Year Historical Archive Accordion & Table */
.historical-archive-container {
    margin-top: 24px;
    background: linear-gradient(180deg, #fefce8 0%, #fffdfa 100%);
    border: 1.5px solid #fde047;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(180, 83, 9, 0.08);
}
.historical-archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(90deg, #fef9c3 0%, #fef08a 100%);
    cursor: pointer;
    border-bottom: 1px solid #fde047;
    transition: background 0.2s ease;
}
.historical-archive-header:hover {
    background: #fef08a;
}
.historical-archive-body {
    padding: 16px 20px 20px 20px;
}
.historical-archive-body.hidden {
    display: none;
}
.archive-table th {
    background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
    color: #fef08a;
    font-size: 0.74rem;
}
.worstcase-intelligence-card {
    background: #1e1b4b;
    border: 1px solid #6366f1;
    border-radius: 14px;
    padding: 16px 20px;
    margin-top: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    color: #e0e7ff;
}
.worstcase-icon {
    font-size: 1.8rem;
    line-height: 1;
}
.worstcase-body h5 {
    margin: 0 0 6px 0;
    color: #fbbf24;
    font-size: 0.95rem;
    font-weight: 700;
}
.worstcase-body p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #cbd5e1;
}
.worstcase-body strong {
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Wishes Admin Approval & Content Moderation Queue
   -------------------------------------------------------------------------- */
.moderation-queue-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px dashed #f59e0b;
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
}
.mod-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #fde68a;
    padding-bottom: 10px;
    margin-bottom: 14px;
}
.mod-badge {
    background: #d97706;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.pending-wishes-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pending-wish-item {
    background: #ffffff;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.pending-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.88rem;
    flex-wrap: wrap;
}
.pending-date { font-size: 0.75rem; color: #64748b; }
.pending-phone { font-size: 0.78rem; color: #0284c7; font-weight: 600; }
.pending-text {
    font-size: 0.92rem;
    color: #1e293b;
    font-style: italic;
    line-height: 1.45;
    margin-bottom: 12px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
}
.pending-actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.delete-icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 4px;
}
.delete-icon-btn:hover {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Big-Screen TV Slideshow Kiosk (STRICT ZERO-SCROLL GUARANTEE)
   -------------------------------------------------------------------------- */
.tv-kiosk-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    background: radial-gradient(circle at center, #180509 0%, #0c0204 100%);
    color: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    box-sizing: border-box;
    overflow: hidden !important; /* Strict zero-scroll guarantee */
    user-select: none;
}
.tv-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 8px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    height: 50px;
    flex-shrink: 0;
    box-sizing: border-box;
}
.tv-brand { display: flex; align-items: center; gap: 10px; }
.tv-brand h2 { font-size: 1.5rem; color: var(--turmeric); font-family: 'Noto Sans Telugu'; margin: 0; }
.tv-status-badge {
    background: var(--gold-main);
    color: var(--maroon-deep);
    padding: 4px 14px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 0.95rem;
}
.tv-clock { font-size: 1.4rem; font-weight: 700; color: #ffffff; font-family: monospace; }
.tv-exit-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 1.2rem;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.tv-exit-btn:hover { background: rgba(239, 68, 68, 0.5); }

/* Glowing Emergency Ticker Bar */
.tv-ticker-bar {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #881337, #991b1b, #881337);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 4px 12px;
    height: 36px;
    margin-bottom: 8px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
    box-sizing: border-box;
}
.tv-ticker-bar.hidden { display: none !important; }
.ticker-badge {
    background: #f59e0b;
    color: #000000;
    font-weight: 800;
    font-size: 0.88rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ticker-marquee {
    display: inline-block;
    white-space: nowrap;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fef08a;
    animation: tvMarqueeScroll 28s linear infinite;
}
@keyframes tvMarqueeScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Strict Zero-Scroll Slide Viewport */
.tv-slide-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
    width: 100%;
    min-height: 0; /* Prevents flex overflow */
    box-sizing: border-box;
}
.tv-slide-content {
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden !important;
    box-sizing: border-box;
    animation: tvSlideFade 0.45s ease-in-out;
}
@keyframes tvSlideFade {
    from { opacity: 0; transform: scale(0.99); }
    to { opacity: 1; transform: scale(1); }
}

/* TV Slide Header Titles */
.tv-slide-header {
    margin-bottom: 10px;
    flex-shrink: 0;
    text-align: center;
}
.tv-slide-h1 {
    font-size: clamp(1.6rem, 2.2vw, 2.3rem);
    font-weight: 800;
    color: #facc15;
    font-family: 'Noto Sans Telugu';
    margin: 0 0 4px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.tv-slide-sub {
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    color: #cbd5e1;
    margin: 0;
}

/* Sized Grid Layouts - Formatted to Fit 100% in Viewport Height */
.tv-grid-3x2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 96%;
    max-width: 1320px;
    max-height: calc(100vh - 195px);
    overflow: hidden;
    box-sizing: border-box;
}
.tv-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 88%;
    max-width: 1120px;
    max-height: calc(100vh - 195px);
    overflow: hidden;
    box-sizing: border-box;
}
.tv-grid-4x1 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 98%;
    max-width: 1380px;
    max-height: calc(100vh - 195px);
    overflow: hidden;
    box-sizing: border-box;
}
.tv-grid-3x1 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    width: 92%;
    max-width: 1180px;
    max-height: calc(100vh - 195px);
    overflow: hidden;
    box-sizing: border-box;
}
.tv-grid-7split {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 98%;
    max-width: 1380px;
    max-height: calc(100vh - 195px);
    overflow: hidden;
    box-sizing: border-box;
}
.tv-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.tv-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* TV Card Styles */
.tv-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 14px;
    box-sizing: border-box;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.tv-card-schedule {
    border-left: 5px solid #f59e0b;
    background: rgba(245, 158, 11, 0.06);
}
.tv-card-game {
    border-left: 5px solid #16a34a;
    background: rgba(22, 163, 74, 0.06);
}
.tv-card-food {
    border-top: 4px solid #f59e0b;
    background: rgba(255, 255, 255, 0.07);
}
.tv-card-winner {
    border: 2px solid #facc15;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.14), rgba(17, 5, 7, 0.85));
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.18);
}
.tv-card-committee {
    border-left: 5px solid #38bdf8;
    background: rgba(56, 189, 248, 0.06);
}
.tv-card-patron {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    border-top: 4px solid #cbd5e1;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tv-card-gold-patron {
    border-top: 4px solid #f59e0b !important;
    border-left: 3px solid #facc15 !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.06)) !important;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.18) !important;
}

/* Card Internal Typography */
.tv-card-title {
    font-size: clamp(1rem, 1.2vw, 1.18rem);
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}
.tv-card-detail {
    font-size: clamp(0.82rem, 0.95vw, 0.92rem);
    color: #cbd5e1;
    margin-top: 3px;
    line-height: 1.25;
}
.tv-time-badge {
    font-size: clamp(0.88rem, 1.05vw, 0.98rem);
    font-weight: 700;
    color: #facc15;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tv-badge-status {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-block;
}
.tv-status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fef08a;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.tv-status-completed {
    background: rgba(34, 197, 94, 0.25);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.5);
}
.tv-gold-txt { color: #facc15; font-weight: 800; }
.tv-silver-txt { color: #e2e8f0; font-weight: 700; }

/* TV Footer Controls */
.tv-footer-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 8px;
    margin-top: 8px;
    flex-shrink: 0;
    height: 42px;
    box-sizing: border-box;
}
.tv-controls-left, .tv-controls-center, .tv-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tv-nav-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.tv-nav-btn:hover { background: rgba(245, 158, 11, 0.3); }
.tv-day-filters { display: flex; gap: 6px; align-items: center; }
.tv-filter-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans Telugu', sans-serif;
}
.tv-filter-pill:hover { background: rgba(255, 255, 255, 0.18); }
.tv-filter-pill.active {
    background: var(--gold-main);
    color: var(--maroon-deep);
    font-weight: 800;
    border-color: var(--gold-main);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}
.tv-slide-indicator {
    font-weight: 700;
    color: #facc15;
    font-size: 0.9rem;
}
.tv-fs-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
}
.tv-fs-btn:hover { background: rgba(245, 158, 11, 0.3); }

/* --------------------------------------------------------------------------
   TV Kiosk Mode Mobile & Small-Screen Responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .tv-kiosk-container {
        padding: 6px 8px;
        overflow: hidden !important;
    }
    .tv-header-bar {
        height: auto;
        min-height: 42px;
        padding: 4px 8px;
        margin-bottom: 6px;
        gap: 6px;
    }
    .tv-brand {
        gap: 6px;
        flex: 1;
        min-width: 0;
    }
    .tv-brand h2 {
        font-size: 0.92rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 170px;
    }
    .tv-motif {
        display: none;
    }
    .tv-status-badge {
        font-size: 0.7rem;
        padding: 2px 7px;
        border-radius: 10px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .tv-clock {
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    .tv-exit-btn {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #dc2626;
        border: 1.5px solid #fecaca;
        color: #ffffff;
        font-size: 1.1rem;
        font-weight: 800;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        box-shadow: 0 2px 8px rgba(220, 38, 38, 0.5);
        flex-shrink: 0;
    }

    /* Ticker on mobile */
    .tv-ticker-bar {
        height: 30px;
        padding: 2px 8px;
        margin-bottom: 6px;
    }
    .ticker-badge {
        font-size: 0.72rem;
        padding: 1px 6px;
        margin-right: 6px;
    }
    .ticker-marquee {
        font-size: 0.84rem;
    }

    /* Viewport & Scrolling on Mobile */
    .tv-slide-viewport {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 4px 2px;
    }
    .tv-slide-content {
        height: auto !important;
        min-height: 100%;
        justify-content: flex-start;
        padding-bottom: 12px;
        overflow: visible !important;
    }
    .tv-slide-header {
        margin-bottom: 8px;
    }
    .tv-slide-h1 {
        font-size: clamp(1.1rem, 4.2vw, 1.3rem);
        line-height: 1.3;
        margin-bottom: 3px;
    }
    .tv-slide-sub {
        font-size: 0.78rem;
        line-height: 1.3;
    }

    /* Mobile Single-Column Full-Width Grids */
    .tv-grid-3x2,
    .tv-grid-2x2,
    .tv-grid-4x1,
    .tv-grid-3x1,
    .tv-grid-7split,
    .tv-row-4,
    .tv-row-3 {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        gap: 8px !important;
    }

    .tv-card {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 8px 10px !important;
        border-radius: 8px !important;
    }
    .tv-card-title {
        font-size: 0.96rem !important;
        white-space: normal !important;
        word-break: break-word !important;
        line-height: 1.35 !important;
    }
    .tv-card-detail {
        font-size: 0.8rem !important;
        line-height: 1.35 !important;
    }
    .tv-time-badge {
        font-size: 0.82rem !important;
    }

    /* Mobile Patrons Cards & Banner */
    .tv-patron-banner {
        padding: 5px 8px !important;
        margin-bottom: 6px !important;
        border-radius: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .tv-patron-banner-quote {
        display: none !important;
    }
    .tv-patron-banner-cta {
        font-size: 0.76rem !important;
        margin-top: 0 !important;
        line-height: 1.3 !important;
    }
    .tv-card-patron {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
        padding: 8px 10px !important;
        min-height: 68px !important;
        height: auto !important;
        flex-shrink: 0 !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .tv-card-patron .tv-patron-avatar-wrap {
        width: 48px !important;
        height: 48px !important;
        flex-shrink: 0 !important;
    }
    .tv-card-patron .tv-patron-avatar-wrap img,
    .tv-card-patron .tv-patron-avatar-wrap div {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.5rem !important;
    }
    .tv-card-patron .tv-patron-text-col {
        flex: 1 !important;
        min-width: 0 !important;
    }
    .tv-card-patron .tv-patron-header-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
    }
    .tv-card-patron .tv-card-title {
        font-size: 0.94rem !important;
        white-space: normal !important;
        word-break: break-word !important;
        line-height: 1.25 !important;
        flex: 1 !important;
        min-width: 0 !important;
    }
    .tv-card-patron .tv-patron-amount-badge {
        font-size: 0.72rem !important;
        padding: 2px 7px !important;
        border-radius: 10px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    .tv-card-patron .tv-card-detail {
        font-size: 0.76rem !important;
        margin-top: 2px !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        word-break: break-word !important;
    }
    .tv-card-patron .tv-card-citation {
        font-size: 0.72rem !important;
        margin-top: 2px !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        word-break: break-word !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* Footer Controls on Mobile - 2-Row Split via Flexbox Order */
    .tv-footer-controls {
        height: auto;
        padding: 6px 8px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
        margin-top: 6px;
    }
    .tv-controls-left {
        order: 1;
        display: flex;
        gap: 4px;
    }
    .tv-controls-right {
        order: 2;
        display: flex;
        gap: 6px;
        align-items: center;
    }
    .tv-controls-center {
        order: 3;
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-top: 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: flex-start;
    }
    .tv-controls-center::-webkit-scrollbar {
        display: none;
    }
    .tv-day-filters {
        display: flex;
        gap: 5px;
        flex-wrap: nowrap;
    }
    .tv-filter-pill {
        font-size: 0.74rem;
        padding: 3px 8px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .tv-nav-btn {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    .tv-slide-indicator {
        font-size: 0.78rem;
    }
    .tv-fs-btn {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
}

/* Landscape Mode on Phones */
@media (max-height: 500px) and (orientation: landscape) {
    .tv-kiosk-container {
        padding: 4px 8px;
    }
    .tv-header-bar {
        height: 34px;
        min-height: 34px;
        padding: 2px 8px;
        margin-bottom: 4px;
    }
    .tv-footer-controls {
        height: 34px;
        min-height: 34px;
        padding: 2px 8px;
        margin-top: 4px;
        flex-direction: row;
        flex-wrap: nowrap;
    }
    .tv-controls-center {
        width: auto;
        border-top: none;
        padding-top: 0;
    }
    .tv-slide-h1 {
        font-size: 1.1rem;
    }
    .tv-grid-3x2, .tv-grid-2x2, .tv-grid-4x1 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        max-height: calc(100vh - 85px) !important;
    }
}

/* --------------------------------------------------------------------------
   Celebration Overlay
   -------------------------------------------------------------------------- */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.celebration-card {
    background: linear-gradient(135deg, #fffbeb, #ffffff);
    border: 4px solid var(--gold-main);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 550px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 50px rgba(245, 158, 11, 0.6);
    animation: popCelebration 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popCelebration {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.celebration-card h2 { font-size: 1.8rem; color: var(--maroon-deep); margin-bottom: 12px; }
.confetti-container { font-size: 2.2rem; margin-bottom: 12px; }

/* --------------------------------------------------------------------------
   Modal Dialogs
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-dialog {
    background: #ffffff;
    border-radius: 20px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 26px 28px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(245, 158, 11, 0.25);
    border-top: 5px solid #d97706;
    transition: max-width 0.2s ease;
    animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-dialog.wide-dialog {
    max-width: 720px;
    width: 95%;
}
.schedule-modal-header {
    border-bottom: 2px solid #fef3c7;
    padding-bottom: 14px;
    margin-bottom: 16px;
    position: relative;
}
.schedule-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--maroon-deep);
    margin: 6px 0;
    line-height: 1.3;
    font-family: 'Cinzel', 'Noto Sans Telugu', serif;
    letter-spacing: 0.3px;
}
.schedule-modal-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 0.82rem;
    color: #334155;
    margin-top: 6px;
}
.schedule-modal-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f8fafc;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
}
.schedule-agenda-section {
    margin-top: 14px;
}
.schedule-section-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--maroon-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.agenda-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    padding-left: 14px;
    border-left: 2px dashed #fde68a;
    margin-left: 6px;
}
.agenda-step-card {
    background: #fcfcfc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    position: relative;
    transition: all 0.2s ease;
}
.agenda-step-card:hover {
    background: #fffdf5;
    border-color: #fde68a;
}
.agenda-step-card::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold-main);
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px var(--gold-main);
}
.agenda-step-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}
.agenda-time-pill {
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
    font-size: 0.74rem;
    padding: 2px 7px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.agenda-step-title {
    font-weight: 700;
    color: var(--maroon-deep);
    font-size: 0.88rem;
}
.agenda-step-desc {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.35;
    margin-top: 2px;
}
.connected-items-box {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-top: 14px;
}
.connected-items-title {
    font-weight: 700;
    font-size: 0.86rem;
    color: #92400e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.item-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.food-menu-pill {
    background: #ffffff;
    border: 1px solid #fcd34d;
    color: #78350f;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
}
.game-item-badge {
    background: #ffffff;
    border: 1px solid #93c5fd;
    color: #1e3a8a;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 5px;
    gap: 8px;
}
.game-winner-tag {
    background: #dcfce7;
    color: #15803d;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
}
.cultural-item-badge {
    background: #ffffff;
    border: 1px solid #fbcfe8;
    color: #831843;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    width: 100%;
    margin-bottom: 5px;
}
.modal-actions-bar {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}
.modal-close-x {
    position: absolute;
    right: 0;
    top: 0;
    background: #f1f5f9;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.modal-close-x:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Footer & Stealth Trigger */
.main-footer {
    background: linear-gradient(165deg, #1b0106 0%, #2f030b 50%, #1b0106 100%);
    color: #fef3c7;
    padding: 24px 20px;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, transparent 0%, #f59e0b 25%, #fbbf24 50%, #f59e0b 75%, transparent 100%) 1;
    font-size: 0.9rem;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
    position: relative;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.footer-brand-text {
    font-family: 'Cinzel', 'Noto Sans Telugu', serif;
    font-weight: 700;
    font-size: 0.96rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}
.footer-sub-text {
    font-size: 0.8rem;
    color: #fde68a;
    opacity: 0.85;
    margin-top: 3px;
}
.stealth-trigger {
    cursor: pointer;
    opacity: 0.45;
    transition: all 0.2s ease;
    user-select: none;
    font-size: 0.84rem;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(250, 204, 21, 0.3);
    border-radius: 20px;
    color: #fef08a;
}
.stealth-trigger:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.14);
    border-color: #fbbf24;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* Helper classes */
.hidden { display: none !important; }
.text-center { text-align: center; }
.loading-state {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   SUPER ADMIN MODE & LIVE OVERWRITE SYSTEM
   -------------------------------------------------------------------------- */
.admin-mode-btn {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #fef08a;
    border: 1px solid rgba(254, 240, 138, 0.4);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}
.admin-mode-btn:hover {
    background: linear-gradient(135deg, #334155, #1e293b);
    border-color: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.admin-mode-btn.active {
    background: linear-gradient(135deg, #b45309, #78350f) !important;
    color: #ffffff !important;
    border-color: #fef08a !important;
    animation: goldAdminPulse 2s infinite;
}
@keyframes goldAdminPulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.admin-edit-pill {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #f59e0b;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.admin-edit-pill:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.festive-toast {
    background: #1e293b;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-left: 4px solid #22c55e;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.festive-toast.toast-error {
    border-left-color: #ef4444;
}
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Edit Modal Layout */
.admin-edit-modal {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.admin-edit-modal h3 {
    margin-top: 0;
    color: var(--maroon-deep);
    border-bottom: 2px solid var(--gold-main);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}
.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.admin-form-group.full-width {
    grid-column: 1 / -1;
}
.admin-form-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
}
.admin-form-group input,
.admin-form-group select,
.admin-form-group textarea {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
    outline: none;
    border-color: var(--gold-main);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Festival Days Scaling & Modal Styles */
.scale-selector-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
}
.scale-pill {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}
.scale-pill:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}
.scale-pill.active {
    background: var(--gold-main);
    color: #451a03;
    border-color: var(--gold-dark);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}
.modal-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    max-height: 48vh;
    overflow-y: auto;
    padding: 4px;
    margin-bottom: 14px;
}
.modal-day-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}
.modal-day-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.modal-feedback-alert {
    animation: fadeIn 0.25s ease-out;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.15);
}
.modal-feedback-alert.pulse-success {
    animation: pulseBorder 1.5s infinite;
}
@keyframes pulseBorder {
    0% { border-color: #10b981; }
    50% { border-color: #059669; box-shadow: 0 0 12px rgba(16, 185, 129, 0.35); }
    100% { border-color: #10b981; }
}

/* Day Selector Bars & Event Day Badges */
.day-selector-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}
.event-day-badge, .committee-day-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.badge-alldays {
    background: #ede9fe !important;
    color: #5b21b6 !important;
    border-color: #ddd6fe !important;
}

/* Day-wise RSVP & Catering Headcount Breakdown */
.rsvp-daywise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.rsvp-day-card {
    background: linear-gradient(135deg, #fffdf5, #fef9ed);
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    text-align: center;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.rsvp-day-card:hover {
    transform: translateY(-2px);
    border-color: #f59e0b;
}
.rsvp-day-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rsvp-day-count {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--maroon-main);
    line-height: 1.1;
}
.rsvp-day-unit {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}
.rsvp-day-breakdown {
    font-size: 0.73rem;
    color: #475569;
    margin-top: 5px;
    padding-top: 4px;
    border-top: 1px dashed #fed7aa;
}

.rollcall-kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.empty-state-box {
    animation: fadeIn 0.3s ease-out;
}
.rollcall-games-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --------------------------------------------------------------------------
   PRINT STYLES: ROLL CALL SHEET & TABLETOP CARDS
   Strictly enforces Super Admin authorization for Roll Call printing
   -------------------------------------------------------------------------- */
@media print {
    /* If general guest attempts print on Roll Call tab without Super Admin */
    body:not(.superadmin-active) #tab-content-rollcall .rollcall-container {
        display: none !important;
    }
    body:not(.superadmin-active) #tab-content-rollcall::after {
        content: "🔒 రోల్ కాల్ షీట్ ప్రింట్ కేవలం Super Admin కి మాత్రమే అనుమతి ఉంది (Super Admin Authorized Print Only)";
        display: block !important;
        font-size: 1.4rem;
        font-weight: 800;
        color: #b91c1c;
        text-align: center;
        padding: 60px 20px;
        border: 2px dashed #b91c1c;
        margin: 40px auto;
        max-width: 600px;
        background: #fef2f2;
    }

    /* Clean printing layout */
    .main-header,
    .nav-bar,
    .festival-pulse-bar,
    .toranam-garland,
    .main-footer,
    .emergency-banner,
    .action-btn-group,
    .day-selector-bar,
    .dates-config-btn,
    .admin-mode-btn,
    .kiosk-launch-btn,
    .stealth-trigger,
    .tv-kiosk-container {
        display: none !important;
    }

    .content-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    .tab-pane {
        display: none !important;
    }
    .tab-pane.active {
        display: block !important;
    }

    .festive-card {
        box-shadow: none !important;
        border: 1px solid #334155 !important;
        page-break-inside: avoid;
    }

    /* Committee Directory Print Layout */
    #tab-content-committee::before {
        content: "మావుడి వారి సంక్రాంతి సంబరాలు - 2027 | అధికారిక నిర్వహణ కమిటీ & కోఆర్డినేటర్ల డైరెక్టరీ";
        display: block !important;
        font-size: 1.25rem !important;
        font-weight: 800 !important;
        color: #1e293b !important;
        text-align: center !important;
        border-bottom: 2px solid #b45309 !important;
        padding-bottom: 8px !important;
        margin-bottom: 16px !important;
    }
    .admin-edit-pill {
        display: none !important;
    }
    .committee-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .committee-card {
        border: 1.5px solid #94a3b8 !important;
        border-top: 3.5px solid #b45309 !important;
        page-break-inside: avoid !important;
        background: #ffffff !important;
        padding: 10px 12px !important;
    }
    .committee-num-badge {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        background: #b45309 !important;
        color: #ffffff !important;
    }
    .committee-member-row {
        border: 1px solid #cbd5e1 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* ==========================================================================
   📊 EXCEL & AI DATA HUB STYLES (excel_hub.js)
   ========================================================================== */
.excel-hub-btn {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(5, 150, 105, 0.18) 100%);
    border: 1.5px solid #34d399;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.excel-hub-btn:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-color: #a7f3d0;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

.excel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.excel-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-top: 4px solid #10b981;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.excel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.15);
    border-color: #34d399;
}
.excel-card.focused-card {
    border-color: #f59e0b;
    border-top-color: #d97706;
    background: #fffbeb;
}

.excel-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.excel-card-icon {
    font-size: 1.5rem;
    line-height: 1;
}
.excel-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.25;
}
.excel-card-sub {
    font-size: 0.74rem;
    color: #64748b;
    font-weight: 600;
}
.excel-card-desc {
    margin: 0 0 12px 0;
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.35;
    flex: 1;
}
.excel-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.green-sm-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
    text-align: center;
}
.green-sm-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.35);
}

.gold-sm-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
    text-align: center;
}
.gold-sm-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.35);
}

.excel-sync-btn {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.25) 100%);
    border: 1.5px solid #10b981;
    color: #065f46;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.excel-sync-btn:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* --------------------------------------------------------------------------
   Live Flash Polls - 3-Layer Interactive Voting & Progress Bars
   -------------------------------------------------------------------------- */
.polls-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 860px;
    margin: 0 auto;
}

.poll-card {
    background: #ffffff;
    border: 2px solid rgba(245, 158, 11, 0.35);
    border-radius: 16px;
    padding: 24px 26px;
    box-shadow: 0 4px 18px rgba(74, 5, 17, 0.06);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.poll-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 8px 26px rgba(245, 158, 11, 0.15);
}

.poll-card.poll-closed {
    background: #fbfbfc;
    border-color: #e2e8f0;
}

.poll-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.poll-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.poll-status-badge.status-live {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(245, 158, 11, 0.18));
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.poll-status-badge.status-live::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444;
    display: inline-block;
    animation: livePulseDot 1.4s infinite;
}

@keyframes livePulseDot {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.4; }
    100% { transform: scale(0.9); opacity: 1; }
}

.poll-status-badge.status-closed {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.poll-votes-counter {
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.poll-question {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 16px 0;
    line-height: 1.45;
    font-family: 'Noto Sans Telugu', system-ui, sans-serif;
}

.poll-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.poll-choice-btn {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
    border: 2px solid #fcd34d;
    color: #78350f;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Noto Sans Telugu', system-ui, sans-serif;
    padding: 14px 18px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.08);
}

.poll-choice-btn:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    color: #92400e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.22);
}

.poll-choice-btn:active {
    transform: scale(0.98);
}

.poll-choice-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.poll-choice-text {
    flex: 1;
    word-break: break-word;
}

/* Results & Animated Progress Bars */
.poll-results-box {
    margin-top: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
}

.poll-voted-notice {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.08));
    border: 1px solid #10b981;
    color: #065f46;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.poll-bars-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.poll-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.poll-bar-item.is-my-choice {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.poll-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-family: 'Noto Sans Telugu', system-ui, sans-serif;
}

.poll-bar-label {
    font-weight: 700;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.poll-my-vote-badge {
    background: #fef08a;
    color: #854d0e;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #facc15;
}

.poll-bar-stat {
    font-size: 0.86rem;
    color: #64748b;
    font-weight: 600;
}

.poll-progress-track {
    background: #e2e8f0;
    height: 14px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.poll-progress-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #f59e0b 0%, #ea580c 100%);
    transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.poll-bar-item.is-my-choice .poll-progress-fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.poll-total-footer {
    margin-top: 14px;
    text-align: right;
    font-size: 0.82rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
}

.poll-admin-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

/* ==========================================================================
   MULTI-YEAR FINANCE VAULT INTELLIGENCE & MEMBER COMPARISON STYLES
   ========================================================================== */
.member-compare-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 14px;
}

.compare-selector-group {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.compare-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    font-family: 'Outfit', 'Noto Sans Telugu', sans-serif;
}

.member-select-dropdown {
    width: 100%;
    padding: 9px 12px;
    border-radius: 9px;
    border: 1.5px solid #cbd5e1;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.member-select-dropdown:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.comparison-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.comparison-kpi-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.comparison-kpi-card.gold-border { border-left: 4px solid #f59e0b; }
.comparison-kpi-card.green-border { border-left: 4px solid #10b981; }
.comparison-kpi-card.orange-border { border-left: 4px solid #ea580c; }
.comparison-kpi-card.purple-border { border-left: 4px solid #8b5cf6; }

.comparison-kpi-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.comparison-kpi-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.comparison-kpi-lbl {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.matrix-table {
    width: 100%;
    font-size: 0.84rem;
}

.matrix-table th {
    white-space: nowrap;
}

.matrix-table td {
    padding: 8px 10px;
    vertical-align: middle;
}

.matrix-live-col {
    background-color: rgba(22, 163, 74, 0.06) !important;
    font-weight: 800;
    color: #15803d !important;
}

.matrix-trend-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.matrix-trend-up {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.matrix-trend-stable {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .member-compare-toolbar {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    .compare-selector-group {
        min-width: 100%;
    }
    .comparison-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 480px) {
    .comparison-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SMART FUND COLLECTION TYPEAHEAD, HISTORY POPUP & DUPLICATE PROTECTION
   ========================================================================== */
.typeahead-container {
    position: relative;
    width: 100%;
}

.typeahead-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 10001;
    background: #ffffff;
    border: 1.5px solid #f59e0b;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
    max-height: 250px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.typeahead-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    transition: background 0.15s ease;
}

.typeahead-item:hover, .typeahead-item.active {
    background: #fef3c7;
}

.typeahead-item-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #1e293b;
}

.typeahead-item-sub {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}

.typeahead-item-badge {
    font-size: 0.76rem;
    font-weight: 700;
    background: #ecfdf5;
    color: #065f46;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #a7f3d0;
    white-space: nowrap;
}

.typeahead-item.new-guest {
    background: #f0fdf4;
    color: #166534;
    font-weight: 700;
    border-top: 1.5px dashed #86efac;
}

.col-history-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #fefce8;
    border: 1px solid #fde047;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.col-duplicate-alert {
    background: #fef2f2;
    border: 1.5px solid #f87171;
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 14px;
    margin-bottom: 14px;
}

/* History Modal Popup Box */
.member-history-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.18s ease;
}

.member-history-popup-box {
    background: #ffffff;
    border-radius: 16px;
    max-width: 440px;
    width: 100%;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    border: 1.5px solid #f59e0b;
    animation: modalSlideUp 0.22s ease;
}

/* ==========================================================================
   SUPER ADMIN EXCLUSIVE CONTROLS (STRICTLY HIDDEN FOR PUBLIC VIEW)
   ========================================================================== */
.excel-sync-btn,
#excel-hub-btn,
.admin-edit-pill {
    display: none !important;
}

body.superadmin-active .excel-sync-btn,
body.superadmin-active #excel-hub-btn,
body.superadmin-active .admin-edit-pill,
body.super-admin-active .excel-sync-btn,
body.super-admin-active #excel-hub-btn,
body.super-admin-active .admin-edit-pill {
    display: inline-flex !important;
}

.header-pending-wishes-btn {
    display: none;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1.5px solid #f59e0b;
    color: #92400e;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
    transition: transform 0.2s ease;
    animation: pendingPulse 2.5s infinite ease-in-out;
}
.header-pending-wishes-btn:hover {
    transform: scale(1.05);
    background: #fde047;
}

@keyframes pendingPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { transform: scale(1.03); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* ==========================================================================
   ⏱️ REAL-TIME DYNAMIC "LIVE & UP NEXT" & UNIVERSAL NET DELAY STYLING
   ========================================================================== */

/* Header Delay Pill */
.header-net-delay-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.header-net-delay-pill.delay-ontime {
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    color: #334155;
}
.header-net-delay-pill.delay-late {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1.5px solid #f59e0b;
    color: #92400e;
    animation: pendingPulse 2.5s infinite ease-in-out;
}
.header-net-delay-pill.delay-early {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    border: 1.5px solid #0284c7;
    color: #075985;
}
.header-net-delay-pill:hover {
    transform: scale(1.04);
}

/* TV Kiosk Header Delay Pill */
.tv-delay-pill-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(250, 204, 21, 0.5);
    color: #fef08a;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 4px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tv-delay-pill-btn:hover {
    background: rgba(250, 204, 21, 0.25);
    border-color: #facc15;
    transform: scale(1.05);
}

/* Schedule Tab Delay Banner */
.schedule-delay-alert-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}
.schedule-delay-alert-banner.delay-late-banner {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1.5px solid #f59e0b;
    color: #92400e;
}
.schedule-delay-alert-banner.delay-early-banner {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1.5px solid #0284c7;
    color: #075985;
}
.delay-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.delay-banner-icon {
    font-size: 1.8rem;
    line-height: 1;
}
.delay-banner-title {
    font-size: 0.96rem;
    font-weight: 800;
}
.delay-banner-sub {
    font-size: 0.8rem;
    opacity: 0.88;
    margin-top: 2px;
}
.delay-banner-adjust-btn {
    background: rgba(0, 0, 0, 0.08);
    border: 1.5px solid currentColor;
    color: inherit;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.delay-banner-adjust-btn:hover {
    background: rgba(0, 0, 0, 0.16);
    transform: scale(1.03);
}

/* Schedule Time Shifting Chips */
.original-time-struck {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
}
.struck-text {
    text-decoration: line-through;
    opacity: 0.65;
    font-size: 0.86em;
    color: #64748b;
}
.delay-pill {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 10px;
    display: inline-block;
}
.delay-chip-late {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}
.delay-chip-ahead {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
.delay-shift-btn {
    background: #fffbeb;
    border: 1.5px solid #f59e0b;
    color: #92400e;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
}
.delay-shift-btn:hover {
    background: #fde68a;
}

/* TV KIOSK SLIDE: LIVE & UP NEXT STYLES */
.tv-beacon-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.tv-badge-upnext {
    background: rgba(245, 158, 11, 0.25);
    border: 2px solid #f59e0b;
    color: #fef08a;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}
.tv-badge-ongoing {
    background: rgba(239, 68, 68, 0.25);
    border: 2px solid #ef4444;
    color: #fca5a5;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.35);
}
.tv-badge-welcome {
    background: rgba(56, 189, 248, 0.25);
    border: 2px solid #38bdf8;
    color: #bae6fd;
}
.tv-badge-thanks {
    background: rgba(34, 197, 94, 0.25);
    border: 2px solid #22c55e;
    color: #bbf7d0;
}
.tv-beacon-pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    animation: beaconPulse 1.4s infinite ease-in-out;
}
.tv-beacon-pulse-dot.amber {
    background: #f59e0b;
    box-shadow: 0 0 12px #f59e0b;
}
.tv-beacon-pulse-dot.red {
    background: #ef4444;
    box-shadow: 0 0 12px #ef4444;
}
@keyframes beaconPulse {
    0% { transform: scale(0.9); opacity: 0.75; }
    50% { transform: scale(1.35); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.75; }
}

/* TV Slide Layouts */
.tv-upnext-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
    max-width: 980px;
    margin: 0 auto;
    align-items: stretch;
}
.tv-countdown-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(17, 24, 39, 0.85));
    border: 3px solid #f59e0b;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 18px;
    text-align: center;
    box-shadow: 0 10px 35px rgba(245, 158, 11, 0.3);
}
.tv-countdown-number {
    font-size: 5.8rem;
    font-weight: 900;
    color: #facc15;
    line-height: 1;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 0 30px rgba(250, 204, 21, 0.55);
}
.tv-countdown-unit {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 8px;
    line-height: 1.35;
    font-family: 'Noto Sans Telugu', sans-serif;
}
.tv-upnext-card {
    background: rgba(17, 24, 39, 0.82);
    border: 2px solid rgba(245, 158, 11, 0.45);
    border-radius: 18px;
    padding: 22px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}
.tv-upnext-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.tv-upnext-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}
.tv-upnext-label {
    font-size: 0.88rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tv-upnext-val {
    font-size: 1.3rem;
    line-height: 1.35;
    color: #ffffff;
}
.tv-strikethrough-time {
    text-decoration: line-through;
    opacity: 0.65;
    font-size: 0.85em;
    margin-left: 8px;
    color: #cbd5e1;
}
.tv-upnext-notes {
    background: rgba(255, 255, 255, 0.06);
    border-left: 3px solid #facc15;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.98rem;
    color: #e2e8f0;
    line-height: 1.4;
}
.tv-ongoing-footer-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.65);
    border: 1.5px solid #ef4444;
    border-radius: 30px;
    padding: 8px 24px;
    margin: 16px auto 0 auto;
    max-width: 980px;
    font-size: 1.05rem;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* State 2 Ongoing Split Grid */
.tv-ongoing-split-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.85fr;
    gap: 22px;
    max-width: 980px;
    margin: 0 auto;
}
.tv-ongoing-main-card {
    background: rgba(17, 24, 39, 0.82);
    border: 3px solid #ef4444;
    border-radius: 18px;
    padding: 24px 28px;
    box-shadow: 0 10px 35px rgba(239, 68, 68, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}
.tv-ongoing-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.tv-ongoing-next-card {
    background: rgba(17, 24, 39, 0.7);
    border: 2px dashed rgba(56, 189, 248, 0.55);
    border-radius: 18px;
    padding: 24px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.tv-state-card {
    border-radius: 20px;
    padding: 30px 40px;
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.55);
}
.tv-net-delay-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 800;
}
.tv-net-delay-pill.tv-delay-late {
    background: rgba(245, 158, 11, 0.3);
    border: 1.5px solid #f59e0b;
    color: #fef08a;
}
.tv-net-delay-pill.tv-delay-early {
    background: rgba(2, 132, 199, 0.3);
    border: 1.5px solid #0284c7;
    color: #bae6fd;
}
.tv-demo-clock-badge {
    background: rgba(147, 51, 234, 0.3);
    border: 1.5px solid #c084fc;
    color: #f3e8ff;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 20px;
}

/* Net Delay Modal Controller */
.net-delay-status-card {
    border-radius: 12px;
    padding: 14px 18px;
    text-align: center;
}
.net-delay-status-card.delay-status-ontime {
    background: #f0fdf4;
    border: 2px solid #86efac;
    color: #166534;
}
.net-delay-status-card.delay-status-late {
    background: #fffbeb;
    border: 2px solid #f59e0b;
    color: #92400e;
}
.net-delay-status-card.delay-status-ahead {
    background: #f0f9ff;
    border: 2px solid #38bdf8;
    color: #075985;
}
.delay-step-btn {
    padding: 9px 4px;
    font-size: 0.84rem;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s;
}
.delay-step-btn:hover {
    transform: scale(1.04);
}
.delay-step-btn.blue-step {
    background: #0284c7;
    color: #ffffff;
    border: 1px solid #0369a1;
}
.delay-step-btn.orange-step {
    background: #ea580c;
    color: #ffffff;
    border: 1px solid #c2410c;
}
.delay-reset-btn {
    background: #16a34a;
    color: #ffffff;
    border: 1.5px solid #15803d;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.delay-reset-btn:hover {
    background: #15803d;
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .tv-kiosk-container {
        padding: 4px 6px !important;
        overflow-x: hidden !important;
        width: 100vw !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    .tv-header-bar {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: auto !important;
        min-height: 38px !important;
        padding: 4px 6px !important;
        margin-bottom: 4px !important;
        gap: 4px 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .tv-brand {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    .tv-brand h2 {
        font-size: 0.82rem !important;
        max-width: 130px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .tv-status-badge {
        font-size: 0.66rem !important;
        padding: 2px 5px !important;
        max-width: 95px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    .tv-delay-pill-btn {
        padding: 2px 6px !important;
        font-size: 0.68rem !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        max-width: 105px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .tv-clock {
        font-size: 0.7rem !important;
        flex-shrink: 0 !important;
    }
    .tv-exit-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.9rem !important;
        flex-shrink: 0 !important;
    }

    /* Live & Up Next Slide Mobile Adaptations */
    .tv-upnext-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        gap: 10px !important;
    }
    .tv-countdown-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 12px !important;
        border-radius: 12px !important;
    }
    .tv-countdown-number {
        font-size: clamp(2.4rem, 11vw, 3.4rem) !important;
        line-height: 1 !important;
    }
    .tv-countdown-unit {
        font-size: 0.78rem !important;
    }
    .tv-upnext-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 12px !important;
        border-radius: 12px !important;
    }
    .tv-upnext-row {
        gap: 8px !important;
        margin-bottom: 6px !important;
    }
    .tv-upnext-icon {
        font-size: 1.25rem !important;
    }
    .tv-upnext-label {
        font-size: 0.74rem !important;
    }
    .tv-upnext-val {
        font-size: 0.98rem !important;
        word-break: break-word !important;
    }
    .tv-upnext-notes {
        font-size: 0.8rem !important;
        padding: 6px 10px !important;
        margin-top: 6px !important;
        border-radius: 6px !important;
    }
    .tv-ongoing-split-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        gap: 10px !important;
    }
    .tv-ongoing-main-card,
    .tv-ongoing-next-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 12px !important;
        border-radius: 12px !important;
    }
    .tv-ongoing-footer-strip {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 8px 10px !important;
        font-size: 0.76rem !important;
        border-radius: 10px !important;
        text-align: left !important;
        margin-top: 8px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 3px !important;
    }
    .tv-state-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 14px 10px !important;
        border-radius: 12px !important;
    }
    .tv-beacon-badge {
        font-size: 0.72rem !important;
        padding: 2px 8px !important;
    }
    .tv-net-delay-pill {
        font-size: 0.72rem !important;
        padding: 2px 8px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .tv-demo-clock-badge {
        font-size: 0.7rem !important;
        padding: 2px 8px !important;
    }
    .tv-slide-h1 {
        font-size: clamp(1.1rem, 4.5vw, 1.45rem) !important;
        line-height: 1.3 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    .tv-slide-sub {
        font-size: 0.76rem !important;
        line-height: 1.3 !important;
        word-break: break-word !important;
    }
    .tv-grid-2x1 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .tv-card-wish {
        padding: 14px 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .tv-card-wish p {
        font-size: 1.05rem !important;
        line-height: 1.45 !important;
        margin-bottom: 10px !important;
    }
}

/* ==========================================================================
   SECURE PIN ENTRY MODAL (MASKED BULLET INPUT & SHIELDED UI)
   ========================================================================== */
.secure-pin-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.78) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    animation: securePinFadeIn 0.2s ease-out;
}

.secure-pin-overlay.hidden {
    display: none !important;
}

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

.secure-pin-dialog {
    background: #ffffff !important;
    border-radius: 18px !important;
    padding: 26px 22px !important;
    width: 100% !important;
    max-width: 380px !important;
    text-align: center !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(245, 158, 11, 0.25) !important;
    border: 2px solid #fef3c7 !important;
    box-sizing: border-box !important;
    animation: securePinSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes securePinSlideUp {
    from { transform: translateY(16px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.secure-pin-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(217, 119, 6, 0.3));
}

.secure-pin-title {
    margin: 0 0 6px 0 !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #78350f !important;
    font-family: 'Noto Sans Telugu', system-ui, sans-serif !important;
    line-height: 1.35 !important;
}

.secure-pin-sub {
    margin: 0 0 16px 0 !important;
    font-size: 0.85rem !important;
    color: #64748b !important;
    line-height: 1.4 !important;
}

.secure-pin-input-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    background: #f8fafc !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
}

.secure-pin-input-wrap:focus-within {
    border-color: #d97706 !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18) !important;
    background: #ffffff !important;
}

.secure-pin-input {
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    padding: 12px 48px 12px 16px !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    letter-spacing: 6px !important;
    text-align: center !important;
    color: #0f172a !important;
    font-family: system-ui, -apple-system, sans-serif !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.secure-pin-toggle-btn {
    position: absolute !important;
    right: 8px !important;
    background: transparent !important;
    border: none !important;
    font-size: 1.25rem !important;
    padding: 6px 8px !important;
    cursor: pointer !important;
    border-radius: 6px !important;
    color: #64748b !important;
    transition: background 0.15s ease !important;
}

.secure-pin-toggle-btn:hover {
    background: #e2e8f0 !important;
}

.secure-pin-actions {
    display: flex !important;
    gap: 12px !important;
    justify-content: stretch !important;
}

.secure-pin-btn {
    flex: 1 !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.15s ease !important;
    font-family: 'Noto Sans Telugu', system-ui, sans-serif !important;
}

.secure-pin-btn.cancel-btn {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

.secure-pin-btn.cancel-btn:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

.secure-pin-btn.submit-btn {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.25) !important;
}

.secure-pin-btn.submit-btn:hover {
    background: linear-gradient(135deg, #b45309, #92400e) !important;
    box-shadow: 0 6px 16px rgba(180, 83, 9, 0.35) !important;
}

/* ==========================================================================
   FAMILY DEMOGRAPHICS & SMART ATTENDANCE CATERING SYSTEM
   ========================================================================== */
.demographics-metrics-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
}

.demo-metric-card {
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 14px 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #e2e8f0 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.demo-metric-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08) !important;
}

.demo-metric-icon {
    font-size: 1.8rem !important;
    line-height: 1 !important;
}

.demo-metric-data {
    display: flex !important;
    flex-direction: column !important;
}

.demo-metric-val {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
}

.demo-metric-label {
    font-size: 0.74rem !important;
    color: #64748b !important;
    font-weight: 600 !important;
}

.demographics-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #f8fafc !important;
    padding: 12px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 18px !important;
}

.demographics-search-wrap {
    flex: 1 1 280px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.demographics-search-wrap .search-icon {
    position: absolute !important;
    left: 12px !important;
    font-size: 0.95rem !important;
    color: #94a3b8 !important;
}

.demographics-search-wrap input {
    width: 100% !important;
    padding: 8px 12px 8px 36px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 0.88rem !important;
    background: #ffffff !important;
    outline: none !important;
    transition: border-color 0.2s ease !important;
}

.demographics-search-wrap input:focus {
    border-color: #d97706 !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15) !important;
}

.demographics-filter-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

.demo-filter-pill {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 999px !important;
    padding: 5px 12px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.demo-filter-pill:hover {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
}

.demo-filter-pill.active {
    background: #d97706 !important;
    color: #ffffff !important;
    border-color: #b45309 !important;
    box-shadow: 0 2px 6px rgba(180, 83, 9, 0.25) !important;
}

.demographics-families-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)) !important;
    gap: 12px !important;
    align-items: start !important; /* CRITICAL: Prevents stretching cards to match tall rows, eliminates empty space! */
}

.family-demographic-card {
    background: #ffffff !important;
    border-radius: 12px !important;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: fit-content !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}

.family-demographic-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06) !important;
    border-color: #cbd5e1 !important;
}

.family-card-header {
    background: linear-gradient(135deg, #fefce8, #fffbeb) !important;
    border-bottom: 1.5px solid #fef08a !important;
    padding: 8px 12px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 6px !important;
}

.family-card-title {
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    color: #78350f !important;
    margin: 0 !important;
    line-height: 1.25 !important;
}

.family-card-subtitle {
    font-size: 0.72rem !important;
    color: #92400e !important;
    margin-top: 1px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-items: center !important;
}

.family-members-count-badge {
    background: #dcfce7 !important;
    color: #15803d !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    padding: 1px 6px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    border: 1px solid #86efac !important;
}

.family-card-body {
    padding: 6px 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    max-height: 380px !important;
    overflow-y: auto !important;
}

.family-card-body::-webkit-scrollbar {
    width: 4px !important;
}

.family-card-body::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 4px !important;
}

.demo-member-row {
    background: #f8fafc !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    transition: background 0.15s ease !important;
}

.demo-member-row:hover {
    background: #f1f5f9 !important;
}

.demo-member-row.is-late-row {
    background: #f8fafc !important;
    border: 1px dashed #cbd5e1 !important;
    opacity: 0.78 !important;
}

.demo-member-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    flex: 1 !important;
    min-width: 0 !important;
}

.demo-member-name {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    line-height: 1.2 !important;
}

.demo-member-meta {
    font-size: 0.68rem !important;
    color: #64748b !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 3px !important;
    align-items: center !important;
    margin-top: 1px !important;
}

/* Badges */
.badge-head {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde047 !important;
    font-size: 0.64rem !important;
    font-weight: 800 !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
}

.badge-senior {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #6ee7b7 !important;
    font-size: 0.64rem !important;
    font-weight: 800 !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
}

.badge-student {
    background: #eff6ff !important;
    color: #1e40af !important;
    border: 1px solid #93c5fd !important;
    font-size: 0.64rem !important;
    font-weight: 700 !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
}

.badge-late {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px dashed #94a3b8 !important;
    font-size: 0.64rem !important;
    font-weight: 700 !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
    text-decoration: line-through !important;
}

.demo-member-actions {
    display: flex !important;
    gap: 2px !important;
    align-items: center !important;
}

.demo-action-btn {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 0.84rem !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    transition: background 0.15s ease !important;
    color: #64748b !important;
}

.demo-action-btn:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

.demo-action-btn.delete-btn:hover {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

.family-card-footer {
    padding: 5px 10px !important;
    background: #fafafa !important;
    border-top: 1px solid #f1f5f9 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.add-member-link-btn {
    background: none !important;
    border: none !important;
    color: #b45309 !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    transition: background 0.15s ease !important;
}

.add-member-link-btn:hover {
    background: #fef3c7 !important;
    text-decoration: underline !important;
}

/* SMART ATTENDANCE & DINNER FOOD SELECTION STYLES */
.attendance-family-header-banner {
    background: linear-gradient(135deg, #fef3c7, #fef9c3) !important;
    border: 1.5px solid #fde047 !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    margin-bottom: 14px !important;
}

.attendance-member-card {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    margin-bottom: 10px !important;
    transition: all 0.15s ease !important;
}

.attendance-member-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

.attendance-member-card.is-attending {
    border-color: #10b981 !important;
    background: #ffffff !important;
}

.attendance-member-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}

.attendance-member-name {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

.attending-toggle-label {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    user-select: none !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    transition: all 0.15s ease !important;
}

.attending-toggle-label.active {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #86efac !important;
}

.attendance-days-box {
    background: #f8fafc !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    border: 1px solid #e2e8f0 !important;
}

.attendance-day-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    margin-bottom: 8px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.15s ease !important;
}

.attendance-day-row:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

.attendance-day-row:last-child {
    margin-bottom: 0 !important;
}

.attendance-day-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
}

.attendance-day-check {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    cursor: pointer !important;
    user-select: none !important;
}

.day-code-title {
    font-weight: 800 !important;
    color: #1e293b !important;
    font-size: 0.88rem !important;
}

.day-weekday-tag {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    color: #4338ca !important;
    background: #eef2ff !important;
    border: 1px solid #c7d2fe !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
}

.dinner-pref-container {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.dinner-pref-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #64748b !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.15s ease !important;
}

/* DAY PREFERENCE CONTROLS (FOOD PREFERENCE & DINNER CHOICE) */
.day-pref-controls {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    padding-top: 6px !important;
    border-top: 1px dashed #f1f5f9 !important;
    transition: opacity 0.2s ease !important;
}

.pref-pill-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    background: #f8fafc !important;
    padding: 2px 6px !important;
    border-radius: 6px !important;
    border: 1px solid #e2e8f0 !important;
}

.pref-group-label {
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    color: #475569 !important;
    margin-right: 2px !important;
}

.food-pref-pill, .dinner-pref-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 5px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #64748b !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.15s ease !important;
}

.food-pref-pill:hover, .dinner-pref-pill:hover {
    border-color: #94a3b8 !important;
    color: #1e293b !important;
}

.food-pref-pill.selected-regular {
    background: #fef2f2 !important;
    color: #991b1b !important;
    border-color: #f87171 !important;
    font-weight: 800 !important;
}

.food-pref-pill.selected-veg {
    background: #ecfdf5 !important;
    color: #15803d !important;
    border-color: #22c55e !important;
    font-weight: 800 !important;
}

.dinner-pref-pill.selected-feast {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #f59e0b !important;
    font-weight: 800 !important;
}

.dinner-pref-pill.selected-tiffin {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #3b82f6 !important;
    font-weight: 800 !important;
}

/* GENDER BADGES */
.badge-gender-male {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}

.badge-gender-female {
    background: #fdf2f8 !important;
    color: #be185d !important;
    border: 1px solid #fbcfe8 !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}

.badge-gender-other {
    background: #f3e8ff !important;
    color: #6b21a8 !important;
    border: 1px solid #e9d5ff !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}

/* KITCHEN CATERING MATRIX TABLE */
.catering-matrix-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 0.8rem !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid #cbd5e1 !important;
}

.catering-matrix-table th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    padding: 8px 10px !important;
    text-align: center !important;
    border-bottom: 1.5px solid #cbd5e1 !important;
    border-right: 1px solid #e2e8f0 !important;
}

.catering-matrix-table td {
    padding: 8px 10px !important;
    text-align: center !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-right: 1px solid #f1f5f9 !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

.catering-matrix-table tr:last-child td {
    border-bottom: none !important;
}

.catering-feast-count {
    color: #b45309 !important;
    font-weight: 800 !important;
}

.catering-tiffin-count {
    color: #047857 !important;
    font-weight: 800 !important;
}

.catering-total-count {
    color: #0f172a !important;
    font-weight: 800 !important;
}

/* -------------------------------------------------------------------------
   INTERACTIVE CLICKABLE MATRIX PILLS & CATERING ROSTER
   ------------------------------------------------------------------------- */
.catering-roster-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 3px 9px !important;
    border-radius: 999px !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.catering-roster-pill.veg-pill {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border-color: #a7f3d0 !important;
}

.catering-roster-pill.veg-pill:hover {
    background: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3) !important;
    transform: translateY(-1px) !important;
}

.catering-roster-pill.tiffin-pill {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}

.catering-roster-pill.tiffin-pill:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* Daily Special Dietary & Tiffin Roster Container */
.catering-roster-container {
    margin-top: 18px !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.roster-header-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
    border-bottom: 1.5px solid #f1f5f9 !important;
    padding-bottom: 12px !important;
}

.roster-title-area h3 {
    margin: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.roster-title-area p {
    margin: 3px 0 0 0 !important;
    font-size: 0.75rem !important;
    color: #64748b !important;
}

.roster-action-btns {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.roster-controls-bar {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    margin-bottom: 14px !important;
}

.roster-pills-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.roster-filter-label {
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    color: #475569 !important;
    min-width: 65px !important;
}

.roster-pill-group {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

.roster-pill {
    padding: 4px 12px !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.roster-pill:hover {
    border-color: #94a3b8 !important;
    background: #f1f5f9 !important;
}

.roster-pill.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25) !important;
}

.roster-pill.veg-pill.active {
    background: #059669 !important;
    color: #ffffff !important;
    border-color: #047857 !important;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25) !important;
}

.roster-pill.tiffin-pill.active {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4338ca !important;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25) !important;
}

.roster-search-input {
    width: 100% !important;
    padding: 7px 12px !important;
    font-size: 0.82rem !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 6px !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.roster-search-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* Roster Cards Grid */
.roster-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 10px !important;
}

.roster-person-card {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

.roster-person-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06) !important;
}

.roster-person-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 6px !important;
}

.roster-person-name {
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.roster-badges-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-items: center !important;
}

.roster-badge-choice {
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}

.roster-badge-choice.veg {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
}

.roster-badge-choice.tiffin {
    background: #eff6ff !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
}

.roster-family-meta {
    font-size: 0.74rem !important;
    color: #475569 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-top: 1px dashed #e2e8f0 !important;
    padding-top: 5px !important;
    margin-top: 2px !important;
}

.roster-phone-link {
    color: #2563eb !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}

.roster-phone-link:hover {
    text-decoration: underline !important;
}





/* -------------------------------------------------------------------------
   FAMILY ACCORDION DIRECTORY & GUEST MANAGEMENT
   ------------------------------------------------------------------------- */
.demographics-accordion-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
}

.family-accordion-item {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.family-accordion-item:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06) !important;
}

.family-accordion-item.is-expanded {
    border-color: #f59e0b !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12) !important;
}

.family-accordion-header {
    padding: 10px 14px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer !important;
    background: #fafaf9 !important;
    border-bottom: 1px solid transparent !important;
    transition: background 0.15s ease !important;
    user-select: none !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.family-accordion-item.is-expanded .family-accordion-header {
    background: linear-gradient(135deg, #fefce8, #fffdf5) !important;
    border-bottom: 1.5px solid #fef08a !important;
}

.family-acc-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
    flex: 1 !important;
}

.family-acc-toggle-btn {
    width: 26px !important;
    height: 26px !important;
    border-radius: 6px !important;
    background: #fef3c7 !important;
    border: 1px solid #f59e0b !important;
    color: #92400e !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: all 0.15s ease !important;
}

.family-accordion-item.is-expanded .family-acc-toggle-btn {
    background: #f59e0b !important;
    color: #ffffff !important;
}

.family-acc-titles {
    min-width: 0 !important;
}

.family-acc-head {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.family-acc-branch {
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    background: #f1f5f9 !important;
    padding: 1px 7px !important;
    border-radius: 4px !important;
}

.family-acc-phone {
    font-size: 0.74rem !important;
    color: #64748b !important;
    margin-top: 1px !important;
}

.family-acc-badges {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    flex-shrink: 0 !important;
}

.badge-acc-members {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #86efac !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
}

.badge-acc-guests {
    background: #e0e7ff !important;
    color: #3730a3 !important;
    border: 1px solid #c7d2fe !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
}

.family-accordion-content {
    padding: 12px 14px !important;
    background: #ffffff !important;
}

.family-acc-sections-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)) !important;
    gap: 14px !important;
}

.family-sub-panel {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #fcfcfc !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.family-sub-panel-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 8px 12px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.family-sub-panel-title {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    color: #334155 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.family-sub-panel-body {
    padding: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    max-height: 320px !important;
    overflow-y: auto !important;
}

.demo-guest-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 6px 10px !important;
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    gap: 8px !important;
}

.badge-guest-adult {
    background: #eff6ff !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
}

.badge-guest-kid {
    background: #fdf4ff !important;
    color: #86198f !important;
    border: 1px solid #f5d0fe !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
}

/* Attendance Guests Section */
.attendance-guest-card {
    background: #fffdf5 !important;
    border: 1.5px solid #fde68a !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    margin-bottom: 8px !important;
    transition: all 0.15s ease !important;
}

.attendance-guest-card:hover {
    border-color: #f59e0b !important;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.08) !important;
}

.attendance-guest-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}

.att-guest-name-input {
    padding: 6px 10px !important;
    border: 1.5px solid #c7d2fe !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-size: 0.86rem !important;
    box-sizing: border-box !important;
}

.att-guest-gender-select,
.att-guest-category-select {
    padding: 6px 8px !important;
    border: 1.5px solid #c7d2fe !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    background: #f5f7ff !important;
    color: #3730a3 !important;
    box-sizing: border-box !important;
}

/* Day-wise Catering Table Container & Scrollability */
.rsvp-catering-matrix {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    margin-top: 8px !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* ==========================================================================
   MOBILE & RESPONSIVE COMPREHENSIVE FIXES (DEMOGRAPHY, ATTENDANCE, TV KIOSK)
   ========================================================================== */

/* Prevent Grid blowout across all responsive viewports */
.rsvp-layout,
.rsvp-form-card,
.rsvp-summary-card,
.content-container,
.tab-pane {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 860px) {
    .rsvp-layout {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    /* 1. SECTION HEADERS & ACTION BUTTON GROUPS */
    .section-header-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .section-header-row h2 {
        font-size: 1.15rem !important;
        line-height: 1.3 !important;
    }
    .section-header-row .action-btn-group {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        gap: 6px !important;
    }
    .section-header-row .action-btn-group button,
    .section-header-row .action-btn-group .festive-btn {
        flex: 1 1 auto !important;
        justify-content: center !important;
        text-align: center !important;
        font-size: 0.78rem !important;
        padding: 6px 10px !important;
    }

    /* 2. DEMOGRAPHICS NOTICE & ATTENDANCE NOTICE BANNERS */
    .demographics-notice-banner,
    .attendance-authoritative-banner {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 10px 12px !important;
        font-size: 0.8rem !important;
    }
    .demographics-notice-banner > div,
    .attendance-authoritative-banner > div {
        font-size: 0.78rem !important;
        line-height: 1.35 !important;
    }

    /* 3. DEMOGRAPHICS METRICS GRID */
    .demographics-metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    .demo-metric-card {
        padding: 10px 8px !important;
        gap: 8px !important;
        border-radius: 10px !important;
    }
    .demo-metric-icon {
        font-size: 1.35rem !important;
    }
    .demo-metric-val {
        font-size: 1.15rem !important;
    }
    .demo-metric-label {
        font-size: 0.68rem !important;
        line-height: 1.2 !important;
    }

    /* 4. DEMOGRAPHICS TOOLBAR & FILTER PILLS */
    .demographics-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 10px !important;
        margin-bottom: 12px !important;
    }
    .demographics-search-wrap {
        width: 100% !important;
        flex: none !important;
    }
    .demographics-search-wrap input {
        width: 100% !important;
        box-sizing: border-box !important;
        font-size: 0.84rem !important;
        padding: 8px 12px 8px 32px !important;
    }
    .demographics-filter-pills {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        width: 100% !important;
    }
    .demo-filter-pill {
        padding: 4px 8px !important;
        font-size: 0.72rem !important;
    }

    /* 5. FAMILY ACCORDION LIST & CARDS */
    .family-accordion-item {
        border-radius: 8px !important;
    }
    .family-accordion-header {
        padding: 8px 10px !important;
        gap: 6px !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .family-acc-left {
        width: 100% !important;
        gap: 8px !important;
        min-width: 0 !important;
    }
    .family-acc-toggle-btn {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.85rem !important;
    }
    .family-acc-head {
        font-size: 0.88rem !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        word-break: break-word !important;
    }
    .family-acc-branch {
        font-size: 0.7rem !important;
        padding: 1px 5px !important;
    }
    .family-acc-phone {
        font-size: 0.72rem !important;
    }
    .family-acc-badges {
        width: 100% !important;
        padding-left: 32px !important;
        justify-content: flex-start !important;
        gap: 4px !important;
        box-sizing: border-box !important;
    }
    .badge-acc-members,
    .badge-acc-guests,
    .badge-late {
        font-size: 0.68rem !important;
        padding: 2px 6px !important;
    }
    .family-accordion-content {
        padding: 8px !important;
    }
    .family-acc-sections-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .family-sub-panel-header {
        padding: 6px 10px !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    .family-sub-panel-title {
        font-size: 0.78rem !important;
    }
    .family-sub-panel-body {
        max-height: none !important;
        padding: 6px !important;
        gap: 4px !important;
    }

    /* Demographic Member Row Mobile Fixes */
    .demo-member-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
        padding: 6px 8px !important;
    }
    .demo-member-info {
        width: 100% !important;
        min-width: 0 !important;
    }
    .demo-member-name {
        font-size: 0.82rem !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        line-height: 1.3 !important;
    }
    .demo-member-meta {
        font-size: 0.68rem !important;
        margin-top: 2px !important;
    }
    .demo-member-actions {
        width: 100% !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        border-top: 1px dashed #e2e8f0 !important;
        padding-top: 4px !important;
        margin-top: 2px !important;
        gap: 6px !important;
    }
    .demo-action-btn {
        font-size: 0.92rem !important;
        padding: 3px 6px !important;
        background: #f1f5f9 !important;
        border-radius: 4px !important;
    }

    /* Demographic Guest Row Mobile Fixes */
    .demo-guest-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
        padding: 6px 8px !important;
    }
    .demo-guest-row > div:first-child {
        width: 100% !important;
        min-width: 0 !important;
    }
    .demo-guest-row .demo-member-actions {
        width: 100% !important;
        display: flex !important;
        justify-content: flex-end !important;
        border-top: 1px dashed #e2e8f0 !important;
        padding-top: 4px !important;
        margin-top: 2px !important;
        gap: 6px !important;
    }

    /* 6. SMART ATTENDANCE TAB MOBILE RESPONSIVENESS */
    .rsvp-form-card,
    .rsvp-summary-card {
        padding: 12px 10px !important;
        border-radius: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .rsvp-search-box {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }
    #rsvp-member-search {
        font-size: 0.88rem !important;
        padding: 8px 10px !important;
        box-sizing: border-box !important;
    }
    #rsvp-family-select {
        font-size: 0.82rem !important;
        box-sizing: border-box !important;
    }

    /* Live Attendance & Catering Stats Grid (2-Column Scorecard) */
    .rsvp-stats-box {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
        margin-top: 10px !important;
    }
    .stat-item {
        padding: 6px 8px !important;
        font-size: 0.74rem !important;
        border-radius: 6px !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: flex-start !important;
        gap: 2px !important;
    }
    .stat-item.total-highlight {
        grid-column: 1 / -1 !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 12px !important;
    }
    .stat-item .stat-label {
        font-size: 0.68rem !important;
        color: #64748b !important;
        line-height: 1.2 !important;
    }
    .stat-item .stat-val {
        font-size: 0.95rem !important;
        font-weight: 800 !important;
    }

    /* Member Card & Day Preferences Mobile Alignment */
    .attendance-family-header-banner {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }
    .attendance-member-card {
        padding: 10px 8px !important;
        border-radius: 10px !important;
        margin-bottom: 8px !important;
    }
    .attendance-member-top {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
    }
    .attendance-member-name {
        width: 100% !important;
        font-size: 0.88rem !important;
        line-height: 1.3 !important;
    }
    .attending-toggle-label {
        width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        padding: 6px 10px !important;
        font-size: 0.78rem !important;
    }
    .attendance-days-box {
        padding: 6px 8px !important;
        border-radius: 8px !important;
    }
    .attendance-day-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
        padding: 8px 10px !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        background: #ffffff !important;
        margin-bottom: 6px !important;
    }
    .attendance-day-header {
        width: 100% !important;
    }
    .attendance-day-check {
        width: 100% !important;
        font-size: 0.84rem !important;
        font-weight: 800 !important;
        color: #1e293b !important;
        gap: 6px !important;
    }
    .day-weekday-tag {
        font-size: 0.7rem !important;
        padding: 1px 6px !important;
    }
    .day-pref-controls {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .pref-pill-group {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        box-sizing: border-box !important;
        gap: 4px !important;
        padding: 4px 6px !important;
        background: #ffffff !important;
        border-radius: 6px !important;
        border: 1px solid #e2e8f0 !important;
    }
    .pref-group-label {
        font-size: 0.68rem !important;
        font-weight: 800 !important;
        color: #475569 !important;
        min-width: 44px !important;
        flex-shrink: 0 !important;
    }
    .food-pref-pill,
    .dinner-pref-pill {
        flex: 1 1 0 !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 6px 4px !important;
        font-size: 0.72rem !important;
        min-height: 32px !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    /* Guest Attendance Card & Inputs on Mobile */
    .attendance-guest-card {
        padding: 8px !important;
        border-radius: 8px !important;
        margin-bottom: 8px !important;
    }
    .attendance-guest-top {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .attendance-guest-top > div:first-child {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
    }
    .att-guest-name-input {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        box-sizing: border-box !important;
        font-size: 0.88rem !important;
        padding: 8px !important;
    }
    .att-guest-gender-select,
    .att-guest-category-select {
        flex: 1 1 45% !important;
        min-width: 110px !important;
        font-size: 0.78rem !important;
        padding: 6px !important;
        box-sizing: border-box !important;
    }
    .attendance-guest-top > div:last-child {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 6px !important;
    }
    .attendance-guest-top > div:last-child .attending-toggle-label {
        flex: 1 1 auto !important;
        justify-content: center !important;
    }

    /* Catering Matrix Table Scrolling Container */
    .catering-matrix-table {
        min-width: 700px !important;
        font-size: 0.76rem !important;
    }
    .catering-matrix-table th,
    .catering-matrix-table td {
        padding: 6px 8px !important;
        font-size: 0.75rem !important;
    }

    /* Daily Dietary & Tiffin Roster Directory Mobile Fixes */
    .catering-roster-container {
        padding: 10px !important;
        border-radius: 10px !important;
        margin-top: 14px !important;
    }
    .roster-header-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
        padding-bottom: 8px !important;
    }
    .roster-title-area h3 {
        font-size: 0.88rem !important;
        line-height: 1.3 !important;
    }
    .roster-title-area p {
        font-size: 0.72rem !important;
    }
    .roster-action-btns {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    .roster-action-btns button {
        flex: 1 1 auto !important;
        justify-content: center !important;
        text-align: center !important;
        font-size: 0.74rem !important;
        padding: 6px 8px !important;
    }
    .roster-controls-bar {
        padding: 8px !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }
    .roster-pills-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
        width: 100% !important;
    }
    .roster-pill-group {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        width: 100% !important;
    }
    .roster-pill {
        padding: 3px 8px !important;
        font-size: 0.72rem !important;
    }
    .roster-search-input {
        font-size: 0.8rem !important;
        padding: 6px 10px !important;
    }
    .roster-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .roster-person-card {
        padding: 8px 10px !important;
    }

    /* 7. TV KIOSK SLIDESHOW MOBILE ALIGNMENT */
    .tv-kiosk-container {
        padding: 4px 6px !important;
        overflow: hidden !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        box-sizing: border-box !important;
    }
    .tv-header-bar {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 4px 6px !important;
        height: auto !important;
        min-height: 38px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 4px !important;
    }
    .tv-brand {
        display: flex !important;
        align-items: center !important;
        gap: 3px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    .tv-brand h2 {
        font-size: 0.76rem !important;
        max-width: 105px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .tv-status-badge {
        font-size: 0.62rem !important;
        padding: 2px 5px !important;
        max-width: 85px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex-shrink: 0 !important;
    }
    .tv-delay-pill-btn {
        font-size: 0.62rem !important;
        padding: 2px 5px !important;
        max-width: 75px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex-shrink: 0 !important;
    }
    .tv-clock {
        font-size: 0.7rem !important;
        flex-shrink: 0 !important;
    }
    .tv-exit-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.9rem !important;
        flex-shrink: 0 !important;
    }
    .tv-slide-viewport {
        flex: 1 1 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        box-sizing: border-box !important;
        padding: 4px 2px !important;
    }
    .tv-slide-content {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        height: auto !important;
        min-height: 100% !important;
        justify-content: flex-start !important;
    }
    .tv-footer-controls {
        height: auto !important;
        padding: 4px 6px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 4px !important;
        margin-top: 4px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .tv-controls-left {
        order: 1 !important;
        display: flex !important;
        gap: 3px !important;
    }
    .tv-controls-left .tv-nav-btn {
        font-size: 0.72rem !important;
        padding: 3px 6px !important;
    }
    .tv-controls-right {
        order: 2 !important;
        display: flex !important;
        gap: 4px !important;
        align-items: center !important;
    }
    .tv-slide-indicator {
        font-size: 0.7rem !important;
    }
    .tv-fs-btn {
        font-size: 0.75rem !important;
        padding: 2px 5px !important;
    }
    .tv-controls-center {
        order: 3 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        padding-top: 3px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-sizing: border-box !important;
    }
    .tv-day-filters {
        display: flex !important;
        gap: 4px !important;
        flex-wrap: nowrap !important;
        width: max-content !important;
    }
    .tv-filter-pill {
        font-size: 0.68rem !important;
        padding: 2px 6px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
}

/* Attendance Closed State Card */
.attendance-closed-state-card {
    text-align: center;
    padding: 40px 24px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
}
@media (max-width: 768px) {
    .attendance-closed-state-card {
        padding: 24px 14px !important;
    }
}


/* ==========================================================================
   16. ELECTION MANAGEMENT & VOTER ASSISTANCE PORTAL STYLES
   Makkuva Gram Panchayat (13-Salur AC, Parvathipuram Manyam)
   ========================================================================== */

/* Navigation Badge */
.election-nav-item {
    position: relative;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.12) 0%, rgba(217, 119, 6, 0.15) 100%) !important;
    border: 1px solid rgba(217, 119, 6, 0.4) !important;
    font-weight: 700 !important;
}
.election-nav-item:hover, .election-nav-item.active {
    background: linear-gradient(135deg, #7e22ce 0%, #b45309 100%) !important;
    color: #ffffff !important;
    border-color: #f59e0b !important;
    box-shadow: 0 4px 14px rgba(180, 83, 9, 0.35) !important;
}
.nav-sec-badge {
    font-size: 0.65rem;
    background: #dc2626;
    color: #ffffff;
    padding: 2px 5px;
    border-radius: 999px;
    font-weight: 800;
    margin-left: 4px;
    vertical-align: middle;
}

/* Container */
.election-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 8px 12px 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Top Header */
.election-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #4a0404 0%, #7f1d1d 50%, #991b1b 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 18px 24px;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(74, 4, 4, 0.25);
    flex-wrap: wrap;
    gap: 16px;
}
.election-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}
.election-crest {
    font-size: 2.8rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.election-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    color: #fef08a;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: -0.3px;
}
.election-subtitle {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #fecaca;
    font-weight: 500;
}
.election-top-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Key Facts Ribbon */
.election-key-facts-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
@media (max-width: 1024px) {
    .election-key-facts-bar {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 640px) {
    .election-key-facts-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}
.election-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.election-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.election-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
}
.election-kpi-card.highlight-gold::before { background: #d97706; }
.election-kpi-card.highlight-blue::before { background: #2563eb; }
.election-kpi-card.highlight-pink::before { background: #ec4899; }
.election-kpi-card.highlight-green::before { background: #059669; }
.election-kpi-card.highlight-purple::before { background: #7c3aed; }

.kpi-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}
.kpi-data {
    display: flex;
    flex-direction: column;
}
.kpi-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}
.kpi-lbl {
    font-size: 0.76rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 2px;
}
.kpi-sub {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Omnibar Search Card */
.election-search-card {
    background: #ffffff;
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.15);
    position: relative;
}
.search-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.search-title-row h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #991b1b;
}
.search-hint-pill {
    font-size: 0.75rem;
    background: #fef3c7;
    color: #92400e;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid #fde68a;
}
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon-prefix {
    position: absolute;
    left: 16px;
    font-size: 1.3rem;
    color: #94a3b8;
    pointer-events: none;
}
.search-omnibar-input {
    width: 100%;
    padding: 14px 44px 14px 48px;
    font-size: 1.05rem;
    font-weight: 600;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.search-omnibar-input:focus {
    outline: none;
    border-color: #d97706;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.18);
}
.search-clear-btn {
    position: absolute;
    right: 14px;
    background: #e2e8f0;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    transition: background 0.2s;
}
.search-clear-btn:hover {
    background: #cbd5e1;
    color: #0f172a;
}

/* Search Dropdown */
.search-suggest-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #d97706;
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.22);
    max-height: 420px;
    overflow-y: auto;
    z-index: 200;
}
.search-empty-state {
    padding: 24px;
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
}
.search-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s ease;
    gap: 12px;
}
.search-result-row:last-child {
    border-bottom: none;
}
.search-result-row:hover, .search-result-row.keyboard-selected {
    background: #fffbeb;
}
.result-badge-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}
.result-ward-chip {
    background: #7f1d1d;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    text-align: center;
}
.result-serial-chip {
    background: #f1f5f9;
    color: #334155;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #e2e8f0;
}
.result-info-col {
    flex: 1;
    min-width: 0;
}
.result-name-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.result-name-te {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}
.result-name-en {
    font-size: 0.85rem;
    color: #475569;
}
.result-gender-badge {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 700;
}
.badge-male { background: #dbeafe; color: #1e40af; }
.badge-female { background: #fce7f3; color: #9d174d; }

.result-sub-row {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 3px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.result-sub-row b {
    color: #1e293b;
}
.result-epic b {
    color: #b45309;
    font-family: monospace;
}
.search-match {
    background: #fef08a;
    color: #854d0e;
    font-weight: 800;
    padding: 0 2px;
    border-radius: 2px;
}
.result-action-col {
    font-size: 1.1rem;
    color: #d97706;
}

/* ==========================================
   SPLIT-SCREEN VOTER CARD
   ========================================== */
.voter-split-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    display: flex;
    gap: 28px;
    align-items: stretch;
}
@media (max-width: 860px) {
    .voter-split-card {
        flex-direction: column-reverse;
        padding: 16px;
        gap: 18px;
    }
}

.voter-details-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Prominent Ward & Booth Cluster */
.voter-ward-cluster {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
}

/* EXTRA-LARGE WARD BADGE */
.big-ward-badge {
    font-size: 2rem;
    font-weight: 900;
    color: #7f1d1d;
    text-shadow: 0 1px 2px rgba(0,0,0,0.08);
    letter-spacing: -0.5px;
    line-height: 1.15;
    display: flex;
    align-items: center;
    gap: 10px;
}
@media (max-width: 640px) {
    .big-ward-badge {
        font-size: 1.6rem;
    }
}

/* POLLING BOOTH SUB-BADGE UNDERNEATH */
.sub-booth-badge {
    font-size: 0.95rem;
    font-weight: 600;
    color: #451a03;
    line-height: 1.35;
    padding-top: 4px;
    border-top: 1px dashed rgba(217, 119, 6, 0.4);
}
.sub-booth-badge b {
    color: #991b1b;
    font-weight: 800;
    font-size: 1.05rem;
}

/* Voter Meta Chips */
.voter-chips-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.voter-meta-chip {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}
.serial-chip {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-size: 0.85rem;
}
.hab-chip {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
.gp-chip {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Name Block */
.voter-name-block {
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.voter-name-telugu {
    font-size: 1.65rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.25;
}
.voter-name-english {
    font-size: 1.05rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 2px;
}

/* Details Grid */
.voter-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (max-width: 640px) {
    .voter-fields-grid {
        grid-template-columns: 1fr;
    }
}
.voter-field-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.voter-field-item.full-width {
    grid-column: 1 / -1;
}
.field-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.field-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

/* Door with Family Members button */
.door-with-family {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.door-with-family b {
    font-size: 1.1rem;
    color: #0f172a;
}
.btn-household-family {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-household-family:hover {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
}

/* EPIC Badge */
.epic-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}
.epic-badge {
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 800;
    color: #991b1b;
    background: #fef2f2;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #fecaca;
    letter-spacing: 0.5px;
}
.btn-copy-epic {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-copy-epic:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Action Buttons */
.voter-action-row {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.wa-share-btn {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    color: #ffffff !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}
.wa-share-btn:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important;
}
.print-slip-btn {
    background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
}
.print-slip-btn:hover {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
}

/* Right Photo Panel */
.voter-photo-col {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}
@media (max-width: 860px) {
    .voter-photo-col {
        width: 100%;
        align-items: center;
    }
}
.photo-frame-outer {
    position: relative;
    width: 160px;
    height: 195px;
    border-radius: 12px;
    overflow: hidden;
    border: 4px solid #f59e0b;
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.25);
    background: #f1f5f9;
    cursor: pointer;
}
.voter-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.photo-frame-outer:hover .voter-photo-img {
    transform: scale(1.05);
}
.photo-zoom-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.photo-frame-outer:hover .photo-zoom-overlay {
    opacity: 1;
}
.photo-caption-note {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    text-align: center;
}

/* ==========================================
   DEMOGRAPHICS & ANALYTICS DASHBOARD
   ========================================== */
.election-analytics-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.analytics-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}
.analytics-sub {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: #64748b;
}
.analytics-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.ward-select-dropdown {
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #f8fafc;
    color: #0f172a;
}
.gender-pill-group {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
}
.gender-filter-pill {
    border: none;
    background: transparent;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}
.gender-filter-pill.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Aggregate Bar */
.demo-aggregate-bar-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.demo-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.demo-active-count {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}
.demo-ratio-calc {
    font-size: 0.85rem;
    font-weight: 700;
    color: #059669;
}
.demo-dual-bar {
    height: 14px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    display: flex;
}
.bar-slice.male {
    background: #2563eb;
    height: 100%;
}
.bar-slice.female {
    background: #ec4899;
    height: 100%;
}
.demo-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 700;
}
.label-male { color: #1d4ed8; }
.label-female { color: #be185d; }

/* Ward Cards Grid */
.demo-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 14px;
}
.ward-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}
.ward-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.ward-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.ward-title {
    display: flex;
    gap: 6px;
    align-items: center;
}
.ward-pill {
    background: #7f1d1d;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
}
.booth-pill {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}
.ward-total {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}
.ward-total small {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
}
.ward-habitation {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0369a1;
}
.ward-booth-name {
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.3;
}
.ward-bar-container {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    display: flex;
    margin-top: 4px;
}
.bar-fill.male {
    background: #2563eb;
    height: 100%;
}
.bar-fill.female {
    background: #ec4899;
    height: 100%;
}
.ward-breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.74rem;
    font-weight: 600;
}
.text-male { color: #1d4ed8; }
.text-female { color: #be185d; }
.ward-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    margin-top: 2px;
}
.ward-ratio {
    font-size: 0.74rem;
    color: #059669;
    font-weight: 700;
}
.ward-dl-btn {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.ward-dl-btn:hover {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
}

/* ==========================================
   EXCEL DOWNLOAD CENTER (PASSWORD 2 GATE)
   ========================================== */
.election-excel-card {
    background: #ffffff;
    border: 2px solid #16a34a;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.excel-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}
.excel-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}
.excel-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #14532d;
}
.excel-sub {
    margin: 4px 0 0;
    font-size: 0.84rem;
    color: #166534;
}
.excel-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.excel-selection-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.excel-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}
.excel-dropdown {
    flex: 1;
    min-width: 280px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}
.excel-dropdown:focus {
    outline: none;
    border-color: #16a34a;
    background: #ffffff;
}
.excel-generate-btn {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
}
.excel-security-notice {
    font-size: 0.78rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

/* ==========================================
   MODALS (AUTHENTICATION, ZOOM, FAMILY)
   ========================================== */
.election-auth-modal {
    max-width: 440px !important;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border: 2px solid #f59e0b;
}
.election-modal-header {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    color: #ffffff;
    padding: 20px 24px;
    text-align: center;
}
.election-modal-header.excel-theme {
    background: linear-gradient(135deg, #14532d 0%, #166534 100%);
}
.auth-icon {
    font-size: 2.4rem;
    display: block;
    margin-bottom: 6px;
}
.election-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fef08a;
}
.election-modal-header p {
    margin: 4px 0 0;
    font-size: 0.78rem;
    opacity: 0.85;
}
.election-modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auth-hint {
    font-size: 0.84rem;
    color: #475569;
    margin: 0;
    line-height: 1.4;
}
.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.auth-input-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
}
.election-auth-input {
    padding: 12px 14px;
    font-size: 1.05rem;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}
.election-auth-input:focus {
    outline: none;
    border-color: #d97706;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.15);
}
.auth-error-msg {
    font-size: 0.78rem;
    color: #dc2626;
    font-weight: 700;
    min-height: 18px;
}
.election-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Photo Zoom Dialog */
.photo-zoom-dialog {
    max-width: 420px !important;
    background: #0f172a;
    color: #ffffff;
    border-radius: 18px;
    padding: 20px;
    text-align: center;
    position: relative;
    border: 2px solid #f59e0b;
}
.modal-close-corner {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close-corner:hover {
    background: rgba(255,255,255,0.4);
}
.zoom-img-box {
    width: 240px;
    height: 300px;
    margin: 10px auto;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid #f59e0b;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #1e293b;
}
.zoom-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.zoom-caption {
    font-size: 0.88rem;
    line-height: 1.4;
    color: #e2e8f0;
    margin-top: 10px;
}
.zoom-caption b {
    color: #fef08a;
}

/* Household Family Members Dialog */
.family-modal-dialog {
    width: 95vw !important;
    max-width: 960px !important;
    max-height: 90vh !important;
    height: auto !important;
    padding: 0 !important;
    border-top: none !important;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(16, 185, 129, 0.35);
    border: 2px solid #10b981;
    animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.family-modal-header {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    color: #ffffff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #059669;
    flex-shrink: 0;
    position: relative;
}
.family-modal-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 36px;
}
.family-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #ecfdf5;
    letter-spacing: -0.01em;
}
.family-modal-sub {
    font-size: 0.82rem;
    color: #a7f3d0;
    font-weight: 500;
}
.family-modal-search-bar {
    padding: 10px 24px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.family-modal-search-bar input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.88rem;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 12px center;
    outline: none;
    transition: all 0.2s ease;
}
.family-modal-search-bar input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
.family-modal-body {
    padding: 18px 24px 24px 24px;
    flex: 1 1 auto;
    max-height: calc(90vh - 130px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #f8fafc;
}
.family-modal-body::-webkit-scrollbar {
    width: 8px;
}
.family-modal-body::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 8px;
}
.family-modal-body::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 8px;
}
.family-modal-body::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
.family-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 12px;
}
.demarcation-alert-banner {
    grid-column: 1 / -1;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    font-size: 0.88rem;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.45;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.08);
}
.family-member-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.family-member-card:hover {
    background: #ecfdf5;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.15);
}
.family-member-card.active-family-row {
    background: #ecfdf5;
    border: 2px solid #059669;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.2);
}
.family-member-thumb {
    width: 50px;
    height: 62px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    flex-shrink: 0;
}
.family-member-details {
    flex: 1;
    min-width: 0;
}
.family-name {
    font-size: 0.98rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.family-name small {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 600;
}
.family-sub {
    font-size: 0.78rem;
    color: #475569;
    margin-top: 3px;
    line-height: 1.4;
}
.family-epic {
    font-family: monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: #b45309;
    margin-top: 3px;
}
.family-view-btn {
    background: #ffffff;
    border: 1px solid #10b981;
    color: #047857;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.family-view-btn:hover {
    background: #047857;
    color: #ffffff;
}

@media (max-width: 860px) {
    .family-list-container {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .family-modal-dialog {
        width: 98vw !important;
        max-width: 100% !important;
        border-radius: 16px;
    }
    .family-modal-header {
        padding: 12px 16px;
    }
    .family-modal-header h3 {
        font-size: 1.05rem;
    }
    .family-modal-search-bar {
        padding: 8px 14px;
    }
    .family-modal-body {
        padding: 12px 14px 18px 14px;
        max-height: calc(92vh - 120px);
    }
    .family-list-container {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .family-member-card {
        padding: 10px 12px;
        gap: 10px;
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}
.shake-anim {
    animation: shake 0.4s ease;
    border-color: #dc2626 !important;
}

/* ==========================================================================
   AGE GROUP & RANGE EXPLORER STYLES
   ========================================================================== */
.election-age-card {
    background: #ffffff;
    border: 2px solid #8b5cf6;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 26px rgba(139, 92, 246, 0.1);
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.age-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.age-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #5b21b6;
}
.age-sub {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: #64748b;
}
.age-ward-badge {
    background: #ede9fe;
    color: #6d28d9;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #ddd6fe;
}

/* Filter Controls */
.age-filter-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fdf4ff;
    padding: 16px 20px;
    border-radius: 14px;
    border: 1px solid #fae8ff;
}
.filter-group-lbl {
    font-size: 0.82rem;
    font-weight: 800;
    color: #701a75;
    white-space: nowrap;
    align-self: center;
}
.age-quick-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.age-pill {
    background: #ffffff;
    border: 1px solid #d8b4fe;
    color: #6b21a8;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.age-pill:hover {
    background: #f3e8ff;
    border-color: #a855f7;
    transform: translateY(-1px);
}
.age-pill.active {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    border-color: #5b21b6;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.25);
}

/* Custom Range Box */
.age-custom-range-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px dashed #e9d5ff;
}
.range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.age-number-input {
    width: 105px;
    padding: 6px 10px;
    border: 1.5px solid #c084fc;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
    background: #ffffff;
}
.age-number-input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.range-separator {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b21a8;
}
.age-apply-btn {
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
}
.age-reset-btn {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
}

/* Results Summary Bar */
.age-results-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 18px;
    flex-wrap: wrap;
    gap: 12px;
}
.age-results-count {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 600;
}
.age-results-count b {
    color: #7c3aed;
    font-size: 1.15rem;
}
.filter-details-tag {
    font-size: 0.82rem;
    color: #64748b;
    margin-left: 6px;
}
.excel-age-btn {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    color: #ffffff !important;
    font-size: 0.82rem !important;
    padding: 8px 16px !important;
    font-weight: 700 !important;
}

/* Filtered Voter Table */
.age-voter-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.age-voter-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    text-align: left;
}
.age-voter-table thead {
    background: #f1f5f9;
    border-bottom: 2px solid #cbd5e1;
}
.age-voter-table th {
    padding: 10px 12px;
    font-weight: 800;
    color: #334155;
    white-space: nowrap;
}
.age-voter-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.age-table-row {
    cursor: pointer;
    transition: background 0.15s ease;
}
.age-table-row:hover {
    background: #fdf4ff !important;
}
.age-thumb {
    width: 36px;
    height: 45px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #cbd5e1;
    display: block;
}
.serial-badge-sm {
    color: #991b1b;
    font-size: 0.88rem;
}
.name-te-cell {
    font-weight: 800;
    color: #0f172a;
}
.name-en-cell {
    font-size: 0.76rem;
    color: #64748b;
}
.table-ward-pill {
    background: #7f1d1d;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
}
.table-booth-pill {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    white-space: nowrap;
}
.table-age-val {
    font-size: 1.05rem;
    color: #0f172a;
}
.table-gender-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    white-space: nowrap;
}
.table-gender-tag.male { background: #dbeafe; color: #1e40af; }
.table-gender-tag.female { background: #fce7f3; color: #9d174d; }
.table-epic-tag {
    font-family: monospace;
    font-weight: 800;
    color: #b45309;
    font-size: 0.84rem;
}
.table-view-btn {
    background: #f5f3ff;
    border: 1px solid #c4b5fd;
    color: #6d28d9;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.table-view-btn:hover {
    background: #7c3aed;
    color: #ffffff;
    border-color: #7c3aed;
}

/* Pagination Bar */
.age-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 4px;
    flex-wrap: wrap;
    gap: 12px;
}
.pag-info {
    font-size: 0.84rem;
    color: #475569;
}
.pag-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pag-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.pag-btn:hover:not(:disabled) {
    background: #f1f5f9;
    color: #0f172a;
}
.pag-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.pag-btn.num.active {
    background: #7c3aed;
    color: #ffffff;
    border-color: #7c3aed;
}


/* =========================================================
   EXCLUSIVE POLL MANAGEMENT MODE (ZERO PONGAL CONTENT)
   ========================================================= */
body.election-portal-mode .main-header,
body.election-portal-mode .header-toranam,
body.election-portal-mode .header-muggu-bg,
body.election-portal-mode .corner-muggu,
body.election-portal-mode .toranam-garland,
body.election-portal-mode .festival-pulse-bar,
body.election-portal-mode .main-footer,
body.election-portal-mode #emergency-banner,
body.election-portal-mode #celebration-overlay {
    display: none !important;
}

body.election-portal-mode {
    background: #090e17 !important;
    background-image: radial-gradient(circle at 50% 0%, #1e293b 0%, #090e17 100%) !important;
    color: #f8fafc !important;
    min-height: 100vh;
}

body.election-portal-mode .app-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 16px 48px;
}

body.election-portal-mode .content-container {
    padding-top: 10px;
}

/* Civic Official Poll Top Header */
body.election-portal-mode .election-top-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #172554 100%) !important;
    border: 2px solid #3b82f6 !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.45) !important;
}

body.election-portal-mode .election-title {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4) !important;
}

body.election-portal-mode .election-subtitle {
    color: #93c5fd !important;
}

/* Official Poll Buttons (Exclusive, Professional, Zero Festive Styling) */
.poll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.poll-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.22);
}

.poll-gold-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: 1px solid #fbbf24;
}

.poll-gold-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #0f172a;
}

.poll-return-btn {
    background: #334155;
    color: #f8fafc;
    border: 1px solid #475569;
}

.poll-return-btn:hover {
    background: #475569;
    color: #ffffff;
}

.poll-red-btn {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #ffffff;
    border: 1px solid #f87171;
}

.poll-red-btn:hover {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

.poll-wa-btn {
    background: #25d366 !important;
    color: #ffffff !important;
    font-weight: 800;
    padding: 12px 20px;
}

.poll-wa-btn:hover {
    background: #20ba59 !important;
}

.poll-print-btn {
    background: #475569 !important;
    color: #ffffff !important;
    font-weight: 700;
    padding: 12px 20px;
}

.poll-print-btn:hover {
    background: #334155 !important;
}

/* Exclusive Poll Footer */
.election-exclusive-footer {
    margin-top: 28px;
    padding: 22px 24px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 14px;
    text-align: center;
    color: #94a3b8;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.poll-footer-brand {
    font-size: 1.05rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 5px;
}

.poll-footer-sub {
    font-size: 0.82rem;
    color: #93c5fd;
    margin-bottom: 6px;
}

.poll-footer-security {
    font-size: 0.76rem;
    color: #60a5fa;
    font-weight: 600;
}


/* Orange highlight for Highest Voter Family KPI Card */
.election-kpi-card.highlight-orange::before { background: #ea580c; }
.election-kpi-card.highlight-orange:hover {
    border-color: #ea580c;
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.15);
}

/* Demarcation Alert Banner in Family Modal */
.demarcation-alert-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.45;
}
.demarcation-alert-banner .alert-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Family Ward Chip */
.family-ward-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    vertical-align: middle;
    margin-left: 6px;
}
.family-ward-chip.cross-ward-chip {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* Top Families Leaderboard Card */
.top-families-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 24px;
    margin-top: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.top-families-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}
.top-families-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}
.top-families-sub {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: #64748b;
}
.top-family-kpi-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
    transition: transform 0.15s;
}
.top-family-kpi-badge:hover {
    transform: scale(1.04);
}
.top-families-table-wrapper {
    overflow-x: auto;
}
.top-families-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}
.top-families-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.top-families-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}
.top-families-table tr:hover {
    background: #f8fafc;
}
.lead-fam-name {
    font-weight: 700;
    color: #0f172a;
}
.lead-fam-note {
    font-size: 0.74rem;
    color: #64748b;
    margin-top: 2px;
}
.lead-door-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 0.8rem;
}
.lead-count-badge {
    color: #059669;
    font-weight: 800;
}
.lead-view-btn {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.lead-view-btn:hover {
    background: #10b981;
    color: #ffffff;
}

/* ==========================================================================
   ELECTION TAB - MOBILE RESPONSIVENESS & OVERFLOW ELIMINATION (100% FLUID)
   ========================================================================== */

/* Prevent page-level horizontal scroll on all screen sizes */
body.election-portal-mode {
    overflow-x: hidden !important;
    width: 100vw;
    max-width: 100%;
}
body.election-portal-mode .app-layout {
    overflow-x: hidden !important;
    width: 100%;
    box-sizing: border-box;
}
.election-container {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure all cards within election container never exceed 100% */
.election-top-header,
.election-key-facts-bar,
.election-search-card,
.voter-split-card,
.election-analytics-card,
.top-families-card,
.election-age-card,
.election-excel-card,
.election-exclusive-footer {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    /* 1. App Layout & Container Padding */
    body.election-portal-mode .app-layout {
        padding: 8px 8px 36px !important;
    }
    .election-container {
        padding: 4px 0 36px !important;
        gap: 14px !important;
    }

    /* 2. Top Header */
    .election-top-header {
        padding: 14px 12px !important;
        border-radius: 12px !important;
        gap: 12px !important;
    }
    .election-brand {
        gap: 10px !important;
    }
    .election-crest {
        font-size: 2.2rem !important;
    }
    .election-title {
        font-size: 1.15rem !important;
        line-height: 1.35 !important;
    }
    .election-subtitle {
        font-size: 0.78rem !important;
        line-height: 1.4 !important;
    }
    .election-top-actions {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .election-top-actions .poll-btn {
        width: 100% !important;
        padding: 8px 10px !important;
        font-size: 0.78rem !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    .election-top-actions .poll-btn:first-child {
        grid-column: 1 / -1 !important;
    }

    /* 3. Key Facts Ribbon */
    .election-key-facts-bar {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .election-kpi-card {
        padding: 10px 8px !important;
        gap: 8px !important;
        border-radius: 10px !important;
        min-width: 0 !important;
    }
    .kpi-icon {
        font-size: 1.4rem !important;
    }
    .kpi-num {
        font-size: 1.1rem !important;
        line-height: 1.15 !important;
    }
    .kpi-lbl {
        font-size: 0.68rem !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
    }
    .kpi-sub {
        font-size: 0.64rem !important;
    }

    /* 4. Omnibar Search */
    .election-search-card {
        padding: 14px 12px !important;
        border-radius: 12px !important;
    }
    .search-title-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
    .search-title-row h3 {
        font-size: 1rem !important;
    }
    .search-hint-pill {
        font-size: 0.7rem !important;
        padding: 2px 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }
    .search-omnibar-input {
        font-size: 0.9rem !important;
        padding: 12px 36px 12px 38px !important;
        border-radius: 10px !important;
    }
    .search-suggest-dropdown {
        border-radius: 10px !important;
        max-height: 350px !important;
    }
    .search-result-row {
        padding: 10px 12px !important;
        gap: 8px !important;
    }
    .result-name-te {
        font-size: 0.92rem !important;
    }
    .result-name-en {
        font-size: 0.78rem !important;
    }

    /* 5. Split-Screen Voter Card */
    .voter-split-card {
        padding: 12px !important;
        border-radius: 12px !important;
        gap: 14px !important;
    }
    .voter-ward-cluster {
        padding: 12px !important;
        border-radius: 10px !important;
        gap: 4px !important;
    }
    .big-ward-badge {
        font-size: 1.35rem !important;
        line-height: 1.2 !important;
    }
    .sub-booth-badge {
        font-size: 0.82rem !important;
        line-height: 1.3 !important;
    }
    .voter-chips-row {
        gap: 4px !important;
    }
    .voter-meta-chip {
        font-size: 0.7rem !important;
        padding: 2px 7px !important;
    }
    .voter-name-telugu {
        font-size: 1.3rem !important;
    }
    .voter-name-english {
        font-size: 0.9rem !important;
    }
    .voter-fields-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .voter-field-item {
        padding: 8px 10px !important;
        border-radius: 8px !important;
    }
    .field-label {
        font-size: 0.7rem !important;
    }
    .field-value {
        font-size: 0.88rem !important;
        word-break: break-word !important;
    }
    .door-with-family {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }
    .btn-household-family {
        font-size: 0.72rem !important;
        padding: 3px 6px !important;
    }
    .voter-action-row {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }
    .wa-share-btn, .print-slip-btn {
        width: 100% !important;
        box-sizing: border-box !important;
        justify-content: center !important;
        padding: 10px 14px !important;
        font-size: 0.84rem !important;
    }
    .photo-frame-outer {
        width: 130px !important;
        height: 160px !important;
    }

    /* 6. Demographics & Analytics Card */
    .election-analytics-card {
        padding: 14px 12px !important;
        border-radius: 12px !important;
        gap: 12px !important;
    }
    .analytics-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .analytics-header h3 {
        font-size: 1.05rem !important;
    }
    .analytics-filters {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    .ward-select-dropdown {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        font-size: 0.8rem !important;
    }
    .gender-pill-group {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        box-sizing: border-box !important;
    }
    .gender-filter-pill {
        padding: 6px 4px !important;
        font-size: 0.72rem !important;
        text-align: center !important;
    }
    .demo-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .ward-stat-card {
        padding: 10px 12px !important;
    }

    /* 7. Tables Horizontal Scroll Lock (No page-level blowout) */
    .top-families-card {
        padding: 14px 10px !important;
        border-radius: 12px !important;
    }
    .top-families-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .top-family-kpi-badge {
        width: 100% !important;
        text-align: center !important;
        font-size: 0.78rem !important;
        padding: 6px 10px !important;
        box-sizing: border-box !important;
    }
    .top-families-table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
    }
    .top-families-table {
        min-width: 540px !important;
        font-size: 0.78rem !important;
    }

    /* 8. Age Group Explorer */
    .election-age-card {
        padding: 14px 10px !important;
        border-radius: 12px !important;
    }
    .age-card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .age-card-header h3 {
        font-size: 1.05rem !important;
    }
    .age-quick-pills {
        gap: 6px !important;
    }
    .age-pill {
        font-size: 0.72rem !important;
        padding: 5px 9px !important;
    }
    .age-custom-range-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    .range-inputs {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .age-number-input {
        flex: 1 !important;
        min-width: 60px !important;
        font-size: 0.8rem !important;
    }
    .range-separator {
        font-size: 0.74rem !important;
    }
    .age-apply-btn, .age-reset-btn {
        flex: 1 !important;
        font-size: 0.74rem !important;
        padding: 6px 8px !important;
    }
    .age-results-summary-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 10px !important;
    }
    .excel-age-btn {
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    .age-voter-table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        border-radius: 8px !important;
    }
    .age-voter-table {
        min-width: 650px !important;
        font-size: 0.78rem !important;
    }

    /* 9. Excel Download Section */
    .election-excel-card {
        padding: 14px 12px !important;
        border-radius: 12px !important;
        gap: 12px !important;
    }
    .excel-card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .excel-card-header h3 {
        font-size: 1.05rem !important;
    }
    .excel-selection-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    .excel-dropdown {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        font-size: 0.82rem !important;
    }
    .excel-generate-btn {
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    .excel-security-notice {
        font-size: 0.72rem !important;
    }
}

@media (max-width: 380px) {
    .election-key-facts-bar {
        grid-template-columns: 1fr !important;
    }
    .election-top-actions {
        grid-template-columns: 1fr !important;
    }
}
