/* SCN Agency Management System - Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   LANDING PAGE REDESIGN
   ============================================ */

body.landing-page {
    background: #0a0e1a;
    overflow-x: hidden;
}

.landing-page-redesign {
    background: #0a0e1a;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Top Navigation */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2.5rem;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.landing-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

.landing-nav-brand i {
    color: #60a5fa;
    font-size: 1.5rem;
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-ghost {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-ghost:hover {
    color: #ffffff;
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.05);
}

.btn-landing-cta {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.4);
}

.btn-landing-cta:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

/* Hero Section */
.landing-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.landing-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
}

.hero-glow-1 {
    width: 700px;
    height: 700px;
    background: #2563eb;
    top: -250px;
    right: -150px;
    animation: glowPulse 8s ease-in-out infinite;
}

.hero-glow-2 {
    width: 500px;
    height: 500px;
    background: #7c3aed;
    bottom: -150px;
    left: -100px;
    animation: glowPulse 6s ease-in-out infinite reverse;
}

.hero-glow-3 {
    width: 350px;
    height: 350px;
    background: #06b6d4;
    top: 40%;
    left: 30%;
    animation: glowPulse 10s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.08); }
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

.landing-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: #93c5fd;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease;
}

.hero-badge i {
    font-size: 0.9rem;
}

.hero-headline {
    font-size: 3.75rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-highlight {
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subheadline {
    font-size: 1.15rem;
    color: #94a3b8;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.btn-hero-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.45);
}

.btn-hero-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.55);
    transform: translateY(-2px);
}

.btn-hero-phone {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-hero-phone:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.hero-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #475569;
    font-size: 0.8rem;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-trust i {
    color: #22c55e;
    font-size: 0.9rem;
}

.hero-scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-top: 2.5rem;
    color: #475569;
    font-size: 0.75rem;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.hero-scroll-indicator i {
    font-size: 1.25rem;
    color: #60a5fa;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

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

/* Pain Points Section */
.landing-pain {
    background: #0f1424;
    padding: 6rem 2rem;
    position: relative;
}

.pain-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.section-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #60a5fa;
    margin-bottom: 0.75rem;
}

.section-desc {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 500px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.pain-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.pain-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.pain-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-4px);
}

.pain-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 1.25rem;
}

