.family-management {
    max-width: 960px;
    margin: 0 auto;
    padding: 100px 40px 120px;
    position: relative;
    z-index: 1;
    font-family: 'Inter', sans-serif;
    color: #e2e8f0;
}
.family-glow {
    position: fixed;
    inset: 0 0 0 260px;
    z-index: 0;
    pointer-events: none;
    background: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 40%);
}
@media (max-width: 768px) {
    .family-glow { left: 0 !important; }
    .family-management { padding: 24px 12px 80px; }
    .family-card-gl { border-radius: 20px; padding: 16px; }
    .family-header-v2 {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px;
    }
    .family-header-info { gap: 12px; }
    .family-avatar-v2 { width: 56px; height: 56px; border-radius: 16px; }
    .family-title-v2 { font-size: 22px; }
    .family-meta-v2 { font-size: 13px; }
    .family-member-card-gl { gap: 14px; padding: 16px; }
    .family-member-photo-gl,
    .family-member-initials-gl { width: 52px; height: 52px; font-size: 18px; }
    .family-action-strip-gl { margin-top: 12px; padding-top: 12px; }
    .family-members-grid { grid-template-columns: 1fr !important; }
    .family-invite-grid { grid-template-columns: 1fr !important; }
    .family-invite-grid .invite-col { border-left: none !important; padding-left: 0 !important; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 16px; }
    .family-game-row { flex-direction: column; gap: 12px; align-items: stretch !important; }
    .family-game-row .family-btn-gl { width: 100%; justify-content: center; }
    .family-header-actions { width: 100%; }
    .family-header-actions .family-btn-gl { flex: 1; justify-content: center; }
}

.family-card-gl {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(45px) saturate(180%);
    -webkit-backdrop-filter: blur(45px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 32px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.family-card-gl:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.family-header-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 32px;
}
.family-avatar-v2 {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-color, #6366f1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.family-title-v2 { font-size: 28px; font-weight: 800; color: #fff; margin: 0; }
.family-meta-v2 { font-size: 14px; color: #94a3b8; font-weight: 500; margin-top: 4px; }

.family-empty-gl {
    text-align: center;
    padding: 64px 40px;
    max-width: 580px;
    margin: 60px auto;
}
.family-empty-icon-gl {
    width: 84px; height: 84px;
    margin: 0 auto 28px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-color);
}
.family-empty-title-gl {
    font-size: 28px; font-weight: 800; margin-bottom: 14px;
    background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.family-btn-gl {
    padding: 12px 28px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-flex; align-items: center; gap: 10px;
}
.family-btn-gl-primary {
    background: var(--accent-gradient); color: #fff;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}
.family-btn-gl-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(99, 102, 241, 0.4); opacity: 0.95; }

.family-member-card-gl {
    display: flex; align-items: flex-start; gap: 20px; padding: 24px;
    background: rgba(255, 255, 255, 0.035);
}
.family-member-photo-gl {
    width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.12);
}
.family-member-initials-gl {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.15);
}
.family-member-role-badge {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    color: #64748b; margin-top: 2px;
}
.family-action-strip-gl {
    display: flex; gap: 8px; margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 16px;
    width: 100%;
}
.family-mini-btn {
    height: 36px; flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px; color: #94a3b8;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.family-mini-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; transform: translateY(-1px); }

.family-invite-gl {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.05) 100%);
    border-color: rgba(99, 102, 241, 0.25);
    margin-bottom: 32px;
}

/* ── LIGHT THEME — FamilyModule ── */
[data-mode="light"] .family-management { color: #0f172a; }
[data-mode="light"] .family-card-gl {
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06) !important;
}
[data-mode="light"] .family-card-gl:hover {
    background: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.10) !important;
}
[data-mode="light"] .family-title-v2 { color: #0f172a !important; }
[data-mode="light"] .family-meta-v2 { color: #64748b !important; }
[data-mode="light"] .family-member-card-gl { background: rgba(255, 255, 255, 0.55) !important; }
[data-mode="light"] .family-member-photo-gl { border-color: rgba(0, 0, 0, 0.10) !important; }
[data-mode="light"] .family-member-initials-gl { border-color: rgba(0, 0, 0, 0.10) !important; }
[data-mode="light"] .family-member-role-badge { color: #475569 !important; }
[data-mode="light"] .family-action-strip-gl { border-top-color: rgba(0, 0, 0, 0.06) !important; }
[data-mode="light"] .family-mini-btn {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #64748b !important;
}
[data-mode="light"] .family-mini-btn:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
}
[data-mode="light"] .family-btn-secondary {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #475569 !important;
}
[data-mode="light"] .family-glow {
    background:
        radial-gradient(circle at 10% 20%, rgba(var(--primary-rgb), 0.06) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(var(--secondary-rgb), 0.04) 0%, transparent 40%);
}