.pain-icon-red { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.pain-icon-orange { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.pain-icon-blue { background: rgba(37, 99, 235, 0.12); color: #60a5fa; }
.pain-icon-purple { background: rgba(139, 92, 246, 0.12); color: #a78bfa; }

.pain-card h3 {
    color: #f1f5f9;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.pain-card p {
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Eligibility Section */
.landing-eligibility {
    background: #0a0e1a;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.eligibility-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-eyebrow-light {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #60a5fa;
    margin-bottom: 0.75rem;
}

.eligibility-headline {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.eligibility-highlight {
    background: linear-gradient(135deg, #34d399, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.eligibility-desc {
    font-size: 1.05rem;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.eligibility-list {
    list-style: none;
    padding: 0;
}

.eligibility-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e2e8f0;
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

.eligibility-list li i {
    color: #34d399;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.eligibility-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 350px;
}

.eligibility-card-stack {
    position: relative;
    width: 280px;
    height: 320px;
}

.float-card {
    position: absolute;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.95rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.float-card:hover {
    transform: scale(1.05);
}

.float-card i {
    font-size: 1.5rem;
}

.float-card-1 {
    top: 0;
    left: 0;
    right: 0;
    animation: floatCard1 6s ease-in-out infinite;
}

.float-card-1 i { color: #60a5fa; }

.float-card-2 {
    top: 110px;
    left: 20px;
    right: -20px;
    animation: floatCard2 6s ease-in-out infinite 1s;
}

.float-card-2 i { color: #f472b6; }

.float-card-3 {
    top: 220px;
    left: -10px;
    right: 10px;
    animation: floatCard3 6s ease-in-out infinite 2s;
}

.float-card-3 i { color: #34d399; }

@keyframes floatCard1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes floatCard2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes floatCard3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* CTA Section */
.landing-cta {
    background: #0f1424;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.cta-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
}

.cta-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: #2563eb;
    border-radius: 50%;
    filter: blur(160px);
    opacity: 0.15;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cta-container h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.cta-container p {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-cta-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.45);
}

.btn-cta-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.55);
    transform: translateY(-2px);
}

.btn-cta-phone {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-cta-phone:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.btn-cta-status {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 24px rgba(5, 150, 105, 0.4);
}

.btn-cta-status:hover {
    background: linear-gradient(135deg, #047857, #059669);
    box-shadow: 0 8px 32px rgba(5, 150, 105, 0.5);
    transform: translateY(-2px);
}

/* Voicemail Nav Badge */
.voicemail-nav-badge {
    position: absolute;
    top: 2px;
    right: 8px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(239,68,68,0.4);
    animation: vmBadgePulse 2s ease-in-out infinite;
    /* Override .nav-item span hiding for collapsed sidebar */
    opacity: 1 !important;
    width: auto !important;
    overflow: visible !important;
}
@keyframes vmBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Inline Voicemail Player Row */
.vm-player-row td {
    padding: 1rem 1.5rem !important;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-left: 3px solid #7c3aed;
}
.vm-player-row audio {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
}
.vm-player-details {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.vm-player-info {
    flex: 1;
    min-width: 200px;
}
.vm-player-info-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.vm-player-info-meta {
    color: #64748b;
    font-size: 0.85rem;
}
.vm-player-audio {
    flex: 1;
    min-width: 250px;
}
.vm-player-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

/* Footer */
.landing-footer {
    background: #080b14;
    padding: 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
}

.footer-brand i {
    color: #60a5fa;
    font-size: 1.25rem;
}

.footer-copy {
    color: #475569;
    font-size: 0.8rem;
}

.footer-phone {
    color: #94a3b8;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
}

.footer-phone:hover {
    color: #60a5fa;
}

/* Landing page responsive */
@media (max-width: 900px) {
    .pain-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .eligibility-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .eligibility-visual {
        min-height: 280px;
    }
    .hero-headline {
        font-size: 2.75rem;
    }
    .cta-container h2 {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .landing-nav {
        padding: 0.75rem 1.25rem;
    }
    .landing-nav-brand span {
        display: none;
    }
    .btn-ghost span,
    .btn-landing-cta span {
        display: none;
    }
    .landing-hero {
        padding: 7rem 1.25rem 3rem;
    }
    .hero-headline {
        font-size: 2.25rem;
    }
    .hero-subheadline {
        font-size: 1rem;
    }
    .pain-grid {
        grid-template-columns: 1fr;
    }
    .eligibility-headline {
        font-size: 2rem;
    }
    .cta-container h2 {
        font-size: 1.75rem;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--success);
    color: #ffffff;
}

.btn-success:hover {
    background: #059669;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-logout:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-sm {
    max-width: 400px;
}

.modal-lg {
    max-width: 700px;
}

.modal-xl {
    max-width: 1100px;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-content form,
#formModalBody {
    padding: 1.5rem;
}

/* Confirm Dialog */
.confirm-dialog {
    text-align: center;
    padding: 2rem 1.5rem;
}

.confirm-dialog-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
}

.confirm-dialog-icon.icon-danger {
    background: #fee2e2;
    color: #dc2626;
}

.confirm-dialog-icon.icon-warning {
    background: #fef3c7;
    color: #d97706;
}

.confirm-dialog-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.confirm-dialog-message {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

.confirm-dialog-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.confirm-dialog-actions .btn {
    min-width: 120px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
    background: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

/* Child Entry */
.child-entry {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.child-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Icon-only by default, expand on hover */
.sidebar {
    width: 60px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width 0.25s ease;
    overflow: hidden;
}

.sidebar:hover {
    width: 260px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    justify-content: center;
}

.sidebar:hover .sidebar-header {
    padding: 1.25rem 1.5rem;
    justify-content: flex-start;
}

.sidebar-header i {
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.sidebar-header span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.15s ease, width 0.15s ease;
}

.sidebar:hover .sidebar-header span {
    opacity: 1;
    width: auto;
    overflow: visible;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    transition: background 0.15s ease, color 0.15s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    justify-content: center;
}

.sidebar:hover .nav-item {
    padding: 0.75rem 1rem;
    justify-content: flex-start;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--sidebar-active);
}

.nav-item.active {
    background: rgba(37, 99, 235, 0.2);
    color: var(--sidebar-active);
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item span,
.nav-item .submenu-arrow {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.15s ease, width 0.15s ease;
}

.sidebar:hover .nav-item span,
.sidebar:hover .nav-item .submenu-arrow {
    opacity: 1;
    width: auto;
    overflow: visible;
}

.nav-item.has-submenu {
    cursor: pointer;
}

.nav-item .submenu-arrow {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.2s ease, opacity 0.15s ease;
}

.nav-item.has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.sidebar:hover .submenu.open {
    max-height: 200px;
}

.sub-item {
    padding: 0.6rem 1rem 0.6rem 2.75rem;
    font-size: 0.85rem;
}

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sidebar:hover .sidebar-footer {
    padding: 1rem 1.25rem;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--sidebar-text);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
}

.user-info span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.15s ease, width 0.15s ease;
}

.sidebar:hover .user-info span {
    opacity: 1;
    width: auto;
    overflow: visible;
}

.user-info i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 60px;
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}

.top-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar h1 {
    font-size: 1.25rem;
    font-weight: 600;
    flex: 1;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.5rem;
}

.user-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.content-area {
    padding: 2rem;
}

/* Sections */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

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

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: #d1fae5; color: var(--success); }
.stat-icon.orange { background: #fef3c7; color: var(--warning); }
.stat-icon.purple { background: #ede9fe; color: var(--purple); }

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

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Stats Comparison Chart */
.stats-bar-chart {
    min-width: 600px;
}

.stats-comparison-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stats-comparison-header {
    display: grid;
    grid-template-columns: 130px 1fr 1fr 1fr 1fr;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
}

.stats-comp-label-col {
    /* empty header for label column */
}

.stats-comp-period-col {
    text-align: center;
}

.period-header {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.today-header { background: #dbeafe; color: #1d4ed8; }
.yesterday-header { background: #f1f5f9; color: #64748b; }
.week-header { background: #dcfce7; color: #166534; }
.lastweek-header { background: #fef3c7; color: #92400e; }

.stats-comparison-row {
    display: grid;
    grid-template-columns: 130px 1fr 1fr 1fr 1fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.stats-comparison-row:last-child {
    border-bottom: none;
}

.stats-comp-label {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-comp-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.stats-comp-bar-track {
    flex: 1;
    height: 18px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.stats-comp-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
    min-width: 2px;
}

.stats-comp-value {
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 28px;
    text-align: right;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 2px;
}

.trend-icon {
    font-size: 0.6rem;
    line-height: 1;
}

.trend-up {
    color: #16a34a;
}

.trend-down {
    color: #dc2626;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.25rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card.full-width {
    grid-column: 1 / -1;
}

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

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Tables */
.table-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--bg);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.data-table tr:hover {
    background: rgba(37, 99, 235, 0.02);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-in_progress { background: var(--primary-light); color: var(--primary); }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fef2f2; color: #b91c1c; }
.badge-incoming { background: #d1fae5; color: #065f46; }
.badge-outgoing { background: #fef3c7; color: #92400e; }
.badge-admin { background: var(--primary-light); color: var(--primary); }
.badge-worker { background: #f1f5f9; color: var(--secondary); }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fef2f2; color: #b91c1c; }
.badge-processed { background: #d1fae5; color: #065f46; }


/* Children table badge styles */
.badge-father { background: #dbeafe; color: #1e40af; }
.badge-mother { background: #fce7f3; color: #9d174d; }
.badge-son { background: #ccfbf1; color: #115e59; }
.badge-daughter { background: #f3e8ff; color: #6b21a8; }
.badge-self { background: #fef3c7; color: #92400e; }
.badge-spouse { background: #ffedd5; color: #9a3412; }
.badge-guardian { background: #e0e7ff; color: #3730a3; }
.badge-other { background: #f1f5f9; color: #475569; }
.badge-new-account { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.badge-transfer-account { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.badge-provider { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }
.badge-insurance { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }
.badge-card-number { background: #f0fdf4; color: #166534; font-family: 'Courier New', monospace; font-size: 0.7rem; letter-spacing: 0.5px; }

/* Inline account type select styling */
.inline-account-type {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 22px !important;
    transition: all 0.2s ease;
}
.inline-account-type:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}
.inline-account-type option[value="new"] { color: #065f46; }
.inline-account-type option[value="transfer"] { color: #92400e; }

/* Provider select in children table */
.inline-provider {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 22px !important;
    transition: all 0.2s ease;
}
.inline-provider:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

/* Account type badge wrapper */
.account-type-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.account-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.account-type-badge i { font-size: 0.65rem; }
.account-type-badge.type-new {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.account-type-badge.type-transfer {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
}
.provider-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #5b21b6;
    border: 1px solid #c4b5fd;
}
.provider-badge i { font-size: 0.6rem; }

/* Children table row hover */
#childrenTableBody tr:hover {
    background: #f8fafc;
}
#childrenTableBody td {
    vertical-align: middle;
}

/* Transfer filters */
.transfer-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--card-bg);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Audit filters */
.audit-filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.audit-filters input,
.audit-filters select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.25rem;
}

.card-wide {
    min-width: 0;
}

/* Family Detail Two-Column Layout */
.family-detail-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.family-detail-left {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.family-detail-right {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.family-detail-bottom {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (max-width: 900px) {
    .family-detail-layout {
        grid-template-columns: 1fr;
    }
}

.member-verify-row:hover {
    background: #f1f5f9;
}

.sc-time-slot-btn.btn-primary {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
}

/* Family info card - compact */
.detail-grid > .card:first-child .card-body {
    padding: 0.75rem 1rem;
}

.detail-grid > .card:first-child .info-list li {
    padding: 0.35rem 0;
    font-size: 0.8rem;
}

.detail-grid > .card:first-child .info-label {
    font-size: 0.7rem;
}

.detail-grid > .card:first-child .info-value {
    font-size: 0.8rem;
}

/* Activity items */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.activity-icon.create { background: #d1fae5; color: var(--success); }
.activity-icon.update { background: var(--primary-light); color: var(--primary); }
.activity-icon.delete { background: #fef2f2; color: var(--danger); }

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.85rem;
    color: var(--text);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.125rem;
}

.activity-mine {
    border-left: 3px solid var(--primary);
    padding-left: 0.75rem;
}

/* Notes */
.note-item {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 0.875rem;
    margin-bottom: 0.75rem;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
    gap: 0.5rem;
}

.note-author {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

.note-date {
    font-size: 0.7rem;
    color: var(--text-light);
}

.note-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

.note-actions .btn-sm {
    padding: 2px 6px;
    font-size: 0.7rem;
}

.note-text {
    font-size: 0.85rem;
    color: var(--text);
    white-space: pre-wrap;
}

/* Info list */
.info-list {
    list-style: none;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-light);
    font-weight: 500;
}

.info-value {
    font-weight: 500;
    color: var(--text);
}

/* Empty state */
.empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    font-size: 0.9rem;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1.25rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
    min-width: 280px;
    border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .content-area {
        padding: 1rem;
    }

    #followupStatsRow {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .landing-title {
        font-size: 2rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .card-wide {
        grid-column: 1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .audit-filters {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .landing-actions {
        flex-direction: column;
    }

    .stats-comparison-header,
    .stats-comparison-row {
        grid-template-columns: 100px 1fr 1fr 1fr 1fr;
        gap: 0.3rem;
    }

    .stats-comp-label {
        font-size: 0.65rem;
    }

    .period-header {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }

    .stats-comp-value {
        font-size: 0.7rem;
        min-width: 22px;
    }

    .stats-comp-bar-track {
        height: 14px;
    }
}

/* Admin only elements */
.admin-only {
    display: none;
}

body.is-admin .admin-only {
    display: flex;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 480px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.75rem;
}

.settings-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-tab-btn:hover {
    background: var(--hover);
    color: var(--text);
}

.settings-tab-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.settings-panels {
    width: 100%;
}

.settings-panel {
    display: none;
    width: 100%;
}

.settings-panel.active {
    display: block;
}

.settings-panel .card.full-width {
    width: 100%;
}

/* Worker Schedule Table */
.worker-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.worker-schedule-table th,
.worker-schedule-table td {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}

.worker-schedule-table th {
    background: var(--hover);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-light);
}

.worker-schedule-table .day-label {
    font-weight: 600;
    min-width: 80px;
}

.worker-schedule-table .time-slot-input {
    width: 140px;
    font-size: 0.9rem;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.worker-schedule-table .slot-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 8px;
    margin-bottom: 4px;
}

.worker-schedule-table .add-slot-btn {
    font-size: 0.7rem;
    padding: 2px 6px;
    border: 1px dashed var(--border);
    border-radius: 4px;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
}

.worker-schedule-table .add-slot-btn:hover {
    background: var(--hover);
}

.worker-schedule-table .remove-slot-btn {
    font-size: 0.7rem;
    padding: 1px 4px;
    border: none;
    background: transparent;
    color: #dc2626;
    cursor: pointer;
}

/* Account type badges */
.badge-new { background: #d1fae5; color: #065f46; }
.badge-transfer { background: #fef3c7; color: #92400e; }
.badge-renew { background: #e0e7ff; color: #3730a3; }
.badge-mixed { background: #fce7f3; color: #9d174d; }

/* Quick Filter */
.quick-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.875rem;
    margin-bottom: 1rem;
    max-width: 400px;
    transition: var(--transition);
}

.quick-filter:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.quick-filter i {
    color: var(--text-light);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.quick-filter input {
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text);
    width: 100%;
    padding: 0.25rem 0;
}

.quick-filter input::placeholder {
    color: var(--text-light);
}

/* Audit eye button */
.audit-eye-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.audit-eye-btn:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}
/* Visitor Duplicate Warning */
.visitor-duplicate-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 100%);
    border: 1px solid #f59e0b;
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 10;
    animation: warningSlide 0.4s ease;
}
.visitor-duplicate-warning i {
    font-size: 1.5rem;
    color: #d97706;
    flex-shrink: 0;
    margin-top: 2px;
}
.visitor-duplicate-warning div {
    color: #92400e;
    font-size: 0.9rem;
    line-height: 1.5;
}
.visitor-duplicate-warning strong {
    font-size: 0.95rem;
}
@keyframes warningSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ CHILD PLUS BUTTON & DROPDOWN ============ */
.child-actions-cell {
    white-space: nowrap;
}
.child-action-btns {
    display: inline-flex;
    gap: 4px;
    vertical-align: middle;
}
.child-plus-menu-wrap {
    display: inline-flex;
    position: relative;
    vertical-align: middle;
    margin-left: 4px;
}
.btn-plus-action {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
    position: relative;
}
.btn-plus-action:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}
.btn-plus-action i {
    font-size: 0.75rem;
}
.task-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 50%;
    padding: 0 4px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.4);
}
.child-plus-dropdown {
    display: none;
    position: fixed;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    min-width: 180px;
    overflow: hidden;
    animation: plusMenuSlide 0.15s ease;
}
.child-plus-dropdown.open {
    display: block;
}
.child-plus-dropdown button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}
.child-plus-dropdown button:hover {
    background: #f1f5f9;
    color: #2563eb;
}
.child-plus-dropdown button i {
    font-size: 0.85rem;
    color: #64748b;
    width: 18px;
    text-align: center;
}
.child-plus-dropdown button:hover i {
    color: #2563eb;
}
.child-plus-dropdown button + button {
    border-top: 1px solid #f1f5f9;
}
@keyframes plusMenuSlide {
    from { opacity: 0; transform: translateY(-4px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Families Toolbar */
.families-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.families-sort-btns {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.families-sort-btns .filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.families-sort-btns .filter-btn i {
    font-size: 0.75rem;
}
.families-sort-btns .filter-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}
.families-sort-btns .filter-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 1px 3px rgba(37,99,235,0.3);
}

/* Called In Pulse Animation (shared) */
@keyframes calledInPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Called In Overlay - Side Chat Notification */
.called-in-overlay {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 340px;
    max-height: 400px;
    background: #fff;
    border: 1px solid #f59e0b;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(245,158,11,0.25), 0 2px 8px rgba(0,0,0,0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    animation: calledInOverlaySlide 0.35s ease;
    overflow: hidden;
}
.called-in-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-bottom: 1px solid #f59e0b;
}
.called-in-overlay-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #92400e;
}
.called-in-overlay-title i {
    color: #f59e0b;
    animation: calledInPulse 1.5s ease-in-out infinite;
}
.called-in-overlay-close {
    background: rgba(146,64,14,0.1);
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    color: #92400e;
    font-size: 0.8rem;
    transition: background 0.15s;
}
.called-in-overlay-close:hover {
    background: rgba(146,64,14,0.2);
}
.called-in-overlay-list {
    overflow-y: auto;
    max-height: 320px;
    padding: 8px 0;
}
.called-in-overlay-list .called-in-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.called-in-overlay-list .called-in-item:last-child {
    border-bottom: none;
}
.called-in-overlay-list .called-in-item:hover {
    background: #fffbeb;
}
.called-in-overlay-list .called-in-item i {
    color: #f59e0b;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.called-in-overlay-list .called-in-item strong {
    color: #1e293b;
}
.called-in-overlay-list .called-in-item .btn {
    margin-left: auto;
    flex-shrink: 0;
}
/* Badge on the bell icon when there are call-ins */
.called-in-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #f59e0b;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: calledInPulse 1.5s ease-in-out infinite;
}
@keyframes calledInOverlaySlide {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ CALENDAR PAGE ============ */
.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.calendar-toolbar .cal-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.calendar-toolbar .cal-nav button {
    background: var(--hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85rem;
}
.calendar-toolbar .cal-nav button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.calendar-toolbar .cal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    min-width: 180px;
    text-align: center;
}
.calendar-toolbar .cal-views {
    display: flex;
    gap: 4px;
}
.calendar-toolbar .cal-views button {
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
}
.calendar-toolbar .cal-views button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.calendar-toolbar .cal-worker-filter {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    min-width: 160px;
}

/* Month View */
.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.cal-month-grid .cal-day-header {
    background: var(--hover);
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}
.cal-month-grid .cal-day-cell {
    min-height: 90px;
    padding: 4px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: white;
    position: relative;
}
.cal-month-grid .cal-day-cell:nth-child(7n) {
    border-right: none;
}
.cal-month-grid .cal-day-cell.other-month {
    background: #f8fafc;
    opacity: 0.5;
}
.cal-month-grid .cal-day-cell.today {
    background: #eff6ff;
}
.cal-month-grid .cal-day-num {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 2px;
}
.cal-month-grid .cal-day-cell.today .cal-day-num {
    color: var(--primary);
    background: #dbeafe;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cal-event {
    font-size: 0.65rem;
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}
.cal-event.screening {
    background: #dbeafe;
    color: #1e40af;
    border-left: 2px solid #2563eb;
}
.cal-event.available {
    background: #d1fae5;
    color: #065f46;
    border-left: 2px solid #10b981;
}

/* Week View */

.cal-week-event {
    position: absolute;
    left: 2px;
    right: 2px;
    font-size: 0.65rem;
    padding: 2px 4px;
    border-radius: 3px;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
}
.cal-week-event.screening {
    background: #dbeafe;
    color: #1e40af;
    border-left: 2px solid #2563eb;
}
.cal-week-event.available {
    background: #d1fae5;
    color: #065f46;
    border-left: 2px solid #10b981;
    opacity: 0.6;
}

/* Day View */
.cal-day-grid {
    display: grid;
    grid-template-columns: 60px 1fr;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    max-height: 600px;
    overflow-y: auto;
}
.cal-day-grid .cal-day-header-row {
    grid-column: 1 / -1;
    background: var(--hover);
    padding: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 2;
}
.cal-day-grid .cal-time-label {
    font-size: 0.7rem;
    color: var(--text-light);
    padding: 2px 4px;
    text-align: right;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid #f1f5f9;
    height: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}
.cal-day-grid .cal-day-slot {
    border-bottom: 1px solid #f1f5f9;
    height: 40px;
    position: relative;
}
.cal-day-event {
    position: absolute;
    left: 4px;
    right: 4px;
    font-size: 0.75rem;
    padding: 4px 6px;
    border-radius: 4px;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
}
.cal-day-event.screening {
    background: #dbeafe;
    color: #1e40af;
    border-left: 3px solid #2563eb;
}
.cal-day-event.available {
    background: #d1fae5;
    color: #065f46;
    border-left: 3px solid #10b981;
    opacity: 0.6;
}

/* Day view row-based layout */
.cal-day-header-bar {
    grid-column: 1 / -1;
    background: var(--hover);
    padding: 12px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 2;
}
.cal-day-row {
    display: contents;
}
.cal-day-row .cal-time-label {
    font-size: 0.75rem;
    color: var(--text-light);
    padding: 4px 6px;
    text-align: right;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid #f1f5f9;
    min-height: 44px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}
.cal-day-row .cal-day-content {
    border-bottom: 1px solid #f1f5f9;
    min-height: 44px;
    padding: 2px 6px;
    position: relative;
}
.cal-day-row.available-hour .cal-day-content {
    background: #f0fdf4;
}

/* Week view row-based layout */
.cal-week-grid {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    max-height: 600px;
    overflow-y: auto;
}
.cal-week-grid .cal-week-header {
    display: grid;
    grid-template-columns: 70px repeat(7, 1fr);
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--hover);
    border-bottom: 1px solid var(--border);
}
.cal-week-grid .cal-week-day-header {
    padding: 8px 4px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    border-left: 1px solid var(--border);
}
.cal-week-grid .cal-week-row {
    display: grid;
    grid-template-columns: 70px repeat(7, 1fr);
    border-bottom: 1px solid #f1f5f9;
}
.cal-week-grid .cal-week-row .cal-time-label {
    font-size: 0.7rem;
    color: var(--text-light);
    padding: 4px 6px;
    text-align: right;
    border-right: 1px solid var(--border);
    min-height: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}
.cal-week-grid .cal-week-cell {
    border-left: 1px solid #f1f5f9;
    min-height: 40px;
    position: relative;
    padding: 1px 2px;
}
.cal-week-grid .cal-week-cell .cal-week-event {
    position: relative;
    left: auto;
    right: auto;
    margin-bottom: 1px;
}

/* ============ SCREENING STATS CHIPS ============ */
.screening-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 500;
    border: 1.5px solid var(--chip-color, #94a3b8);
    background: transparent;
    color: var(--chip-color, #94a3b8);
    cursor: pointer;
    transition: all 0.15s;
}
.screening-stat-chip:hover {
    background: color-mix(in srgb, var(--chip-color) 10%, transparent);
}
.screening-stat-chip.active {
    background: var(--chip-color, #94a3b8);
    color: #fff;
}
.screening-stat-chip strong {
    font-weight: 700;
}

/* ============ CALENDAR & TASKS LAYOUT ============ */
.calendar-tasks-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1rem;
    align-items: start;
}
@media (max-width: 1024px) {
    .calendar-tasks-layout {
        grid-template-columns: 1fr;
    }
}

/* Task side items */
.task-side-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.4rem;
    transition: background 0.1s;
}
.task-side-item:hover {
    background: #f8fafc;
}
.task-side-item.completed {
    opacity: 0.6;
    border-color: #e2e8f0;
}
.task-side-item .task-check {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.15s;
}
.task-side-item .task-check:hover {
    border-color: #16a34a;
    background: #dcfce7;
}
.task-side-item.completed .task-check {
    background: #16a34a;
    border-color: #16a34a;
}

/* ============ SCREENING MULTI-PAGE TABS ============ */
.sc-multipage-container {
    padding: 0;
}
.sc-page-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1rem;
    gap: 0;
}
.sc-page-tab {
    flex: 1;
    padding: 0.6rem 0.5rem;
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.8rem;
    font-weight: 400;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    transition: all 0.2s;
}
.sc-page-tab:hover {
    color: #2563eb;
    background: #f8fafc;
}
.sc-page-tab.active {
    background: #fff;
    border-bottom-color: #2563eb;
    font-weight: 600;
    color: #2563eb;
}
.sc-actions-dropdown button {
    border: none;
    background: transparent;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
}
.sc-actions-dropdown button:hover {
    background: #f1f5f9;
}

/* Spinner animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== Status Inquiry Page - Dark Theme ===== */
.status-inquiry-page {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: #0a0e1a;
    color: #e2e8f0;
    overflow-y: auto;
}
.status-inquiry-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    overflow: hidden;
}
.status-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}
.status-glow-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(59,130,246,0.5), transparent 70%);
    top: -150px; left: -100px;
    animation: statusFloat 8s ease-in-out infinite;
}
.status-glow-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(139,92,246,0.4), transparent 70%);
    bottom: -100px; right: -80px;
    animation: statusFloat 10s ease-in-out infinite reverse;
}
.status-glow-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(16,185,129,0.3), transparent 70%);
    top: 40%; left: 60%;
    animation: statusFloat 12s ease-in-out infinite;
}
.status-grid-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}
@keyframes statusFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
}
.status-inquiry-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.status-inquiry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}
.status-inquiry-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.status-inquiry-brand i {
    font-size: 1.5rem;
    color: #60a5fa;
}
.status-inquiry-brand span {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
}
.btn-status-back {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.btn-status-back:hover {
    background: rgba(255,255,255,0.1);
    color: #f1f5f9;
    border-color: rgba(255,255,255,0.2);
}
.status-inquiry-title {
    text-align: center;
    margin-bottom: 2.5rem;
}
.status-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    color: #60a5fa;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}
.status-inquiry-title h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #f1f5f9;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}
.status-highlight {
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.status-inquiry-title p {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}
.status-inquiry-form-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.status-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.status-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}
.status-form-group label i {
    margin-right: 0.3rem;
    color: #60a5fa;
}
.status-form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: #f1f5f9;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.status-form-group input::placeholder {
    color: #64748b;
}
.status-form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
    background: rgba(255,255,255,0.08);
}
.status-inquiry-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 1rem;
}
.btn-status-submit {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-status-submit:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(37,99,235,0.3);
}
.btn-status-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Status Results - Dark Cards */
.status-result-success {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.status-result-success .status-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(16,185,129,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.status-result-success .status-icon i {
    font-size: 1.3rem;
    color: #34d399;
}
.status-result-success h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #f1f5f9;
}
.status-result-success p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: #64748b;
}

/* Family Overview Card */
.status-family-overview {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.status-family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
}
.status-family-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.status-family-item .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    font-weight: 600;
}
.status-family-item .value {
    font-size: 0.95rem;
    color: #e2e8f0;
    font-weight: 500;
}

/* Section Headers */
.status-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.status-section-header i {
    font-size: 1.1rem;
}
.status-section-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #f1f5f9 !important;
    font-weight: 600;
}
.status-section-header .count {
    background: rgba(255,255,255,0.08);
    color: #cbd5e1 !important;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Members Section */
.status-members-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.status-member-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}
.status-member-card:hover {
    border-color: rgba(59,130,246,0.2);
    background: rgba(255,255,255,0.05);
}
.status-member-card:last-child {
    margin-bottom: 0;
}
.status-member-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}
.status-member-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.95rem;
}
.status-member-name i {
    color: #64748b;
    font-size: 0.9rem;
}
.status-member-relation {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 400;
}
.status-member-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: #94a3b8;
}
.status-member-details strong {
    color: #cbd5e1;
}

/* Screenings Column in Members */
.status-screening-info {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
}
.status-screening-info .screening-label {
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
}
.status-screening-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Cases Table - Dark */
.status-cases-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.status-cases-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.status-cases-table thead tr {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.status-cases-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: #64748b;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-cases-table td {
    padding: 0.85rem 1rem;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.status-cases-table tbody tr {
    transition: background 0.15s;
}
.status-cases-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}
.status-cases-table .benefit-name {
    font-weight: 600;
    color: #e2e8f0;
}
.status-cases-table .case-date {
    color: #94a3b8;
    font-size: 0.8rem;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-badge-pending {
    background: rgba(245,158,11,0.12);
    color: #fbbf24;
}
.status-badge-contacted {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
}
.status-badge-enrolled, .status-badge-active, .status-badge-in_progress, .status-badge-completed, .status-badge-approved {
    background: rgba(16,185,129,0.12);
    color: #34d399;
}
.status-badge-declined, .status-badge-ineligible {
    background: rgba(239,68,68,0.12);
    color: #f87171;
}
.status-badge-new {
    background: rgba(148,163,184,0.12);
    color: #94a3b8;
}
.status-badge-in_review, .status-badge-review_done, .status-badge-scheduled {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
}
.status-badge-in_screening, .status-badge-waiting_approval {
    background: rgba(139,92,246,0.12);
    color: #a78bfa;
}

/* Contact Footer */
.status-contact-footer {
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}
.status-contact-footer p {
    margin: 0;
    font-size: 0.9rem;
    color: #94a3b8;
}
.status-contact-footer a {
    color: #60a5fa;
    font-weight: 600;
    text-decoration: none;
}
.status-contact-footer a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Benefit Status Cards Overview */
.status-benefits-overview {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.status-benefit-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.status-benefit-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.2s ease;
}
.status-benefit-card:hover {
    background: rgba(255,255,255,0.07);
    transform: translateY(-1px);
}
.status-benefit-card.benefit-card-active {
    background: rgba(255,255,255,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.benefit-card-count {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    min-width: 36px;
    text-align: center;
}
.benefit-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.benefit-card-info {
    flex: 1;
    min-width: 0;
}
.benefit-card-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f1f5f9 !important;
    margin-bottom: 0.4rem;
}
.benefit-card-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
}
.benefit-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.benefit-status-dot.dot-green {
    background: #34d399;
    box-shadow: 0 0 6px rgba(52,211,153,0.4);
}
.benefit-status-dot.dot-blue {
    background: #60a5fa;
    box-shadow: 0 0 6px rgba(96,165,250,0.4);
}
.benefit-status-dot.dot-yellow {
    background: #fbbf24;
    box-shadow: 0 0 6px rgba(251,191,36,0.4);
}
.benefit-status-dot.dot-red {
    background: #f87171;
    box-shadow: 0 0 6px rgba(248,113,113,0.4);
}
.benefit-status-dot.dot-gray {
    background: #475569;
}
.benefit-status-text {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0 !important;
}
.benefit-card-members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.35rem;
}
.benefit-member-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    color: #cbd5e1 !important;
    background: rgba(255,255,255,0.06);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
}
.benefit-card-member,
.benefit-card-date {
    font-size: 0.75rem;
    color: #94a3b8 !important;
    display: flex;
    align-items: center;
    margin-top: 0.2rem;
}

/* Case List (replaces table) */
.status-cases-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.status-case-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    transition: all 0.15s ease;
}
.status-case-row:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}
.case-row-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.case-row-info {
    flex: 1;
    min-width: 0;
}
.case-row-benefit {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.2rem;
}
.case-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #64748b;
}
.case-row-meta i {
    margin-right: 0.2rem;
    font-size: 0.7rem;
}
.case-row-status {
    flex-shrink: 0;
}

/* Member Cases Inline */
.status-member-cases {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.member-cases-label {
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
}
.member-case-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
}
.member-case-name {
    font-size: 0.75rem;
    color: #cbd5e1;
    font-weight: 500;
}

/* Cases Empty State */
.status-cases-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: #64748b;
}
.status-cases-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.4;
    color: #a78bfa;
}
.status-cases-empty p {
    margin: 0;
    font-size: 0.9rem;
    color: #94a3b8;
}
.status-cases-empty .status-cases-empty-sub {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
}

/* User Selector Popup */
.user-selector-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.user-selector-popup.visible {
    opacity: 1;
}
.user-selector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}
.user-selector-content {
    position: relative;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.user-selector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #334155;
}
.user-selector-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}
.user-selector-options {
    padding: 0.5rem;
}
.user-selector-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: none;
    background: transparent;
    color: #e2e8f0;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}
.user-selector-option:hover {
    background: #334155;
}
.user-selector-option.active {
    background: #1d4ed8;
    color: #fff;
}
.user-selector-divider {
    height: 1px;
    background: #334155;
    margin: 0.5rem 0;
}
.user-filter-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 6px;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 640px) {
    .status-form-grid {
        grid-template-columns: 1fr;
    }
    .status-inquiry-title h1 {
        font-size: 1.5rem;
    }
    .status-family-grid {
        grid-template-columns: 1fr 1fr;
    }
    .status-benefit-cards-grid {
        grid-template-columns: 1fr;
    }
    .status-benefit-card {
        padding: 1rem;
    }
    .status-cases-table {
        font-size: 0.78rem;
    }
    .status-cases-table th, .status-cases-table td {
        padding: 0.6rem 0.5rem;
    }
    .status-case-row {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .case-row-status {
        width: 100%;
        text-align: right;
    }
}
